diff options
Diffstat (limited to 'twin/clients')
25 files changed, 131 insertions, 131 deletions
diff --git a/twin/clients/PORTING b/twin/clients/PORTING index e6a18a7a1..3db8af576 100644 --- a/twin/clients/PORTING +++ b/twin/clients/PORTING @@ -9,7 +9,7 @@ Makefile.am: Sources: - There are no twin/something.h includes, and don't use the KWinInternal namespace. - Use QToolTip instead of KWinToolTip. -- Use QButton instead of KWinButton, QToolButton instead of KWinToolButton and QWidget +- Use QButton instead of KWinButton, QToolButton instead of KWinToolButton and TQWidget instead of KWinWidgetButton. - For tooltips, use simply QToolTip::add(). - Change Client* to MyClient* (or whatever is your main client class) in your MyButton. @@ -22,11 +22,11 @@ Sources: - As the first thing in init(), call createMainWidget(); if your client class took some flags such as WResizeNoErase, pass them to this function. - Then, do 'widget()->installEventFilter( this );'. -- Implement MyClient::eventFilter() - as MyClient is now no longer QWidget, you need the event +- Implement MyClient::eventFilter() - as MyClient is now no longer TQWidget, you need the event filter to call all the functions that used to be called directly. Usually, it's something like: ===== -bool MyClient::eventFilter( QObject* o, QEvent* e ) +bool MyClient::eventFilter( TQObject* o, QEvent* e ) { if ( o != widget() ) return false; @@ -63,7 +63,7 @@ bool MyClient::eventFilter( QObject* o, QEvent* e ) } ===== - In MyClient, 'this' will have to be often replaced with 'widget()', pay special attention - to cases where this won't cause compile error (e.g. in connect() calls, which take QObject* ). + to cases where this won't cause compile error (e.g. in connect() calls, which take TQObject* ). - Also, many calls may need 'widget()->' prepended. - Layout is created in init(), so call createLayout() directly there (if it's implemented). - Remove calls to Client methods (Client::resizeEvent() and so on). @@ -84,7 +84,7 @@ inline const KDecorationOptions* options() { return KDecoration::options(); } - Replace 'contextHelp()' with 'showContextHelp()'. - WindowWrapperShowEvent() is gone, simply use showEvent() filtered by the event filter if needed. - Change 'animateIconifyOrDeiconify()' to 'animateMinize()', if it's empty, simply remove it. - Make sure it doesn't reenter the event loop (no kapp->processEvents()). + Make sure it doesn't reenter the event loop (no tdeApp->processEvents()). - Buttons should use explicit setCursor() if they don't want cursor set by mousePosition(). I.e. usually call setCursor( ArrowCursor ) in your MyButton. - In the part where you insert windowWrapper() into the layout, i.e. something like diff --git a/twin/clients/b2/b2client.cpp b/twin/clients/b2/b2client.cpp index 49391e923..571b16909 100644 --- a/twin/clients/b2/b2client.cpp +++ b/twin/clients/b2/b2client.cpp @@ -82,7 +82,7 @@ static bool drawSmallBorders = false; // ===================================== -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new B2::B2ClientFactory(); } @@ -444,9 +444,9 @@ bool B2Client::isModalSystemNotification() result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void B2Client::addButtons(const TQString& s, const TQString tips[], @@ -464,8 +464,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], TQt::LeftButton | TQt::RightButton); button[BtnMenu]->setPixmaps(P_MENU); button[BtnMenu]->setUseMiniIcon(); - connect(button[BtnMenu], TQT_SIGNAL(pressed()), - this, TQT_SLOT(menuButtonPressed())); + connect(button[BtnMenu], TQ_SIGNAL(pressed()), + this, TQ_SLOT(menuButtonPressed())); titleLayout->addWidget(button[BtnMenu]); } } @@ -477,8 +477,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], button[BtnSticky]->setPixmaps(P_PINUP); button[BtnSticky]->setToggle(); button[BtnSticky]->setDown(isOnAllDesktops()); - connect(button[BtnSticky], TQT_SIGNAL(clicked()), - this, TQT_SLOT(toggleOnAllDesktops())); + connect(button[BtnSticky], TQ_SIGNAL(clicked()), + this, TQ_SLOT(toggleOnAllDesktops())); titleLayout->addWidget(button[BtnSticky]); } } @@ -487,8 +487,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (providesContextHelp() && (!button[BtnHelp])) { button[BtnHelp] = new B2Button(this, tb, tips[BtnHelp]); button[BtnHelp]->setPixmaps(P_HELP); - connect(button[BtnHelp], TQT_SIGNAL(clicked()), - this, TQT_SLOT(showContextHelp())); + connect(button[BtnHelp], TQ_SIGNAL(clicked()), + this, TQ_SLOT(showContextHelp())); titleLayout->addWidget(button[BtnHelp]); } break; @@ -496,8 +496,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isMinimizable() && (!button[BtnIconify])) { button[BtnIconify] = new B2Button(this, tb,tips[BtnIconify]); button[BtnIconify]->setPixmaps(P_ICONIFY); - connect(button[BtnIconify], TQT_SIGNAL(clicked()), - this, TQT_SLOT(minimize())); + connect(button[BtnIconify], TQ_SIGNAL(clicked()), + this, TQ_SLOT(minimize())); titleLayout->addWidget(button[BtnIconify]); } break; @@ -507,8 +507,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], TQt::LeftButton | TQt::MidButton | TQt::RightButton); button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ? P_NORMALIZE : P_MAX); - connect(button[BtnMax], TQT_SIGNAL(clicked()), - this, TQT_SLOT(maxButtonClicked())); + connect(button[BtnMax], TQ_SIGNAL(clicked()), + this, TQ_SLOT(maxButtonClicked())); titleLayout->addWidget(button[BtnMax]); } break; @@ -516,8 +516,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isCloseable() && !button[BtnClose]) { button[BtnClose] = new B2Button(this, tb, tips[BtnClose]); button[BtnClose]->setPixmaps(P_CLOSE); - connect(button[BtnClose], TQT_SIGNAL(clicked()), - this, TQT_SLOT(closeWindow())); + connect(button[BtnClose], TQ_SIGNAL(clicked()), + this, TQ_SLOT(closeWindow())); titleLayout->addWidget(button[BtnClose]); } break; @@ -525,8 +525,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (isShadeable() && !button[BtnShade]) { button[BtnShade] = new B2Button(this, tb, tips[BtnShade]); button[BtnShade]->setPixmaps(P_SHADE); - connect(button[BtnShade], TQT_SIGNAL(clicked()), - this, TQT_SLOT(shadeButtonClicked())); + connect(button[BtnShade], TQ_SIGNAL(clicked()), + this, TQ_SLOT(shadeButtonClicked())); titleLayout->addWidget(button[BtnShade]); } break; @@ -534,8 +534,8 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], if (resizable && !button[BtnResize]) { button[BtnResize] = new B2Button(this, tb, tips[BtnResize]); button[BtnResize]->setPixmaps(P_RESIZE); - connect(button[BtnResize], TQT_SIGNAL(pressed()), - this, TQT_SLOT(resizeButtonPressed())); + connect(button[BtnResize], TQ_SIGNAL(pressed()), + this, TQ_SLOT(resizeButtonPressed())); titleLayout->addWidget(button[BtnResize]); } break; @@ -982,7 +982,7 @@ static void redraw_pixmaps() TQColor color = is_act ? aGrp.button() : iGrp.button(); drawB2Rect(&thinBox, color, is_down); pix->fill(TQt::black); - bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&thinBox), + bitBlt(pix, 0, 0, &thinBox, 0, 0, thinBox.width(), thinBox.height(), TQt::CopyROP, true); } @@ -1005,12 +1005,12 @@ static void redraw_pixmaps() drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down); drawB2Rect(&largeBox, is_act ? aGrp.button() : iGrp.button(), is_down); pix->fill(options()->color(KDecoration::ColorTitleBar, is_act)); - bitBlt(TQT_TQPAINTDEVICE(pix), pix->width() - 12, pix->width() - 12, TQT_TQPAINTDEVICE(&largeBox), + bitBlt(pix, pix->width() - 12, pix->width() - 12, &largeBox, 0, 0, 12, 12, TQt::CopyROP, true); - bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); + bitBlt(pix, 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true); - bitBlt(TQT_TQPAINTDEVICE(pixmap[P_ICONIFY * NumStates + i]), 0, 0, - TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); + bitBlt(pixmap[P_ICONIFY * NumStates + i], 0, 0, + &smallBox, 0, 0, 10, 10, TQt::CopyROP, true); } // resize @@ -1020,8 +1020,8 @@ static void redraw_pixmaps() *pixmap[P_RESIZE * NumStates + i] = *pixmap[P_CLOSE * NumStates + i]; pixmap[P_RESIZE * NumStates + i]->detach(); drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down); - bitBlt(TQT_TQPAINTDEVICE(pixmap[P_RESIZE * NumStates + i]), - 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); + bitBlt(pixmap[P_RESIZE * NumStates + i], + 0, 0, &smallBox, 0, 0, 10, 10, TQt::CopyROP, true); } @@ -1183,22 +1183,22 @@ bool B2Client::eventFilter(TQObject *o, TQEvent *e) return false; switch (e->type()) { case TQEvent::Resize: - resizeEvent(TQT_TQRESIZEEVENT(e)); + resizeEvent(static_cast<TQResizeEvent*>(e)); return true; case TQEvent::Paint: - paintEvent(TQT_TQPAINTEVENT(e)); + paintEvent(static_cast<TQPaintEvent*>(e)); return true; case TQEvent::MouseButtonDblClick: - titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); + titlebar->mouseDoubleClickEvent(static_cast<TQMouseEvent*>(e)); return true; case TQEvent::Wheel: - titlebar->wheelEvent(TQT_TQWHEELEVENT(e)); + titlebar->wheelEvent(static_cast<TQWheelEvent*>(e)); return true; case TQEvent::MouseButtonPress: - processMousePressEvent(TQT_TQMOUSEEVENT(e)); + processMousePressEvent(static_cast<TQMouseEvent*>(e)); return true; case TQEvent::Show: - showEvent(TQT_TQSHOWEVENT(e)); + showEvent(static_cast<TQShowEvent*>(e)); return true; default: break; @@ -1213,7 +1213,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent, : TQButton(parent, 0), hover(false) { setBackgroundMode(NoBackground); - setCursor(tqarrowCursor); + setCursor(TQt::arrowCursor); realizeButtons = realizeBtns; client = _client; useMiniIcon = false; @@ -1395,7 +1395,7 @@ void B2Titlebar::resizeEvent(TQResizeEvent *) void B2Titlebar::paintEvent(TQPaintEvent *) { if(client->isActive()) - bitBlt(TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&titleBuffer), 0, 0, titleBuffer.width(), + bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(), titleBuffer.height(), TQt::CopyROP, true); else { TQPainter p(this); diff --git a/twin/clients/b2/config/config.cpp b/twin/clients/b2/config/config.cpp index 5b7a29e0f..70942bce1 100644 --- a/twin/clients/b2/config/config.cpp +++ b/twin/clients/b2/config/config.cpp @@ -15,7 +15,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new B2Config(conf, parent)); } @@ -70,12 +70,12 @@ B2Config::B2Config( TDEConfig* conf, TQWidget* parent ) load(conf); // Ensure we track user changes properly - connect(cbColorBorder, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged())); - connect(showGrabHandleCb, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged())); - connect(menuDblClickOp, TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotSelectionChanged())); + connect(cbColorBorder, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged())); + connect(showGrabHandleCb, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged())); + connect(menuDblClickOp, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(slotSelectionChanged())); // Make the widgets visible in twindecoration gb->show(); } diff --git a/twin/clients/default/config/config.cpp b/twin/clients/default/config/config.cpp index 886077925..054279fc0 100644 --- a/twin/clients/default/config/config.cpp +++ b/twin/clients/default/config/config.cpp @@ -17,7 +17,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new KDEDefaultConfig(conf, parent)); } @@ -61,13 +61,13 @@ KDEDefaultConfig::KDEDefaultConfig( TDEConfig* conf, TQWidget* parent ) load( conf ); // Ensure we track user changes properly - connect( cbShowStipple, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); - connect( cbShowGrabBar, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbShowStipple, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); + connect( cbShowGrabBar, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); if (highcolor) - connect( cbUseGradients, TQT_SIGNAL(clicked()), - this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbUseGradients, TQ_SIGNAL(clicked()), + this, TQ_SLOT(slotSelectionChanged()) ); // Make the widgets visible in twindecoration gb->show(); diff --git a/twin/clients/default/kdedefault.cpp b/twin/clients/default/kdedefault.cpp index 3513ca5df..33eb46f4d 100644 --- a/twin/clients/default/kdedefault.cpp +++ b/twin/clients/default/kdedefault.cpp @@ -1060,7 +1060,7 @@ TQRegion KDEDefaultClient::cornerShape(WindowCorner corner) } // namespace // Extended KWin plugin interface -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new Default::KDEDefaultHandler(); } diff --git a/twin/clients/keramik/config/config.cpp b/twin/clients/keramik/config/config.cpp index dfd5e20aa..408c5a38a 100644 --- a/twin/clients/keramik/config/config.cpp +++ b/twin/clients/keramik/config/config.cpp @@ -33,7 +33,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return ( new KeramikConfig( conf, parent ) ); } @@ -55,10 +55,10 @@ KeramikConfig::KeramikConfig( TDEConfig* conf, TQWidget* parent ) c = new TDEConfig( "twinkeramikrc" ); ui = new KeramikConfigUI( parent ); - connect( ui->showAppIcons, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->smallCaptions, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->largeGrabBars, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); - connect( ui->useShadowedText, TQT_SIGNAL(clicked()), TQT_SIGNAL(changed()) ); + connect( ui->showAppIcons, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->smallCaptions, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->largeGrabBars, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); + connect( ui->useShadowedText, TQ_SIGNAL(clicked()), TQ_SIGNAL(changed()) ); load( conf ); ui->show(); diff --git a/twin/clients/keramik/embedtool.cpp b/twin/clients/keramik/embedtool.cpp index 88cf93838..1cc56fe32 100644 --- a/twin/clients/keramik/embedtool.cpp +++ b/twin/clients/keramik/embedtool.cpp @@ -66,7 +66,7 @@ KeramikEmbedder::KeramikEmbedder() file = new TQFile( "tiles.h" ); file->open( IO_WriteOnly | IO_Truncate ); - stream.setDevice( TQT_TQIODEVICE(file) ); + stream.setDevice( file ); stream << "/*\n"; stream << " * Generated by embedtool 1.0 on " << datestring << endl; @@ -101,7 +101,7 @@ void KeramikEmbedder::embed( const char *name ) codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" ); - stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t"; + stream << "\tstatic const TQRgb " << codename << "_data[] = {" << endl << "\t\t"; stream.setf( TQTextStream::hex | TQTextStream::right ); stream.fill( '0' ); @@ -147,7 +147,7 @@ void KeramikEmbedder::writeIndex() stream << "\t\tint width;\n"; stream << "\t\tint height;\n"; stream << "\t\tbool alpha;\n"; - stream << "\t\tconst QRgb *data;\n"; + stream << "\t\tconst TQRgb *data;\n"; stream << "\t};\n\n"; uint i = 0; diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp index 446199fa7..d5c441a26 100644 --- a/twin/clients/keramik/keramik.cpp +++ b/twin/clients/keramik/keramik.cpp @@ -765,7 +765,7 @@ KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, co TQToolTip::add( this, tip ); // FRAME setBackgroundMode( NoBackground ); - setCursor( tqarrowCursor ); + setCursor( TQt::arrowCursor ); int size = clientHandler->roundButton()->height(); setFixedSize( size, size ); @@ -907,8 +907,8 @@ KeramikClient::KeramikClient( KDecorationBridge* bridge, KDecorationFactory* fac void KeramikClient::init() { - connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool ))); - connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool ))); + connect( this, TQ_SIGNAL( keepAboveChanged( bool )), TQ_SLOT( keepAboveChange( bool ))); + connect( this, TQ_SIGNAL( keepBelowChanged( bool )), TQ_SLOT( keepBelowChange( bool ))); createMainWidget( (WFlags)(WStaticContents | WResizeNoErase | WRepaintNoErase) ); widget()->installEventFilter( this ); @@ -1035,9 +1035,9 @@ bool KeramikClient::isModalSystemNotification() result = XGetWindowProperty(tqt_xdisplay(), windowId(), kde_wm_system_modal_notification, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, /*(unsigned char **)*/ &data); if (result == Success && data != None && format == 32 ) { - return TRUE; + return true; } - return FALSE; + return false; } void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) @@ -1051,7 +1051,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) if (!isModalSystemNotification()) { if ( !button[MenuButton] ) { button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), TQt::LeftButton|TQt::RightButton ); - connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) ); + connect( button[MenuButton], TQ_SIGNAL( pressed() ), TQ_SLOT( menuButtonPressed() ) ); layout->addWidget( button[MenuButton] ); } } @@ -1065,7 +1065,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) OnAllDesktopsButton, isOnAllDesktops()?i18n("Not on all desktops"):i18n("On all desktops") ); if(isOnAllDesktops()) button[OnAllDesktopsButton]->toggle(); - connect( button[OnAllDesktopsButton], TQT_SIGNAL( clicked() ), TQT_SLOT( toggleOnAllDesktops() ) ); + connect( button[OnAllDesktopsButton], TQ_SIGNAL( clicked() ), TQ_SLOT( toggleOnAllDesktops() ) ); layout->addWidget( button[OnAllDesktopsButton] ); } } @@ -1075,7 +1075,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'H' : if ( !button[HelpButton] && providesContextHelp() ) { button[HelpButton] = new KeramikButton( this, "help", HelpButton, i18n("Help") ); - connect( button[HelpButton], TQT_SIGNAL( clicked() ), TQT_SLOT( showContextHelp() ) ); + connect( button[HelpButton], TQ_SIGNAL( clicked() ), TQ_SLOT( showContextHelp() ) ); layout->addWidget( button[HelpButton] ); } break; @@ -1084,7 +1084,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'I' : if ( !button[MinButton] && isMinimizable() ) { button[MinButton] = new KeramikButton( this, "minimize", MinButton, i18n("Minimize") ); - connect( button[MinButton], TQT_SIGNAL( clicked() ), TQT_SLOT( minimize() ) ); + connect( button[MinButton], TQ_SIGNAL( clicked() ), TQ_SLOT( minimize() ) ); layout->addWidget( button[MinButton] ); } break; @@ -1093,7 +1093,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'A' : if ( !button[MaxButton] && isMaximizable() ) { button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), TQt::LeftButton|TQt::MidButton|TQt::RightButton ); - connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) ); + connect( button[MaxButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotMaximize() ) ); layout->addWidget( button[MaxButton] ); } break; @@ -1102,7 +1102,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'X' : if ( !button[CloseButton] && isCloseable() ) { button[CloseButton] = new KeramikButton( this, "close", CloseButton, i18n("Close") ); - connect( button[CloseButton], TQT_SIGNAL( clicked() ), TQT_SLOT( closeWindow() ) ); + connect( button[CloseButton], TQ_SIGNAL( clicked() ), TQ_SLOT( closeWindow() ) ); layout->addWidget( button[CloseButton] ); } break; @@ -1111,7 +1111,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'F' : if ( !button[AboveButton]) { button[AboveButton] = new KeramikButton( this, "above", AboveButton, i18n("Keep Above Others") ); - connect( button[AboveButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotAbove() ) ); + connect( button[AboveButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotAbove() ) ); layout->addWidget( button[AboveButton] ); } break; @@ -1120,7 +1120,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'B' : if ( !button[BelowButton]) { button[BelowButton] = new KeramikButton( this, "below", BelowButton, i18n("Keep Below Others") ); - connect( button[BelowButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotBelow() ) ); + connect( button[BelowButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotBelow() ) ); layout->addWidget( button[BelowButton] ); } break; @@ -1130,7 +1130,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) if ( !button[ShadeButton] && isShadeable() ) { button[ShadeButton] = new KeramikButton( this, "shade", ShadeButton, isSetShade() ? i18n("Unshade") : i18n( "Shade" )); - connect( button[ShadeButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotShade() ) ); + connect( button[ShadeButton], TQ_SIGNAL( clicked() ), TQ_SLOT( slotShade() ) ); layout->addWidget( button[ShadeButton] ); } break; @@ -1647,10 +1647,10 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) int dy = 0; if ( e->oldSize().width() != width() ) - dx = 32 + QABS( e->oldSize().width() - width() ); + dx = 32 + TQABS( e->oldSize().width() - width() ); if ( e->oldSize().height() != height() ) - dy = 8 + QABS( e->oldSize().height() - height() ); + dy = 8 + TQABS( e->oldSize().height() - height() ); if ( dy ) widget()->update( 0, height() - dy + 1, width(), dy ); @@ -1662,7 +1662,7 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4, titlebar->geometry().bottom() ) ) ); // Titlebar needs no paint event - TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), FALSE ) ); + TQApplication::postEvent( this, new TQPaintEvent( titlebar->geometry(), false ) ); } } } @@ -1802,23 +1802,23 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) switch ( e->type() ) { case TQEvent::Resize: - resizeEvent( TQT_TQRESIZEEVENT( e ) ); + resizeEvent( static_cast<TQResizeEvent*>( e ) ); return true; case TQEvent::Paint: - paintEvent( TQT_TQPAINTEVENT( e ) ); + paintEvent( static_cast<TQPaintEvent*>( e ) ); return true; case TQEvent::MouseButtonDblClick: - mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ) ); + mouseDoubleClickEvent( static_cast<TQMouseEvent*>( e ) ); return true; case TQEvent::MouseButtonPress: - processMousePressEvent( TQT_TQMOUSEEVENT( e ) ); + processMousePressEvent( static_cast<TQMouseEvent*>( e ) ); return true; case TQEvent::Wheel: - wheelEvent( TQT_TQWHEELEVENT( e )); + wheelEvent( static_cast<TQWheelEvent*>( e )); return true; default: @@ -1836,7 +1836,7 @@ bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { Keramik::clientHandler = new Keramik::KeramikHandler(); return Keramik::clientHandler; diff --git a/twin/clients/kwmtheme/cli_installer/main.cpp b/twin/clients/kwmtheme/cli_installer/main.cpp index 27af172e1..3f0e209ec 100644 --- a/twin/clients/kwmtheme/cli_installer/main.cpp +++ b/twin/clients/kwmtheme/cli_installer/main.cpp @@ -1,10 +1,10 @@ #include <tqfile.h> #include <tqdir.h> #include <tdeapplication.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tdeglobal.h> #include <kdebug.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <tdecmdlineargs.h> #include <tdelocale.h> @@ -67,7 +67,7 @@ int main(int argc, char **argv) TQDir().mkdir(localDirStr); TQFileInfo fi(f); - KSimpleConfig input(fi.absFilePath()); + TDESimpleConfig input(fi.absFilePath()); srcStr = fi.dirPath(true) + "/"; TDEConfig *output = TDEGlobal::config(); input.setGroup("Window Border"); diff --git a/twin/clients/kwmtheme/kwmthemeclient.cpp b/twin/clients/kwmtheme/kwmthemeclient.cpp index 4daffae7c..b0473261b 100644 --- a/twin/clients/kwmtheme/kwmthemeclient.cpp +++ b/twin/clients/kwmtheme/kwmthemeclient.cpp @@ -5,7 +5,7 @@ #include <tqdrawutil.h> #include <tqpainter.h> #include <kpixmapeffect.h> -#include <kstandarddirs.h> +#include <tdestandarddirs.h> #include <kdebug.h> #include <tdelocale.h> #include <tqbitmap.h> @@ -293,8 +293,8 @@ void KWMThemeClient::init() iconChange(); hb->addWidget(mnuBtn); mnuBtn->setFixedSize(20, 20); - connect(mnuBtn, TQT_SIGNAL(pressed()), this, - TQT_SLOT(menuButtonPressed())); + connect(mnuBtn, TQ_SIGNAL(pressed()), this, + TQ_SLOT(menuButtonPressed())); } else if(val == "Sticky"){ stickyBtn = new MyButton(widget(), "sticky"); @@ -303,7 +303,7 @@ void KWMThemeClient::init() stickyBtn->setPixmap(*pindownPix); else stickyBtn->setPixmap(*pinupPix); - connect(stickyBtn, TQT_SIGNAL( clicked() ), this, TQT_SLOT(toggleOnAllDesktops())); + connect(stickyBtn, TQ_SIGNAL( clicked() ), this, TQ_SLOT(toggleOnAllDesktops())); hb->addWidget(stickyBtn); stickyBtn->setFixedSize(20, 20); } @@ -311,7 +311,7 @@ void KWMThemeClient::init() btn = new MyButton(widget(), "iconify"); TQToolTip::add( btn, i18n("Minimize")); btn->setPixmap(*iconifyPix); - connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(minimize())); + connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(minimize())); hb->addWidget(btn); btn->setFixedSize(20, 20); } @@ -319,7 +319,7 @@ void KWMThemeClient::init() maxBtn = new MyButton(widget(), "max"); TQToolTip::add( maxBtn, i18n("Maximize")); maxBtn->setPixmap(*maxPix); - connect(maxBtn, TQT_SIGNAL(clicked()), this, TQT_SLOT(maximize())); + connect(maxBtn, TQ_SIGNAL(clicked()), this, TQ_SLOT(maximize())); hb->addWidget(maxBtn); maxBtn->setFixedSize(20, 20); } @@ -327,7 +327,7 @@ void KWMThemeClient::init() btn = new MyButton(widget(), "close"); TQToolTip::add( btn, i18n("Close")); btn->setPixmap(*closePix); - connect(btn, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeWindow())); + connect(btn, TQ_SIGNAL(clicked()), this, TQ_SLOT(closeWindow())); hb->addWidget(btn); btn->setFixedSize(20, 20); } @@ -927,7 +927,7 @@ TODO extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { return new KWMTheme::KWMThemeFactory(); } diff --git a/twin/clients/laptop/laptopclient.cpp b/twin/clients/laptop/laptopclient.cpp index 30fb76b3a..b0bc659dd 100644 --- a/twin/clients/laptop/laptopclient.cpp +++ b/twin/clients/laptop/laptopclient.cpp @@ -65,7 +65,7 @@ static bool pixmaps_created = false; // ===================================== -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new Laptop::LaptopClientFactory(); } diff --git a/twin/clients/modernsystem/config/config.cpp b/twin/clients/modernsystem/config/config.cpp index 4512203c4..c353abc1b 100644 --- a/twin/clients/modernsystem/config/config.cpp +++ b/twin/clients/modernsystem/config/config.cpp @@ -12,7 +12,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent) + TDE_EXPORT TQObject* allocate_config(TDEConfig* conf, TQWidget* parent) { return(new ModernSysConfig(conf, parent)); } @@ -44,7 +44,7 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p "easier, especially for trackballs and other mouse replacements " "on laptops.")); layout->addMultiCellWidget(cbShowHandle, 0, 0, 0, 1); - connect(cbShowHandle, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged())); + connect(cbShowHandle, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged())); sliderBox = new TQVBox(handleBox); handleSizeSlider = new TQSlider(0, 4, 1, 0, TQt::Horizontal, sliderBox); @@ -52,12 +52,12 @@ ModernSysConfig::ModernSysConfig(TDEConfig* conf, TQWidget* parent) : TQObject(p i18n("Here you can change the size of the resize handle.")); handleSizeSlider->setTickInterval(1); handleSizeSlider->setTickmarks(TQSlider::Below); - connect(handleSizeSlider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(slotSelectionChanged())); + connect(handleSizeSlider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(slotSelectionChanged())); hbox = new TQHBox(sliderBox); hbox->setSpacing(6); - bool rtl = kapp->reverseLayout(); + bool rtl = tdeApp->reverseLayout(); label1 = new TQLabel(i18n("Small"), hbox); label1->setAlignment(rtl ? AlignRight : AlignLeft); label2 = new TQLabel(i18n("Medium"), hbox); diff --git a/twin/clients/modernsystem/modernsys.cpp b/twin/clients/modernsystem/modernsys.cpp index 94615b190..3777df9d8 100644 --- a/twin/clients/modernsystem/modernsys.cpp +++ b/twin/clients/modernsystem/modernsys.cpp @@ -731,7 +731,7 @@ bool ModernSysFactory::supports( Ability ability ) } // KWin extended plugin interface -extern "C" KDE_EXPORT KDecorationFactory* create_factory() +extern "C" TDE_EXPORT KDecorationFactory* create_factory() { return new ModernSystem::ModernSysFactory(); } diff --git a/twin/clients/plastik/config/config.cpp b/twin/clients/plastik/config/config.cpp index 04658796c..0fdc126e2 100644 --- a/twin/clients/plastik/config/config.cpp +++ b/twin/clients/plastik/config/config.cpp @@ -49,16 +49,16 @@ PlastikConfig::PlastikConfig(TDEConfig* config, TQWidget* parent) load(config); // setup the connections - connect(m_dialog->titleAlign, TQT_SIGNAL(clicked(int)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->animateButtons, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->menuClose, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->titleShadow, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); - connect(m_dialog->coloredBorder, TQT_SIGNAL(toggled(bool)), - this, TQT_SIGNAL(changed())); + connect(m_dialog->titleAlign, TQ_SIGNAL(clicked(int)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->animateButtons, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->menuClose, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->titleShadow, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); + connect(m_dialog->coloredBorder, TQ_SIGNAL(toggled(bool)), + this, TQ_SIGNAL(changed())); } PlastikConfig::~PlastikConfig() @@ -115,7 +115,7 @@ void PlastikConfig::defaults() extern "C" { - KDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) { + TDE_EXPORT TQObject* allocate_config(TDEConfig* config, TQWidget* parent) { return (new PlastikConfig(config, parent)); } } diff --git a/twin/clients/plastik/misc.cpp b/twin/clients/plastik/misc.cpp index 1b259d383..053cf15ea 100644 --- a/twin/clients/plastik/misc.cpp +++ b/twin/clients/plastik/misc.cpp @@ -54,8 +54,8 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i { // normal button... - QRgb rgb = bgColor.rgb(); - QRgb rgb_b = fgColor.rgb(); + TQRgb rgb = bgColor.rgb(); + TQRgb rgb_b = fgColor.rgb(); int alpha = a; if(alpha>255) alpha = 255; if(alpha<0) alpha = 0; diff --git a/twin/clients/plastik/plastik.cpp b/twin/clients/plastik/plastik.cpp index b5a4808d7..6f835fde8 100644 --- a/twin/clients/plastik/plastik.cpp +++ b/twin/clients/plastik/plastik.cpp @@ -590,7 +590,7 @@ PlastikHandler* Handler() extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { KWinPlastik::handler = new KWinPlastik::PlastikHandler(); return KWinPlastik::handler; diff --git a/twin/clients/plastik/plastik.h b/twin/clients/plastik/plastik.h index 587d93f4e..558ac848a 100644 --- a/twin/clients/plastik/plastik.h +++ b/twin/clients/plastik/plastik.h @@ -93,7 +93,7 @@ public: int borderSize() { return m_borderSize; } bool animateButtons() { return m_animateButtons; } bool menuClose() { return m_menuClose; } - TQ_Alignment titleAlign() { return m_titleAlign; } + TQt::AlignmentFlags titleAlign() { return m_titleAlign; } bool reverseLayout() { return m_reverse; } TQColor getColor(KWinPlastik::ColorType type, const bool active = true); @@ -113,7 +113,7 @@ private: int m_titleHeightTool; TQFont m_titleFont; TQFont m_titleFontTool; - TQ_Alignment m_titleAlign; + TQt::AlignmentFlags m_titleAlign; // pixmap cache TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state... diff --git a/twin/clients/plastik/plastikbutton.cpp b/twin/clients/plastik/plastikbutton.cpp index 5fdadc8e1..3f3f81f62 100644 --- a/twin/clients/plastik/plastikbutton.cpp +++ b/twin/clients/plastik/plastikbutton.cpp @@ -51,7 +51,7 @@ PlastikButton::PlastikButton(ButtonType type, PlastikClient *parent, const char // no need to reset here as the button will be resetted on first resize. animTmr = new TQTimer(this); - connect(animTmr, TQT_SIGNAL(timeout() ), this, TQT_SLOT(animate() ) ); + connect(animTmr, TQ_SIGNAL(timeout() ), this, TQ_SLOT(animate() ) ); animProgress = 0; } diff --git a/twin/clients/plastik/plastikbutton.h b/twin/clients/plastik/plastikbutton.h index 6da87100f..6deaa56f6 100644 --- a/twin/clients/plastik/plastikbutton.h +++ b/twin/clients/plastik/plastikbutton.h @@ -65,7 +65,7 @@ private: /** * This class creates bitmaps which can be used as icons on buttons. The icons * are "hardcoded". - * Over the previous "Gimp->xpm->QImage->recolor->SmoothScale->TQPixmap" solution + * Over the previous "Gimp->xpm->TQImage->recolor->SmoothScale->TQPixmap" solution * it has the important advantage that icons are more scalable and at the same * time sharp and not blurred. */ diff --git a/twin/clients/plastik/plastikclient.cpp b/twin/clients/plastik/plastikclient.cpp index 6fa993721..bb2c465a6 100644 --- a/twin/clients/plastik/plastikclient.cpp +++ b/twin/clients/plastik/plastikclient.cpp @@ -394,7 +394,7 @@ TQRect PlastikClient::captionRect() const buttonsLeftWidth() - buttonsRightWidth() - marginLeft - marginRight; - TQ_Alignment a = Handler()->titleAlign(); + TQt::AlignmentFlags a = Handler()->titleAlign(); int tX, tW; // position/width of the title buffer if (caption.width() > titleWidth) { diff --git a/twin/clients/quartz/config/config.cpp b/twin/clients/quartz/config/config.cpp index 70dc87965..f6bd853b1 100644 --- a/twin/clients/quartz/config/config.cpp +++ b/twin/clients/quartz/config/config.cpp @@ -15,7 +15,7 @@ extern "C" { - KDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) + TDE_EXPORT TQObject* allocate_config( TDEConfig* conf, TQWidget* parent ) { return(new QuartzConfig(conf, parent)); } @@ -49,8 +49,8 @@ QuartzConfig::QuartzConfig( TDEConfig* conf, TQWidget* parent ) load( conf ); // Ensure we track user changes properly - connect( cbColorBorder, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) ); - connect( cbExtraSmall, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged()) ); + connect( cbColorBorder, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) ); + connect( cbExtraSmall, TQ_SIGNAL(clicked()), this, TQ_SLOT(slotSelectionChanged()) ); // Make the widgets visible in twindecoration gb->show(); diff --git a/twin/clients/quartz/quartz.cpp b/twin/clients/quartz/quartz.cpp index dff79ff4b..31a0dbcf1 100644 --- a/twin/clients/quartz/quartz.cpp +++ b/twin/clients/quartz/quartz.cpp @@ -783,7 +783,7 @@ void QuartzClient::paintEvent( TQPaintEvent* ) ///////////////////////////////// extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { Quartz::clientHandler = new Quartz::QuartzHandler(); return Quartz::clientHandler; diff --git a/twin/clients/redmond/redmond.cpp b/twin/clients/redmond/redmond.cpp index 6deddeaee..006f19122 100644 --- a/twin/clients/redmond/redmond.cpp +++ b/twin/clients/redmond/redmond.cpp @@ -688,7 +688,7 @@ TQValueList< RedmondDecoFactory::BorderSize > RedmondDecoFactory::borderSizes() } -extern "C" KDE_EXPORT KDecorationFactory *create_factory() +extern "C" TDE_EXPORT KDecorationFactory *create_factory() { return new Redmond::RedmondDecoFactory(); } diff --git a/twin/clients/test/test.cpp b/twin/clients/test/test.cpp index ebfb00df1..113254f98 100644 --- a/twin/clients/test/test.cpp +++ b/twin/clients/test/test.cpp @@ -22,9 +22,9 @@ void Decoration::init() { button = new TQPushButton( widget()); button->show(); - button->setCursor( tqarrowCursor ); + button->setCursor( TQt::arrowCursor ); button->move( 0, 0 ); - connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( closeWindow())); + connect( button, TQ_SIGNAL( clicked()), TQ_SLOT( closeWindow())); TQToolTip::add( button, "Zelva Mana" ); } } @@ -106,7 +106,7 @@ bool Decoration::eventFilter( TQObject* o, TQEvent* e ) { case TQEvent::MouseButtonPress: { // FRAME - processMousePressEvent( TQT_TQMOUSEEVENT( e )); + processMousePressEvent( static_cast<TQMouseEvent*>( e )); return true; } case TQEvent::Show: @@ -333,7 +333,7 @@ bool Factory::reset( unsigned long changed ) extern "C" { -KDE_EXPORT KDecorationFactory *create_factory() +TDE_EXPORT KDecorationFactory *create_factory() { return new KWinTest::Factory(); } diff --git a/twin/clients/web/Web.cpp b/twin/clients/web/Web.cpp index 5c2457e1c..f40dc552b 100644 --- a/twin/clients/web/Web.cpp +++ b/twin/clients/web/Web.cpp @@ -29,7 +29,7 @@ extern "C" { - KDE_EXPORT KDecorationFactory *create_factory() + TDE_EXPORT KDecorationFactory *create_factory() { return new Web::WebFactory(); } |