diff options
Diffstat (limited to 'twin/clients/keramik')
-rw-r--r-- | twin/clients/keramik/CMakeLists.txt | 4 | ||||
-rw-r--r-- | twin/clients/keramik/Makefile.am | 12 | ||||
-rw-r--r-- | twin/clients/keramik/config/config.cpp | 10 | ||||
-rw-r--r-- | twin/clients/keramik/config/config.h | 2 | ||||
-rw-r--r-- | twin/clients/keramik/embedtool.cpp | 6 | ||||
-rw-r--r-- | twin/clients/keramik/keramik.cpp | 86 | ||||
-rw-r--r-- | twin/clients/keramik/keramik.desktop | 2 | ||||
-rw-r--r-- | twin/clients/keramik/keramik.h | 6 |
8 files changed, 64 insertions, 64 deletions
diff --git a/twin/clients/keramik/CMakeLists.txt b/twin/clients/keramik/CMakeLists.txt index 6eade7074..736d3dc3a 100644 --- a/twin/clients/keramik/CMakeLists.txt +++ b/twin/clients/keramik/CMakeLists.txt @@ -32,12 +32,12 @@ tde_create_translated_desktop( ) -##### twin3_keramik (module) #################### +##### twin_keramik (module) #################### set_source_files_properties( keramik.cpp PROPERTIES OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/tiles.h ) -tde_add_kpart( twin3_keramik AUTOMOC +tde_add_kpart( twin_keramik AUTOMOC SOURCES keramik.cpp LINK tdecorations-shared tdeui-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/twin/clients/keramik/Makefile.am b/twin/clients/keramik/Makefile.am index 2ed77cac7..3fe2162ed 100644 --- a/twin/clients/keramik/Makefile.am +++ b/twin/clients/keramik/Makefile.am @@ -10,13 +10,13 @@ embedtool_SOURCES = embedtool.cpp embedtool_LDADD = $(LIB_TQT) embedtool_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_TQT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -kde_module_LTLIBRARIES = twin3_keramik.la +kde_module_LTLIBRARIES = twin_keramik.la -twin3_keramik_la_SOURCES = keramik.cpp -twin3_keramik_la_COMPILE_FIRST = tiles.h -twin3_keramik_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module -twin3_keramik_la_LIBADD = $(LIB_TDEUI) ../../lib/libtdecorations.la -#twin3_keramik_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_RPATH) $(KDE_MT_LDFLAGS) +twin_keramik_la_SOURCES = keramik.cpp +twin_keramik_la_COMPILE_FIRST = tiles.h +twin_keramik_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module +twin_keramik_la_LIBADD = $(LIB_TDEUI) ../../lib/libtdecorations.la +#twin_keramik_la_LDFLAGS = $(all_libraries) -avoid-version -module $(KDE_RPATH) $(KDE_MT_LDFLAGS) METASOURCES = AUTO noinst_headers = keramik.h tiles.h 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/config/config.h b/twin/clients/keramik/config/config.h index 721248a09..42f3a44e2 100644 --- a/twin/clients/keramik/config/config.h +++ b/twin/clients/keramik/config/config.h @@ -31,7 +31,7 @@ class KeramikConfig: public TQObject { - Q_OBJECT + TQ_OBJECT public: 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 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; diff --git a/twin/clients/keramik/keramik.desktop b/twin/clients/keramik/keramik.desktop index fa51c6ea1..fde07b804 100644 --- a/twin/clients/keramik/keramik.desktop +++ b/twin/clients/keramik/keramik.desktop @@ -1,3 +1,3 @@ [Desktop Entry] Name=Keramik -X-TDE-Library=twin3_keramik +X-TDE-Library=twin_keramik diff --git a/twin/clients/keramik/keramik.h b/twin/clients/keramik/keramik.h index 54639dece..7369b5346 100644 --- a/twin/clients/keramik/keramik.h +++ b/twin/clients/keramik/keramik.h @@ -92,7 +92,7 @@ namespace Keramik { void addWidth (int width, TQPixmap *&pix, bool left, TQPixmap *bottomPix); void addHeight (int height, TQPixmap *&pix); void flip( TQPixmap *&, TQPixmap *& ); - void pretile( TQPixmap *&, int, Qt::Orientation ); + void pretile( TQPixmap *&, int, TQt::Orientation ); TQPixmap *composite( TQImage *, TQImage * ); TQImage *loadImage( const TQString &, const TQColor & ); TQPixmap *loadPixmap( const TQString &, const TQColor & ); @@ -114,7 +114,7 @@ namespace Keramik { class KeramikButton : public TQButton { public: - KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = Qt::LeftButton ); + KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = TQt::LeftButton ); ~KeramikButton(); ButtonState lastButton() const { return lastbutton; } @@ -137,7 +137,7 @@ namespace Keramik { class KeramikClient : public KDecoration { - Q_OBJECT + TQ_OBJECT public: |