diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-19 01:42:14 +0000 |
commit | 8155225c9be993acc0512956416d195edfef4eb9 (patch) | |
tree | de4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kcontrol/colors | |
parent | 364641b8e0279758d236af39abd138d379328a19 (diff) | |
download | tdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip |
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/colors')
-rw-r--r-- | kcontrol/colors/colorscm.cpp | 12 | ||||
-rw-r--r-- | kcontrol/colors/widgetcanvas.cpp | 30 | ||||
-rw-r--r-- | kcontrol/colors/widgetcanvas.h | 2 |
3 files changed, 22 insertions, 22 deletions
diff --git a/kcontrol/colors/colorscm.cpp b/kcontrol/colors/colorscm.cpp index 6161198c0..39c1d55b9 100644 --- a/kcontrol/colors/colorscm.cpp +++ b/kcontrol/colors/colorscm.cpp @@ -254,9 +254,9 @@ KColorScheme::KColorScheme(TQWidget *parent, const char *name, const TQStringLis groupLayout = new TQHBoxLayout; groupLayout2->addLayout(groupLayout); - sb = new TQSlider( TQSlider::Horizontal,group,"Slider" ); + sb = new TQSlider( Qt::Horizontal,group,"Slider" ); sb->setRange( 0, 10 ); - sb->setFocusPolicy( TQWidget::StrongFocus ); + sb->setFocusPolicy( TQ_StrongFocus ); connect(sb, TQT_SIGNAL(valueChanged(int)), TQT_SLOT(sliderValueChanged(int))); TQWhatsThis::add(sb, i18n("Use this slider to change the contrast level" @@ -444,7 +444,7 @@ void KColorScheme::slotSave( ) if (!entry) return; sCurrentScheme = entry->path; KSimpleConfig *config = new KSimpleConfig(sCurrentScheme ); - int i = sCurrentScheme.findRev('/'); + int i = sCurrentScheme.tqfindRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); @@ -800,7 +800,7 @@ void KColorScheme::readScheme( int index ) sCurrentScheme = entry->path; config = new KSimpleConfig(sCurrentScheme, true); config->setGroup("Color Scheme"); - int i = sCurrentScheme.findRev('/'); + int i = sCurrentScheme.tqfindRev('/'); if (i >= 0) sCurrentScheme = sCurrentScheme.mid(i+1); } @@ -905,7 +905,7 @@ int KColorScheme::findSchemeByName(const TQString &scheme) return 1; TQString search = scheme; - int i = search.findRev('/'); + int i = search.tqfindRev('/'); if (i >= 0) search = search.mid(i+1); @@ -972,7 +972,7 @@ void KColorScheme::insertEntry(const TQString &sFile, const TQString &sName) { KColorSchemeEntry *newEntry = new KColorSchemeEntry(sFile, sName, true); mSchemeList->inSort(newEntry); - int newIndex = mSchemeList->findRef(newEntry)+nSysSchemes; + int newIndex = mSchemeList->tqfindRef(newEntry)+nSysSchemes; sList->insertItem(sName, newIndex); sList->setCurrentItem(newIndex); } diff --git a/kcontrol/colors/widgetcanvas.cpp b/kcontrol/colors/widgetcanvas.cpp index 67e68b3a3..09d3ecf69 100644 --- a/kcontrol/colors/widgetcanvas.cpp +++ b/kcontrol/colors/widgetcanvas.cpp @@ -64,7 +64,7 @@ void WidgetCanvas::paintEvent(TQPaintEvent *) void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.contains( me->pos() ) ) { + if ( hotspots[i].rect.tqcontains( me->pos() ) ) { emit widgetSelected( hotspots[i].number ); return; } @@ -73,7 +73,7 @@ void WidgetCanvas::mousePressEvent( TQMouseEvent *me ) void WidgetCanvas::mouseMoveEvent( TQMouseEvent *me ) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.contains( me->pos() ) ) { + if ( hotspots[i].rect.tqcontains( me->pos() ) ) { if ( i != currentHotspot ) { TQString tip = tips[hotspots[i].number]; TQToolTip::remove( this ); @@ -91,7 +91,7 @@ void WidgetCanvas::dropEvent( TQDropEvent *e) TQColor c; if (KColorDrag::decode( e, c)) { for ( int i = 0; i < MAX_HOTSPOTS; i++ ) - if ( hotspots[i].rect.contains( e->pos() ) ) { + if ( hotspots[i].rect.tqcontains( e->pos() ) ) { emit colorDropped( hotspots[i].number, c); return; } @@ -315,7 +315,7 @@ void WidgetCanvas::drawSampleWidgets() // Create a scrollbar and redirect drawing into a temp. pixmap to save a // lot of fiddly drawing later. - TQScrollBar *vertScrollBar = new TQScrollBar( TQScrollBar::Vertical, this ); + TQScrollBar *vertScrollBar = new TQScrollBar( Qt::Vertical, this ); // TODO: vertScrollBar->setStyle( new TQMotifStyle() ); vertScrollBar->setGeometry( 400, 400, SCROLLBAR_SIZE, height()); vertScrollBar->setRange( 0, 0 ); @@ -327,7 +327,7 @@ void WidgetCanvas::drawSampleWidgets() #ifndef __osf__ TQPainter::redirect( vertScrollBar, &pm ); #endif - vertScrollBar->repaint(); + vertScrollBar->tqrepaint(); TQPainter::redirect( vertScrollBar, 0 ); vertScrollBar->hide(); @@ -337,8 +337,8 @@ void WidgetCanvas::drawSampleWidgets() // Initialize the pixmap which we draw sample widgets into. smplw.resize(width(), height()); - //smplw.fill( parentWidget()->back() ); - smplw.fill( parentWidget()->colorGroup().mid() ); + //smplw.fill( tqparentWidget()->back() ); + smplw.fill( tqparentWidget()->tqcolorGroup().mid() ); // Actually start painting in @@ -435,7 +435,7 @@ void WidgetCanvas::drawSampleWidgets() // Menu bar //qDrawShadePanel ( &paint, 25, 55, width()-52, 28, cg, FALSE, 2, &brush); - kapp->style().drawPrimitive(TQStyle::PE_PanelMenuBar, &paint, + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_PanelMenuBar, &paint, TQRect(TQPoint(25, 55), TQSize(width()-52, 28)), cg); paint.setFont( menuFont ); @@ -443,7 +443,7 @@ void WidgetCanvas::drawSampleWidgets() TQString file = i18n("File"); textLen = paint.fontMetrics().width( file ); //qDrawShadePanel ( &paint, 30, 59, textLen + 10, 21, cg, FALSE, 2, &brush); - kapp->style().drawPrimitive(TQStyle::PE_Panel, &paint, + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_Panel, &paint, TQRect(30, 59, textLen + 10, 21), cg); paint.drawText( 35, 74, file ); @@ -528,7 +528,7 @@ void WidgetCanvas::drawSampleWidgets() cg2.setColor(TQColorGroup::Button, button); cg2.setColor(TQColorGroup::Background, window); //qDrawWinButton(&paint, xpos, ypos, textLen+32, 28, cg, false, &brush); - kapp->style().drawPrimitive(TQStyle::PE_ButtonCommand, &paint, + kapp->tqstyle().tqdrawPrimitive(TQStyle::PE_ButtonCommand, &paint, TQRect(xpos, ypos, textLen+32, 28), cg2, TQStyle::Style_Enabled | TQStyle::Style_Raised); paint.setPen(buttonTxt); paint.drawText(xpos, ypos, textLen+32, 28, AlignCenter, @@ -567,9 +567,9 @@ void WidgetCanvas::drawSampleWidgets() popup->setItemEnabled( id, false ); // HACK: Force Layouting - //Sad Eagle: sizeHint() forces layouting too, and it's a lot less visible - //popup->sizeHint(); // Breaks with Qt 3.3 - popup->resize(popup->sizeHint()); + //Sad Eagle: tqsizeHint() forces layouting too, and it's a lot less visible + //popup->tqsizeHint(); // Breaks with Qt 3.3 + popup->resize(popup->tqsizeHint()); pm = TQPixmap::grabWidget( popup ); delete popup; @@ -585,12 +585,12 @@ void WidgetCanvas::drawSampleWidgets() // Valance qDrawWinPanel ( &paint, 0, 0, width(), height(), - parentWidget()->colorGroup(), TRUE, 0); + tqparentWidget()->tqcolorGroup(), TRUE, 0); // Stop the painting hotspots[ spot++ ] = HotSpot( TQRect( 0, 0, width(), height() ), CSM_Background ); // ? - repaint( FALSE ); + tqrepaint( FALSE ); } diff --git a/kcontrol/colors/widgetcanvas.h b/kcontrol/colors/widgetcanvas.h index 44fc2fd12..aea314664 100644 --- a/kcontrol/colors/widgetcanvas.h +++ b/kcontrol/colors/widgetcanvas.h @@ -58,7 +58,7 @@ public: int number; }; -class WidgetCanvas : public QWidget +class WidgetCanvas : public TQWidget { Q_OBJECT |