summaryrefslogtreecommitdiffstats
path: root/parts/replace/replaceitem.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/replace/replaceitem.cpp')
-rw-r--r--parts/replace/replaceitem.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/parts/replace/replaceitem.cpp b/parts/replace/replaceitem.cpp
index bc33211f..d810e2ad 100644
--- a/parts/replace/replaceitem.cpp
+++ b/parts/replace/replaceitem.cpp
@@ -9,10 +9,10 @@
* *
***************************************************************************/
-#include <qpainter.h>
-#include <qstyle.h>
-#include <qpalette.h>
-#include <qcheckbox.h>
+#include <tqpainter.h>
+#include <tqstyle.h>
+#include <tqpalette.h>
+#include <tqcheckbox.h>
#include "replaceitem.h"
@@ -69,41 +69,41 @@ void ReplaceItem::setChecked( bool checked )
}
}
-// code mostly lifted from QCheckListItem::paintCell()
-void ReplaceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align )
+// code mostly lifted from TQCheckListItem::paintCell()
+void ReplaceItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{
if ( !p )
return;
- QListView *lvv = listView();
+ TQListView *lvv = listView();
if ( !lvv )
return;
ReplaceView * lv = static_cast<ReplaceView*>(lvv);
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- lv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ lv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
- QFontMetrics fm( lv->fontMetrics() );
- int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv);
+ TQFontMetrics fm( lv->fontMetrics() );
+ int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv);
int marg = lv->itemMargin();
int r = marg;
// Draw controller / checkbox / radiobutton ---------------------
- int styleflags = QStyle::Style_Default;
+ int styleflags = TQStyle::Style_Default;
if ( isOn() )
- styleflags |= QStyle::Style_On;
+ styleflags |= TQStyle::Style_On;
else
- styleflags |= QStyle::Style_Off;
+ styleflags |= TQStyle::Style_Off;
if ( isSelected() )
- styleflags |= QStyle::Style_Selected;
+ styleflags |= TQStyle::Style_Selected;
if ( isEnabled() && lv->isEnabled() )
- styleflags |= QStyle::Style_Enabled;
+ styleflags |= TQStyle::Style_Enabled;
int x = 0;
int y = 0;
@@ -116,30 +116,30 @@ void ReplaceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, i
else
y = (fm.height() + 2 + marg - boxsize) / 2;
- lv->style().drawPrimitive(QStyle::PE_CheckListIndicator, p,
- QRect(x, y, boxsize,
+ lv->style().drawPrimitive(TQStyle::PE_CheckListIndicator, p,
+ TQRect(x, y, boxsize,
fm.height() + 2 + marg),
- cg, styleflags, QStyleOption(this));
+ cg, styleflags, TQStyleOption(this));
r += boxsize + 4;
// Draw text ----------------------------------------------------
p->translate( r, 0 );
- p->setPen( QPen( cg.text() ) );
+ p->setPen( TQPen( cg.text() ) );
- QColorGroup mcg = cg;
- mcg.setColor( QColorGroup::Text, ( isFile() ? Qt::darkGreen : Qt::blue ) );
- mcg.setColor( QColorGroup::HighlightedText, ( isFile() ? Qt::darkGreen : Qt::blue ) );
+ TQColorGroup mcg = cg;
+ mcg.setColor( TQColorGroup::Text, ( isFile() ? Qt::darkGreen : Qt::blue ) );
+ mcg.setColor( TQColorGroup::HighlightedText, ( isFile() ? Qt::darkGreen : Qt::blue ) );
- QListViewItem::paintCell( p, mcg, column, width - r, align );
+ TQListViewItem::paintCell( p, mcg, column, width - r, align );
}
-void ReplaceItem::activate( int, QPoint const & localPos )
+void ReplaceItem::activate( int, TQPoint const & localPos )
{
- QListView * lv = listView();
- QCheckBox cb(0);
+ TQListView * lv = listView();
+ TQCheckBox cb(0);
int boxsize = cb.sizeHint().width();
-//that's KDE-3.1 only int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv);
+//that's KDE-3.1 only int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv);
int rightside = lv->itemMargin() + boxsize + ( isFile() ? 0 : lv->treeStepSize() );
// _lineclicked indicates if the click was on the line or in the checkbox