diff options
Diffstat (limited to 'kwin/clients/keramik')
-rw-r--r-- | kwin/clients/keramik/config/keramikconfig.ui | 10 | ||||
-rw-r--r-- | kwin/clients/keramik/embedtool.cpp | 20 | ||||
-rw-r--r-- | kwin/clients/keramik/keramik.cpp | 112 | ||||
-rw-r--r-- | kwin/clients/keramik/keramik.h | 8 |
4 files changed, 75 insertions, 75 deletions
diff --git a/kwin/clients/keramik/config/keramikconfig.ui b/kwin/clients/keramik/config/keramikconfig.ui index f074a00b8..f24d15952 100644 --- a/kwin/clients/keramik/config/keramikconfig.ui +++ b/kwin/clients/keramik/config/keramikconfig.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <class>KeramikConfigUI</class> -<widget class="QWidget"> +<widget class="TQWidget"> <property name="name"> <cstring>KeramikConfigUI</cstring> </property> @@ -22,7 +22,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>showAppIcons</cstring> </property> @@ -33,7 +33,7 @@ <string>Check this option if you want the window icon to be displayed in the caption bubble next to the titlebar text.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>smallCaptions</cstring> </property> @@ -44,7 +44,7 @@ <string>Check this option if you want the caption bubble to have the same size on active windows that it has on inactive ones. This option is useful for laptops or low resolution displays where you want maximize the amount of space available to the window contents.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>largeGrabBars</cstring> </property> @@ -55,7 +55,7 @@ <string>Check this option if you want a grab bar to be drawn below windows. When this option is not selected only a thin border will be drawn in its place.</string> </property> </widget> - <widget class="QCheckBox"> + <widget class="TQCheckBox"> <property name="name"> <cstring>useShadowedText</cstring> </property> diff --git a/kwin/clients/keramik/embedtool.cpp b/kwin/clients/keramik/embedtool.cpp index 4f5135a3f..415862842 100644 --- a/kwin/clients/keramik/embedtool.cpp +++ b/kwin/clients/keramik/embedtool.cpp @@ -1,7 +1,7 @@ /* * Keramik KWin embed tool (version 1.0) * - * Copyright (C) 2002 Fredrik Höglund <fredrik@kde.org> + * Copyright (C) 2002 Fredrik H�glund <fredrik@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,13 +60,13 @@ private: KeramikEmbedder::KeramikEmbedder() { - TQDateTime date( TQDateTime::currentDateTime() ); + TQDateTime date( TQDateTime::tqcurrentDateTime() ); TQString datestring( date.toString() ); file = new TQFile( "tiles.h" ); file->open( IO_WriteOnly | IO_Truncate ); - stream.setDevice( file ); + stream.setDevice( TQT_TQIODEVICE(file) ); stream << "/*\n"; stream << " * Generated by embedtool 1.0 on " << datestring << endl; @@ -100,19 +100,19 @@ void KeramikEmbedder::embed( const char *name ) TQString codename( basename ); TQImage image( name ); - codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" ); + codename = codename.tqreplace( TQRegExp("[^a-zA-Z0-9]"), "_" ); stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t"; stream.setf( TQTextStream::hex | TQTextStream::right ); stream.fill( '0' ); int pixels = image.width() * image.height(); - Q_UINT32 *data = reinterpret_cast<Q_UINT32*>( image.bits() ); + TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( image.bits() ); bool hasAlpha = false; for ( int i = 0, j = 0; i < pixels; i++ ) { - if ( qAlpha( *data ) && qAlpha( *data ) != 0xff ) + if ( tqAlpha( *data ) && tqAlpha( *data ) != 0xff ) hasAlpha = true; stream << "0x" << qSetW(8) << *(data++); @@ -174,12 +174,12 @@ void KeramikEmbedder::writeIndex() stream << "\tclass KeramikImageDb {\n"; stream << "\tprivate:\n"; stream << "\t\tstatic KeramikImageDb *m_inst;\n"; - stream << "\t\tQDict<TQImage> *db;\n\n"; + stream << "\t\tTQDict<TQImage> *db;\n\n"; stream << "\t\tKeramikImageDb() {\n"; stream << "\t\t\tdb = new TQDict<TQImage>( " << prime << " );\n"; stream << "\t\t\tdb->setAutoDelete( true );\n\n"; stream << "\t\t\tfor ( int i = 0; i < " << index->count() << "; i++ ) {\n"; - stream << "\t\t\t\tQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; + stream << "\t\t\t\tTQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; stream << "\t\t\t\t\t\timage_db[i].width, image_db[i].height,\n"; stream << "\t\t\t\t\t\t32, NULL, 0, TQImage::LittleEndian );\n\n"; stream << "\t\t\t\tif ( image_db[i].alpha )\n"; @@ -199,8 +199,8 @@ void KeramikEmbedder::writeIndex() stream << "\t\t\tif ( m_inst ) delete m_inst;\n"; stream << "\t\t\tm_inst = NULL;\n"; stream << "\t\t}\n\n"; - stream << "\t\tQImage *image( const TQString &name ) const {\n"; - stream << "\t\t\treturn db->find( name );\n"; + stream << "\t\tTQImage *image( const TQString &name ) const {\n"; + stream << "\t\t\treturn db->tqfind( name );\n"; stream << "\t\t}\n\n"; stream << "\t}; // class KeramikImageDb\n\n"; stream << "\tKeramikImageDb *KeramikImageDb::m_inst = NULL;\n\n"; diff --git a/kwin/clients/keramik/keramik.cpp b/kwin/clients/keramik/keramik.cpp index 48a187098..2d5f111c8 100644 --- a/kwin/clients/keramik/keramik.cpp +++ b/kwin/clients/keramik/keramik.cpp @@ -585,39 +585,39 @@ TQPixmap *KeramikHandler::composite( TQImage *over, TQImage *under ) int width = over->width(), height = over->height(); // Clear the destination image - Q_UINT32 *data = reinterpret_cast<Q_UINT32*>( dest.bits() ); + TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( dest.bits() ); for (int i = 0; i < width * height; i++) *(data++) = 0; // Copy the under image (bottom aligned) to the destination image for (int y1 = height - under->height(), y2 = 0; y1 < height; y1++, y2++ ) { - register Q_UINT32 *dst = reinterpret_cast<Q_UINT32*>( dest.scanLine(y1) ); - register Q_UINT32 *src = reinterpret_cast<Q_UINT32*>( under->scanLine(y2) ); + register TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.scanLine(y1) ); + register TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( under->scanLine(y2) ); for ( int x = 0; x < width; x++ ) *(dst++) = *(src++); } // Blend the over image onto the destination - register Q_UINT32 *dst = reinterpret_cast<Q_UINT32*>( dest.bits() ); - register Q_UINT32 *src = reinterpret_cast<Q_UINT32*>( over->bits() ); + register TQ_UINT32 *dst = reinterpret_cast<TQ_UINT32*>( dest.bits() ); + register TQ_UINT32 *src = reinterpret_cast<TQ_UINT32*>( over->bits() ); for ( int i = 0; i < width * height; i++ ) { - int r1 = qRed( *dst ), g1 = qGreen( *dst ), b1 = qBlue( *dst ); - int r2 = qRed( *src ), g2 = qGreen( *src ), b2 = qBlue( *src ); - int a = qAlpha( *src ); + int r1 = tqRed( *dst ), g1 = tqGreen( *dst ), b1 = tqBlue( *dst ); + int r2 = tqRed( *src ), g2 = tqGreen( *src ), b2 = tqBlue( *src ); + int a = tqAlpha( *src ); if ( a == 0xff ) *dst = *src; else if ( a != 0x00 ) - *dst = qRgba( Q_UINT8( r1 + (((r2 - r1) * a) >> 8) ), - Q_UINT8( g1 + (((g2 - g1) * a) >> 8) ), - Q_UINT8( b1 + (((b2 - b1) * a) >> 8) ), + *dst = tqRgba( TQ_UINT8( r1 + (((r2 - r1) * a) >> 8) ), + TQ_UINT8( g1 + (((g2 - g1) * a) >> 8) ), + TQ_UINT8( b1 + (((b2 - b1) * a) >> 8) ), 0xff ); - else if ( qAlpha(*dst) == 0x00 ) + else if ( tqAlpha(*dst) == 0x00 ) *dst = 0; src++; dst++; @@ -758,13 +758,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( NoButton ) + client( c ), button( btn ), hover( false ), lastbutton( Qt::NoButton ) { realizeButtons = realizeBtns; TQToolTip::add( this, tip ); // FRAME setBackgroundMode( NoBackground ); - setCursor( arrowCursor ); + setCursor( tqarrowCursor ); int size = clientHandler->roundButton()->height(); setFixedSize( size, size ); @@ -783,7 +783,7 @@ void KeramikButton::enterEvent( TQEvent *e ) TQButton::enterEvent( e ); hover = true; - repaint( false ); + tqrepaint( false ); } @@ -792,14 +792,14 @@ void KeramikButton::leaveEvent( TQEvent *e ) TQButton::leaveEvent( e ); hover = false; - repaint( false ); + tqrepaint( false ); } void KeramikButton::mousePressEvent( TQMouseEvent *e ) { lastbutton = e->button(); - TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); TQButton::mousePressEvent( &me ); } @@ -807,7 +807,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)?LeftButton:NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); TQButton::mouseReleaseEvent( &me ); } @@ -831,14 +831,14 @@ void KeramikButton::drawButton( TQPainter *p ) if ( isDown() ) { // Pressed - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(2*size, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(2*size, 0, size, size), pix->rect() ) ); p->translate( TQApplication::reverseLayout() ? -1 : 1, 1 ); } else if ( hover ) // Mouse over - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(size, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(size, 0, size, size), pix->rect() ) ); else // Normal - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(0, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(0, 0, size, size), pix->rect() ) ); // Draw the button deco on the bevel @@ -909,7 +909,7 @@ void KeramikClient::init() connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool ))); connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool ))); - createMainWidget( WStaticContents | WResizeNoErase | WRepaintNoErase ); + createMainWidget( (WFlags)(WStaticContents | WResizeNoErase | WRepaintNoErase) ); widget()->installEventFilter( this ); // Minimize flicker @@ -1013,13 +1013,13 @@ void KeramikClient::reset( unsigned long ) captionBufferDirty = maskDirty = true; - // Only repaint the window if it's visible + // Only tqrepaint the window if it's visible // (i.e. not minimized and on the current desktop) if ( widget()->isVisible() ) { - widget()->repaint( false ); + widget()->tqrepaint( false ); for ( int i = 0; i < NumButtons; i++ ) - if ( button[i] ) button[i]->repaint( false ); + if ( button[i] ) button[i]->tqrepaint( false ); } } @@ -1033,7 +1033,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) // Menu button case 'M' : if ( !button[MenuButton] ) { - button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), LeftButton|RightButton ); + button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), Qt::LeftButton|Qt::RightButton ); connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) ); layout->addWidget( button[MenuButton] ); } @@ -1072,7 +1072,7 @@ 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"), LeftButton|MidButton|RightButton ); + button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), Qt::LeftButton|Qt::MidButton|Qt::RightButton ); connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) ); layout->addWidget( button[MaxButton] ); } @@ -1260,7 +1260,7 @@ void KeramikClient::updateCaptionBuffer() ( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 ); int xpos = QMAX( (captionRect.width() - tw) / 3, 8 ); - TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, + TQRect tr = TQStyle::tqvisualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, captionRect.height() - 4), captionBuffer.rect() ); //p.setPen( Qt::red ); // debug @@ -1269,7 +1269,7 @@ void KeramikClient::updateCaptionBuffer() // Application icon if ( clientHandler->showAppIcons() ) { - TQRect iconRect = TQStyle::visualRect( TQRect(tr.x(), + TQRect iconRect = TQStyle::tqvisualRect( TQRect(tr.x(), 1 + (captionRect.height() - 4 - 16) / 2, 16, 16), tr ); TQRect r( icon->rect() ); r.moveCenter( iconRect.center() ); @@ -1304,7 +1304,7 @@ void KeramikClient::updateCaptionBuffer() { p.translate( TQApplication::reverseLayout() ? -1 : 1, 1 ); //p.setPen( options()->color(ColorTitleBar, active).dark() ); - if (qGray(options()->color(ColorFont, active).rgb()) < 100) + if (tqGray(options()->color(ColorFont, active).rgb()) < 100) p.setPen( TQColor(200,200,200) ); else p.setPen( black ); @@ -1329,7 +1329,7 @@ void KeramikClient::calculateCaptionRect() cw += 16 + 4; // icon width + space cw = QMIN( cw, titlebar->geometry().width() ); - captionRect = TQStyle::visualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY), + captionRect = TQStyle::tqvisualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY), cw, clientHandler->titleBarHeight(largeCaption) ), titlebar->geometry() ); } @@ -1345,7 +1345,7 @@ void KeramikClient::captionChange() captionBufferDirty = true; - widget()->repaint( r | captionRect, false ); + widget()->tqrepaint( r | captionRect, false ); } @@ -1361,7 +1361,7 @@ void KeramikClient::iconChange() activeIcon = inactiveIcon = NULL; captionBufferDirty = true; - widget()->repaint( captionRect, false ); + widget()->tqrepaint( captionRect, false ); } } @@ -1380,10 +1380,10 @@ void KeramikClient::activeChange() captionBufferDirty = true; - widget()->repaint( false ); + widget()->tqrepaint( false ); for ( int i=0; i < NumButtons; i++ ) - if ( button[i] ) button[i]->repaint( false ); + if ( button[i] ) button[i]->tqrepaint( false ); } @@ -1400,7 +1400,7 @@ void KeramikClient::maximizeChange() captionBufferDirty = maskDirty = true; widget()->layout()->activate(); - widget()->repaint( false ); + widget()->tqrepaint( false ); } else if (( maximizeMode() & MaximizeVertical ) == 0 && !largeTitlebar ) { // We've been restored - enlarge the titlebar by 3 pixels topSpacer->changeSize( 10, 4, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); @@ -1410,14 +1410,14 @@ void KeramikClient::maximizeChange() captionBufferDirty = maskDirty = true; widget()->layout()->activate(); - widget()->repaint( false ); + widget()->tqrepaint( false ); } } if ( button[ MaxButton ] ) { TQToolTip::remove( button[ MaxButton ] ); TQToolTip::add( button[ MaxButton ], maximizeMode() == MaximizeFull ? i18n("Restore") : i18n("Maximize") ); - button[ MaxButton ]->repaint(); + button[ MaxButton ]->tqrepaint(); } } @@ -1426,7 +1426,7 @@ void KeramikClient::desktopChange() { if ( button[ OnAllDesktopsButton ] ) { - button[ OnAllDesktopsButton ]->repaint( true ); + button[ OnAllDesktopsButton ]->tqrepaint( true ); TQToolTip::remove( button[ OnAllDesktopsButton ] ); TQToolTip::add( button[ OnAllDesktopsButton ], isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops") ); } @@ -1437,7 +1437,7 @@ void KeramikClient::shadeChange() { if ( button[ ShadeButton ] ) { - button[ ShadeButton ]->repaint( true ); + button[ ShadeButton ]->tqrepaint( true ); TQToolTip::remove( button[ ShadeButton ] ); TQToolTip::add( button[ ShadeButton ], isSetShade() ? i18n("Unshade") : i18n("Shade") ); } @@ -1447,14 +1447,14 @@ void KeramikClient::shadeChange() void KeramikClient::keepAboveChange( bool ) { if ( button[ AboveButton ] ) - button[ AboveButton ]->repaint( true ); + button[ AboveButton ]->tqrepaint( true ); } void KeramikClient::keepBelowChange( bool ) { if ( button[ BelowButton ] ) - button[ BelowButton ]->repaint( true ); + button[ BelowButton ]->tqrepaint( true ); } @@ -1482,21 +1482,21 @@ void KeramikClient::slotMaximize() void KeramikClient::slotAbove() { setKeepAbove( !keepAbove()); - button[ AboveButton ]->repaint( true ); + button[ AboveButton ]->tqrepaint( true ); } void KeramikClient::slotBelow() { setKeepBelow( !keepBelow()); - button[ BelowButton ]->repaint( true ); + button[ BelowButton ]->tqrepaint( true ); } void KeramikClient::slotShade() { setShade( !isSetShade()); - button[ ShadeButton ]->repaint( true ); + button[ ShadeButton ]->tqrepaint( true ); } @@ -1656,15 +1656,15 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) void KeramikClient::mouseDoubleClickEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton - && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) + if ( e->button() == Qt::LeftButton + && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) titlebarDblClickOperation(); } void KeramikClient::wheelEvent( TQWheelEvent *e ) { if (isSetShade() - || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) + || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) titlebarMouseWheelOperation( e->delta()); } @@ -1774,37 +1774,37 @@ void KeramikClient::borders( int& left, int& right, int& top, int& bottom ) cons } -TQSize KeramikClient::minimumSize() const +TQSize KeramikClient::tqminimumSize() const { - return widget()->minimumSize(); + return widget()->tqminimumSize(); } bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) { - if ( o != widget() ) + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()) ) return false; switch ( e->type() ) { case TQEvent::Resize: - resizeEvent( static_cast< TQResizeEvent* >( e ) ); + resizeEvent( TQT_TQRESIZEEVENT( e ) ); return true; case TQEvent::Paint: - paintEvent( static_cast< TQPaintEvent* >( e ) ); + paintEvent( TQT_TQPAINTEVENT( e ) ); return true; case TQEvent::MouseButtonDblClick: - mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ) ); + mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ) ); return true; case TQEvent::MouseButtonPress: - processMousePressEvent( static_cast< TQMouseEvent* >( e ) ); + processMousePressEvent( TQT_TQMOUSEEVENT( e ) ); return true; case TQEvent::Wheel: - wheelEvent( static_cast< TQWheelEvent* >( e )); + wheelEvent( TQT_TQWHEELEVENT( e )); return true; default: diff --git a/kwin/clients/keramik/keramik.h b/kwin/clients/keramik/keramik.h index c90d3509f..e4b1df5f5 100644 --- a/kwin/clients/keramik/keramik.h +++ b/kwin/clients/keramik/keramik.h @@ -2,7 +2,7 @@ * * Keramik KWin client (version 0.8) * - * Copyright (C) 2002 Fredrik Höglund <fredrik@kde.org> + * Copyright (C) 2002 Fredrik H�glund <fredrik@kde.org> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -111,10 +111,10 @@ namespace Keramik { }; // class KeramikHandler class KeramikClient; - class KeramikButton : public QButton + class KeramikButton : public TQButton { public: - KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = LeftButton ); + KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = Qt::LeftButton ); ~KeramikButton(); ButtonState lastButton() const { return lastbutton; } @@ -148,7 +148,7 @@ namespace Keramik { virtual Position mousePosition( const TQPoint& p ) const; virtual void borders( int& left, int& right, int& top, int& bottom ) const; virtual void resize( const TQSize& s ); - virtual TQSize minimumSize() const; + virtual TQSize tqminimumSize() const; virtual bool eventFilter( TQObject* o, TQEvent* e ); virtual void activeChange(); virtual void captionChange(); |