diff options
Diffstat (limited to 'twin/clients/keramik/keramik.cpp')
-rw-r--r-- | twin/clients/keramik/keramik.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/twin/clients/keramik/keramik.cpp b/twin/clients/keramik/keramik.cpp index 82a6aba83..576d2d97b 100644 --- a/twin/clients/keramik/keramik.cpp +++ b/twin/clients/keramik/keramik.cpp @@ -411,18 +411,18 @@ void KeramikHandler::createPixmaps() } // Pretile the center & border tiles for optimal performance - pretile( activeTiles[ CaptionSmallCenter ], 64, Qt::Horizontal ); - pretile( activeTiles[ CaptionLargeCenter ], 64, Qt::Horizontal ); - pretile( activeTiles[ TitleCenter ], 64, Qt::Horizontal ); - pretile( activeTiles[ GrabBarCenter ], 128, Qt::Horizontal ); - pretile( activeTiles[ BorderLeft ], 128, Qt::Vertical ); - pretile( activeTiles[ BorderRight ], 128, Qt::Vertical ); - - pretile( inactiveTiles[ CaptionSmallCenter ], 64, Qt::Horizontal ); - pretile( inactiveTiles[ TitleCenter ], 64, Qt::Horizontal ); - pretile( inactiveTiles[ GrabBarCenter ], 128, Qt::Horizontal ); - pretile( inactiveTiles[ BorderLeft ], 128, Qt::Vertical ); - pretile( inactiveTiles[ BorderRight ], 128, Qt::Vertical ); + pretile( activeTiles[ CaptionSmallCenter ], 64, TQt::Horizontal ); + pretile( activeTiles[ CaptionLargeCenter ], 64, TQt::Horizontal ); + pretile( activeTiles[ TitleCenter ], 64, TQt::Horizontal ); + pretile( activeTiles[ GrabBarCenter ], 128, TQt::Horizontal ); + pretile( activeTiles[ BorderLeft ], 128, TQt::Vertical ); + pretile( activeTiles[ BorderRight ], 128, TQt::Vertical ); + + pretile( inactiveTiles[ CaptionSmallCenter ], 64, TQt::Horizontal ); + pretile( inactiveTiles[ TitleCenter ], 64, TQt::Horizontal ); + pretile( inactiveTiles[ GrabBarCenter ], 128, TQt::Horizontal ); + pretile( inactiveTiles[ BorderLeft ], 128, TQt::Vertical ); + pretile( inactiveTiles[ BorderRight ], 128, TQt::Vertical ); if (heightOffset > 0) { addHeight (heightOffset, activeTiles[TitleLeft]); @@ -541,12 +541,12 @@ void KeramikHandler::flip( TQPixmap *&pix1, TQPixmap *&pix2 ) } -void KeramikHandler::pretile( TQPixmap *&pix, int size, Qt::Orientation dir ) +void KeramikHandler::pretile( TQPixmap *&pix, int size, TQt::Orientation dir ) { TQPixmap *newpix; TQPainter p; - if ( dir == Qt::Horizontal ) + if ( dir == TQt::Horizontal ) newpix = new TQPixmap( size, pix->height() ); else newpix = new TQPixmap( pix->width(), size ); @@ -759,13 +759,13 @@ TQValueList< KeramikHandler::BorderSize > KeramikHandler::borderSizes() const KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, const TQString &tip, const int realizeBtns ) : TQButton( c->widget(), name ), - client( c ), button( btn ), hover( false ), lastbutton( Qt::NoButton ) + client( c ), button( btn ), hover( false ), lastbutton( TQt::NoButton ) { realizeButtons = realizeBtns; TQToolTip::add( this, tip ); // FRAME setBackgroundMode( NoBackground ); - setCursor( tqarrowCursor ); + setCursor( TQt::arrowCursor ); int size = clientHandler->roundButton()->height(); setFixedSize( size, size ); @@ -800,7 +800,7 @@ void KeramikButton::leaveEvent( TQEvent *e ) void KeramikButton::mousePressEvent( TQMouseEvent *e ) { lastbutton = e->button(); - TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?TQt::LeftButton:TQt::NoButton, e->state() ); TQButton::mousePressEvent( &me ); } @@ -808,7 +808,7 @@ void KeramikButton::mousePressEvent( TQMouseEvent *e ) void KeramikButton::mouseReleaseEvent( TQMouseEvent *e ) { lastbutton = e->button(); - TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?TQt::LeftButton:TQt::NoButton, e->state() ); TQButton::mouseReleaseEvent( &me ); } @@ -889,7 +889,7 @@ void KeramikButton::drawButton( TQPainter *p ) deco = NULL; } - p->setPen( Qt::black ); // ### hardcoded color + p->setPen( TQt::black ); // ### hardcoded color p->drawPixmap( (size-17)/2, (size-17)/2, *deco ); } @@ -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 ); @@ -1050,8 +1050,8 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) case 'M' : if (!isModalSystemNotification()) { if ( !button[MenuButton] ) { - button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), Qt::LeftButton|Qt::RightButton ); - connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) ); + button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), TQt::LeftButton|TQt::RightButton ); + 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; @@ -1092,8 +1092,8 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) // Maximize button case 'A' : if ( !button[MaxButton] && isMaximizable() ) { - button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), Qt::LeftButton|Qt::MidButton|Qt::RightButton ); - connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) ); + button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), TQt::LeftButton|TQt::MidButton|TQt::RightButton ); + 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; @@ -1277,7 +1277,7 @@ void KeramikClient::updateCaptionBuffer() TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, captionRect.height() - 4), captionBuffer.rect() ); - //p.setPen( Qt::red ); // debug + //p.setPen( TQt::red ); // debug //p.drawRect( tr ); // debug // Application icon @@ -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 ); @@ -1670,7 +1670,7 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) void KeramikClient::mouseDoubleClickEvent( TQMouseEvent *e ) { - if ( e->button() == Qt::LeftButton + if ( e->button() == TQt::LeftButton && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) titlebarDblClickOperation(); } @@ -1796,29 +1796,29 @@ TQSize KeramikClient::minimumSize() const bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) { - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()) ) + if ( o != widget() ) 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: - 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; |