diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:03:28 +0100 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-03-25 20:03:28 +0100 |
commit | 2ee99ab520931c5efe91123c85ba10064a45e95d (patch) | |
tree | a367666e410de28d0f258aed77b11e17cafb28e4 /deco/baghiraclient.cc | |
parent | cfa36e1a95e82492c17225ff376911abb3688f62 (diff) | |
download | tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'deco/baghiraclient.cc')
-rw-r--r-- | deco/baghiraclient.cc | 570 |
1 files changed, 285 insertions, 285 deletions
diff --git a/deco/baghiraclient.cc b/deco/baghiraclient.cc index 30d6c8d..ca5eb37 100644 --- a/deco/baghiraclient.cc +++ b/deco/baghiraclient.cc @@ -15,16 +15,16 @@ #include <kpixmapeffect.h> #include <kwin.h> #include <kwinmodule.h> -#include <qapplication.h> -#include <qbitmap.h> -#include <qcursor.h> -#include <qdir.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qpainter.h> -#include <qtimer.h> -#include <qtooltip.h> -#include <qsettings.h> +#include <tqapplication.h> +#include <tqbitmap.h> +#include <tqcursor.h> +#include <tqdir.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqpainter.h> +#include <tqtimer.h> +#include <tqtooltip.h> +#include <tqsettings.h> #include <stdio.h> #include <X11/Xatom.h> @@ -78,14 +78,14 @@ static const int MARGIN = 6; bool BaghiraFactory::initialized_ = false; Baghira::TitlebarType BaghiraFactory::effect_[5][2]; -Qt::AlignmentFlags BaghiraFactory::titlealign_; -QColor BaghiraFactory::colors_[5][ ColorTypeCount ][ 2 ]; +TQt::AlignmentFlags BaghiraFactory::titlealign_; +TQColor BaghiraFactory::colors_[5][ ColorTypeCount ][ 2 ]; KPixmap BaghiraFactory::pix_[5][ PixmapTypeCount ][ 2 ][ 2 ]; int BaghiraFactory::bordersize_[5] = {0,0,6,0,0};//{BorderTiny, BorderTiny, BorderVeryHuge}; -QPixmap BaghiraFactory::ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; -QColor BaghiraFactory::brushedMetalColor; -QColor BaghiraFactory::ButtonColor_[ButtonTypeAmount+1]; -QPixmap BaghiraFactory::nostalgia_[5][3][2]; +TQPixmap BaghiraFactory::ButtonPixmap_[5][WindowStateAmount][ButtonTypeAmount][ButtonStateAmount][2]; +TQColor BaghiraFactory::brushedMetalColor; +TQColor BaghiraFactory::ButtonColor_[ButtonTypeAmount+1]; +TQPixmap BaghiraFactory::nostalgia_[5][3][2]; int BaghiraFactory::contrast_; int BaghiraFactory::_3DImpact_[5]; int BaghiraFactory::LineImpact_[5]; @@ -103,63 +103,63 @@ uint BaghiraFactory::defaultMode_; bool BaghiraFactory::drawIcon_[5]; bool BaghiraFactory::tintBrush_; bool BaghiraFactory::showTitle_; -QColor BaghiraFactory::brushTint; +TQColor BaghiraFactory::brushTint; int BaghiraFactory::minimumTitleHeight_; ButtonStyle BaghiraFactory::buttonStyle_[5]; -QBitmap BaghiraFactory::helpMask; -QBitmap BaghiraFactory::jaguarDownMask; -QBitmap BaghiraFactory::jaguarMenuDownMask; -QBitmap BaghiraFactory::jaguarMenuMask; -QBitmap BaghiraFactory::jaguarMask; -QBitmap BaghiraFactory::milkMenuDownMask; -QBitmap BaghiraFactory::milkMenuMask; -QBitmap BaghiraFactory::milkMask; -QBitmap BaghiraFactory::pantherMenuMask; -QBitmap BaghiraFactory::pantherMask; -QBitmap BaghiraFactory::milkDownMask; -QBitmap BaghiraFactory::arrowUp; -QBitmap BaghiraFactory::arrowDown; +TQBitmap BaghiraFactory::helpMask; +TQBitmap BaghiraFactory::jaguarDownMask; +TQBitmap BaghiraFactory::jaguarMenuDownMask; +TQBitmap BaghiraFactory::jaguarMenuMask; +TQBitmap BaghiraFactory::jaguarMask; +TQBitmap BaghiraFactory::milkMenuDownMask; +TQBitmap BaghiraFactory::milkMenuMask; +TQBitmap BaghiraFactory::milkMask; +TQBitmap BaghiraFactory::pantherMenuMask; +TQBitmap BaghiraFactory::pantherMask; +TQBitmap BaghiraFactory::milkDownMask; +TQBitmap BaghiraFactory::arrowUp; +TQBitmap BaghiraFactory::arrowDown; DeMaximizer BaghiraFactory::deMaximizer_; bool BaghiraFactory::fullSpec_; bool BaghiraFactory::noModalDeco_; bool BaghiraFactory::delAppname_; -Atom baghira_deco_design = XInternAtom(qt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); +Atom baghira_deco_design = XInternAtom(tqt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); extern "C" KDecorationFactory* create_factory() { return new Baghira::BaghiraFactory(); } -DeMaximizer::DeMaximizer() : QWidget(0, "deMaximizer", Qt::WType_TopLevel | Qt::WStyle_NoBorder | Qt::WX11BypassWM ) +DeMaximizer::DeMaximizer() : TQWidget(0, "deMaximizer", TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WX11BypassWM ) { client_ = 0L; setFixedSize(16,16); setMouseTracking(TRUE); setAutoMask(TRUE); - move(QApplication::desktop()->availableGeometry().right()-17,QApplication::desktop()->availableGeometry().top()+2); + move(TQApplication::desktop()->availableGeometry().right()-17,TQApplication::desktop()->availableGeometry().top()+2); setBackgroundMode( NoBackground ); -// setBackgroundMode (Qt::X11ParentRelative); -// setPaletteBackgroundColor(Qt::green); +// setBackgroundMode (TQt::X11ParentRelative); +// setPaletteBackgroundColor(TQt::green); } -void DeMaximizer::mouseReleaseEvent( QMouseEvent *) +void DeMaximizer::mouseReleaseEvent( TQMouseEvent *) { hasMouse()?setState(1):setState(0); if (client_) client_->demaxButtonPressed(); } -void DeMaximizer::mousePressEvent ( QMouseEvent *) +void DeMaximizer::mousePressEvent ( TQMouseEvent *) { setState(2); } -void DeMaximizer::enterEvent ( QEvent *) +void DeMaximizer::enterEvent ( TQEvent *) { setState(1); } -void DeMaximizer::leaveEvent ( QEvent *) +void DeMaximizer::leaveEvent ( TQEvent *) { setState(0); } @@ -167,14 +167,14 @@ void DeMaximizer::leaveEvent ( QEvent *) void DeMaximizer::setState(int i) { erase(); - QPainter p(this); + TQPainter p(this); p.drawPixmap(0,0,pixmap[i]); p.end(); } -void DeMaximizer::setPixmap(int i, QImage &image ) +void DeMaximizer::setPixmap(int i, TQImage &image ) { - pixmap[i] = QPixmap(image); + pixmap[i] = TQPixmap(image); } @@ -182,7 +182,7 @@ void DeMaximizer::setClient(BaghiraClient *client) { if (client_) { - QObject::disconnect ( client_, SIGNAL(hide()), this, SLOT(hide()) ); + TQObject::disconnect ( client_, SIGNAL(hide()), this, SLOT(hide()) ); client_ = 0L; } if (client) @@ -199,20 +199,20 @@ void DeMaximizer::setClient(BaghiraClient *client) // ResizeHandle() // --------------- // Constructor -ResizeHandle::ResizeHandle(BaghiraClient * parent) : QWidget(parent->widget(), 0, 0) +ResizeHandle::ResizeHandle(BaghiraClient * parent) : TQWidget(parent->widget(), 0, 0) { if (!parent->widget()) return; client = parent; - setCursor(QCursor(Qt::SizeFDiagCursor)); + setCursor(TQCursor(TQt::SizeFDiagCursor)); setFixedSize(16,16); updateLook(FALSE); WId root, daddy = 0; WId *kids = 0L; uint numKids = 0; - XQueryTree(qt_xdisplay(), parent->windowId(), &root, &daddy, &kids, &numKids); + XQueryTree(tqt_xdisplay(), parent->windowId(), &root, &daddy, &kids, &numKids); if (daddy) - XReparentWindow( qt_xdisplay(), winId(), daddy, 0, 0 ); + XReparentWindow( tqt_xdisplay(), winId(), daddy, 0, 0 ); else return; move(client->width()-2*BaghiraFactory::borderSize(parent->currentStyle)-16,client->height()-client->titleheight_-16); shape(); @@ -223,10 +223,10 @@ ResizeHandle::ResizeHandle(BaghiraClient * parent) : QWidget(parent->widget(), 0 void ResizeHandle::updateLook(bool rp) { - pix = QPixmap(16,16); - QPainter p(&pix); + pix = TQPixmap(16,16); + TQPainter p(&pix); p.fillRect(pix.rect(), BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? BaghiraFactory::BrushedMetalColor().light(110):paletteBackgroundColor()); - p.setPen( BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? Qt::black:paletteForegroundColor() ); + p.setPen( BaghiraFactory::effect(client->currentStyle, client->isActive()) == Baghira::Brushed ? TQt::black:paletteForegroundColor() ); p.drawLine(0,16,16,0); p.drawLine(4,16,16,4); p.drawLine(8,16,16,8); @@ -246,16 +246,16 @@ void ResizeHandle::shape() xrects[ i ].width = i+1; xrects[ i ].height = 1; } - XShapeCombineRectangles( qt_xdisplay(), winId(), ShapeBounding, 0, 0, + XShapeCombineRectangles( tqt_xdisplay(), winId(), ShapeBounding, 0, 0, xrects, 16, ShapeSet, 0 ); delete[] xrects; } -bool ResizeHandle::eventFilter(QObject *obj, QEvent *e) +bool ResizeHandle::eventFilter(TQObject *obj, TQEvent *e) { if ( obj != parent() ) return false; - if ( e->type() == QEvent::Resize) + if ( e->type() == TQEvent::Resize) { if (client->maximizeMode() == BaghiraClient::MaximizeFull) move(client->width() - 16, client->height() - client->titleheight_ - 16); @@ -267,18 +267,18 @@ bool ResizeHandle::eventFilter(QObject *obj, QEvent *e) return FALSE; } -void ResizeHandle::mousePressEvent ( QMouseEvent * ) +void ResizeHandle::mousePressEvent ( TQMouseEvent * ) { client->performWindowOperation(/*Unrestricted*/KDecoration::ResizeOp); } -void ResizeHandle::mouseReleaseEvent ( QMouseEvent * ) +void ResizeHandle::mouseReleaseEvent ( TQMouseEvent * ) { client->performWindowOperation(KDecoration::NoOp); repaint(TRUE); } -void ResizeHandle::paintEvent ( QPaintEvent * ) +void ResizeHandle::paintEvent ( TQPaintEvent * ) { - QPainter p(this); + TQPainter p(this); p.drawPixmap(0,0,pix); } @@ -290,20 +290,20 @@ void ResizeHandle::paintEvent ( QPaintEvent * ) // Constructor BaghiraFactory::BaghiraFactory() { - helpMask = QBitmap( 14, 15, help_bits, true ); - jaguarDownMask = QBitmap( 14, 15, jaguar2_bits, true ); - jaguarMenuDownMask = QBitmap( 20, 15, jaguar_menu_down_bits, true ); - jaguarMenuMask = QBitmap( 20, 15, jaguar_menu_bits, true ); - jaguarMask = QBitmap( 14, 15, jaguar_bits, true ); - milkMenuDownMask = QBitmap( 20, 15, milk_menu_down_bits, true ); - milkMenuMask = QBitmap( 20, 15, milk_menu_bits, true ); - milkMask = QBitmap( 14, 15, milk_bits, true ); - pantherMenuMask = QBitmap( 20, 15, panther_menu_bits, true ); - pantherMask = QBitmap( 14, 15, panther_bits, true ); - milkDownMask = QBitmap( 14, 15, milk_pressed_bits, true ); - arrowUp = QBitmap( 8, 4, arrowUp_bits, true ); + helpMask = TQBitmap( 14, 15, help_bits, true ); + jaguarDownMask = TQBitmap( 14, 15, jaguar2_bits, true ); + jaguarMenuDownMask = TQBitmap( 20, 15, jaguar_menu_down_bits, true ); + jaguarMenuMask = TQBitmap( 20, 15, jaguar_menu_bits, true ); + jaguarMask = TQBitmap( 14, 15, jaguar_bits, true ); + milkMenuDownMask = TQBitmap( 20, 15, milk_menu_down_bits, true ); + milkMenuMask = TQBitmap( 20, 15, milk_menu_bits, true ); + milkMask = TQBitmap( 14, 15, milk_bits, true ); + pantherMenuMask = TQBitmap( 20, 15, panther_menu_bits, true ); + pantherMask = TQBitmap( 14, 15, panther_bits, true ); + milkDownMask = TQBitmap( 14, 15, milk_pressed_bits, true ); + arrowUp = TQBitmap( 8, 4, arrowUp_bits, true ); arrowUp.setMask( arrowUp ); - arrowDown = QBitmap( 8, 4, arrowDown_bits, true ); + arrowDown = TQBitmap( 8, 4, arrowDown_bits, true ); arrowDown.setMask( arrowDown ); readConfig(); createPixmaps(); @@ -335,12 +335,12 @@ KDecoration* BaghiraFactory::createDecoration( KDecorationBridge* b ) { // ------- // Reset the handler. Returns true if decorations need to be remade -QString BaghiraFactory::indexedString(QString s, int i){ - QString result; +TQString BaghiraFactory::indexedString(TQString s, int i){ + TQString result; result.setNum(i+1); result.prepend("_"); result.prepend(s); -// qWarning("%s",result.ascii()); +// tqWarning("%s",result.ascii()); return result; } @@ -368,7 +368,7 @@ bool BaghiraFactory::reset( unsigned long changed ) { unsigned long BaghiraFactory::readConfig() { - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); // KConfig config( "baghirarc" ); // config.setGroup( "Style" ); @@ -378,10 +378,10 @@ unsigned long BaghiraFactory::readConfig() { if (tintBrush_) brushTint.setRgb( config.readNumEntry( "Colors_BrushTint")); - QColor oldcolor; + TQColor oldcolor; unsigned long changed = 0; oldcolor = colors_[3][ Baghira::ColorTitleBar ][ false ]; - colors_[3][ Baghira::ColorTitleBar ][ false ] = qApp->palette().active().background(); + colors_[3][ Baghira::ColorTitleBar ][ false ] = tqApp->palette().active().background(); if ( oldcolor != colors_[3][ Baghira::ColorTitleBar ][ false ] ) changed |= SettingColors; @@ -410,8 +410,8 @@ unsigned long BaghiraFactory::readConfig() { minimumTitleHeight_ = (ButtonStyle) config.readNumEntry( "minimumTitleHeight", 18 ); if ( oldMinTH != minimumTitleHeight_ ) { - QFontMetrics fm(options()->font(true, false)); - TITLESIZE = QMAX(minimumTitleHeight_, fm.height()); + TQFontMetrics fm(options()->font(true, false)); + TITLESIZE = TQMAX(minimumTitleHeight_, fm.height()); changed |= SettingFont; changed |= SettingDecoration; } @@ -431,19 +431,19 @@ unsigned long BaghiraFactory::readConfig() { if ( defaultMode__ != defaultMode_ ) changed |= SettingDecoration; - Qt::AlignmentFlags oldalign = titlealign_; - QString value = config.readEntry( "TitleAlignment", "AlignHCenter" ); + TQt::AlignmentFlags oldalign = titlealign_; + TQString value = config.readEntry( "TitleAlignment", "AlignHCenter" ); showTitle_ = TRUE; if ( value == "AlignLeft" ) - titlealign_ = Qt::AlignLeft; + titlealign_ = TQt::AlignLeft; else if ( value == "AlignHCenter" ) - titlealign_ = Qt::AlignHCenter; + titlealign_ = TQt::AlignHCenter; else if ( value == "AlignRight" ) - titlealign_ = Qt::AlignRight; + titlealign_ = TQt::AlignRight; else if ( value == "noTitle" ) { showTitle_ = FALSE; - titlealign_ = Qt::AlignAuto; + titlealign_ = TQt::AlignAuto; } if ( oldalign != titlealign_ ) changed |= SettingFont; @@ -518,13 +518,13 @@ unsigned long BaghiraFactory::readConfig() { { Baghira::TitlebarType oldeffect = effect_[i][1]; effect_[i][1] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("TitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed); - // qWarning("%d",effect_[i]); + // tqWarning("%d",effect_[i]); if ( oldeffect != effect_[i][1] ) changed |= SettingDecoration; oldeffect = effect_[i][0]; effect_[i][0] = ( Baghira::TitlebarType ) config.readNumEntry( indexedString("inactiveTitleEffect",i), i == 0 ? Baghira::Stipples : (i == 1 || i == 4) ? Baghira::Gradient : Baghira::Brushed); - // qWarning("%d",effect_[i]); + // tqWarning("%d",effect_[i]); if ( oldeffect != effect_[i][0] ) changed |= SettingDecoration; @@ -534,12 +534,12 @@ unsigned long BaghiraFactory::readConfig() { changed |= SettingDecoration; oldcolor = colors_[i][ Baghira::ColorTitleBar ][ false ]; - colors_[i][ Baghira::ColorTitleBar ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor1",i), i == 0 ? QColor(204,214,230).rgb() : i == 1 ? QColor(246,242,246).rgb() : i == 3 ? QColor(200,200,200).rgb() : QColor(230,230,230).rgb())); + colors_[i][ Baghira::ColorTitleBar ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor1",i), i == 0 ? TQColor(204,214,230).rgb() : i == 1 ? TQColor(246,242,246).rgb() : i == 3 ? TQColor(200,200,200).rgb() : TQColor(230,230,230).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ false ] ) changed |= SettingColors; oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ false ]; - colors_[i][ Baghira::ColorTitleBlend ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor2",i), i == 0 ? QColor(194,196,211).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 3 ? QColor(150,150,150).rgb() : QColor(250,250,250).rgb())); + colors_[i][ Baghira::ColorTitleBlend ][ false ].setRgb((unsigned int)config.readNumEntry( indexedString("inactiveColor2",i), i == 0 ? TQColor(194,196,211).rgb() : i == 1 ? TQColor(238,238,238).rgb() : i == 3 ? TQColor(150,150,150).rgb() : TQColor(250,250,250).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ false ] ) changed |= SettingColors; } @@ -556,58 +556,58 @@ unsigned long BaghiraFactory::readConfig() { changed |= SettingDecoration; oldcolor = colors_[i][ Baghira::ColorTitleBar ][ true ]; - colors_[i][ Baghira::ColorTitleBar ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor1",i), i == 0 ? QColor(255,255,255).rgb() : i == 1 ? QColor(238,238,238).rgb() : i == 2 ? QColor(202,202,202).rgb() : i == 3 ? QColor(238,238,238).rgb() : QColor(250,250,250).rgb())); + colors_[i][ Baghira::ColorTitleBar ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor1",i), i == 0 ? TQColor(255,255,255).rgb() : i == 1 ? TQColor(238,238,238).rgb() : i == 2 ? TQColor(202,202,202).rgb() : i == 3 ? TQColor(238,238,238).rgb() : TQColor(250,250,250).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBar ][ true ] ) changed |= SettingColors; oldcolor = colors_[i][ Baghira::ColorTitleBlend ][ true ]; - colors_[i][ Baghira::ColorTitleBlend ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor2",i), i == 0 ? QColor(238,234,238).rgb() : i == 1 ? QColor(205,202,205).rgb() : i == 2 ? QColor(150,150,150).rgb() : i == 3 ? QColor(211,208,211).rgb() : QColor(230,230,230).rgb())); + colors_[i][ Baghira::ColorTitleBlend ][ true ].setRgb((unsigned int)config.readNumEntry( indexedString("activeColor2",i), i == 0 ? TQColor(238,234,238).rgb() : i == 1 ? TQColor(205,202,205).rgb() : i == 2 ? TQColor(150,150,150).rgb() : i == 3 ? TQColor(211,208,211).rgb() : TQColor(230,230,230).rgb())); if ( oldcolor != colors_[i][ Baghira::ColorTitleBlend ][ true ] ) changed |= SettingColors; } oldcolor = ButtonColor_[MinButton]; - ButtonColor_[MinButton].setRgb((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb() )); + ButtonColor_[MinButton].setRgb((unsigned int)config.readNumEntry( "MinButtonColor", TQColor(230,155,40).rgb() )); if ( oldcolor != ButtonColor_[MinButton] ) changed |= SettingColors; oldcolor = ButtonColor_[MaxButton]; - ButtonColor_[MaxButton].setRgb((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb() )); + ButtonColor_[MaxButton].setRgb((unsigned int)config.readNumEntry( "MaxButtonColor", TQColor(121,180,54).rgb() )); if ( oldcolor != ButtonColor_[MaxButton] ) changed |= SettingColors; oldcolor = ButtonColor_[CloseButton]; - ButtonColor_[CloseButton].setRgb((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb() )); + ButtonColor_[CloseButton].setRgb((unsigned int)config.readNumEntry( "CloseButtonColor", TQColor(200,85,70).rgb() )); if ( oldcolor != ButtonColor_[CloseButton] ) changed |= SettingColors; oldcolor = ButtonColor_[StickyButton]; - ButtonColor_[StickyButton].setRgb((unsigned int)config.readNumEntry( "StickyButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[StickyButton].setRgb((unsigned int)config.readNumEntry( "StickyButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[StickyButton] ) changed |= SettingColors; oldcolor = ButtonColor_[AboveBelowButton]; - ButtonColor_[AboveBelowButton].setRgb((unsigned int)config.readNumEntry( "AboveButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[AboveBelowButton].setRgb((unsigned int)config.readNumEntry( "AboveButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[AboveBelowButton] ) changed |= SettingColors; oldcolor = ButtonColor_[ShadeButton]; - ButtonColor_[ShadeButton].setRgb((unsigned int)config.readNumEntry( "ShadeButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[ShadeButton].setRgb((unsigned int)config.readNumEntry( "ShadeButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[ShadeButton] ) changed |= SettingColors; oldcolor = ButtonColor_[MenuButton]; - ButtonColor_[MenuButton].setRgb((unsigned int)config.readNumEntry( "MenuButtonColor", QColor(74,140,242).rgb() )); + ButtonColor_[MenuButton].setRgb((unsigned int)config.readNumEntry( "MenuButtonColor", TQColor(74,140,242).rgb() )); if ( oldcolor != ButtonColor_[MenuButton] ) changed |= SettingColors; oldcolor = ButtonColor_[HelpButton]; - ButtonColor_[HelpButton].setRgb((unsigned int)config.readNumEntry( "HelpButtonColor", QColor(0,0,0).rgb() )); + ButtonColor_[HelpButton].setRgb((unsigned int)config.readNumEntry( "HelpButtonColor", TQColor(0,0,0).rgb() )); if ( oldcolor != ButtonColor_[HelpButton] ) changed |= SettingColors; oldcolor = ButtonColor_[InactiveButton]; - ButtonColor_[InactiveButton].setRgb((unsigned int)config.readNumEntry( "InactiveButtonColor", QColor(255,255,255).rgb() )); + ButtonColor_[InactiveButton].setRgb((unsigned int)config.readNumEntry( "InactiveButtonColor", TQColor(255,255,255).rgb() )); if ( oldcolor != ButtonColor_[InactiveButton] ) changed |= SettingColors; @@ -616,9 +616,9 @@ unsigned long BaghiraFactory::readConfig() { return changed; } -QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const +TQImage* BaghiraFactory::tintGlossy( const TQImage &src, const TQColor &c ) const { - QImage *dest = new QImage( src.width(), src.height(), 32); + TQImage *dest = new TQImage( src.width(), src.height(), 32); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) src.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -634,14 +634,14 @@ QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const int sq = CLAMP((int)((45.0/128.0)*s+55),0,100); // float srcPercent, destPercent; for ( int current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (alpha < 230){ destData[ current ] = data[ current ]; continue; //do not handle translucent parts to not affect blending } - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); if ( current > u3rd || red < 223 ){ SATURATION_COLOR2(sq, red, green, blue, srcR, srcG, srcB) } else { @@ -649,17 +649,17 @@ QImage* BaghiraFactory::tintGlossy( const QImage &src, const QColor &c ) const } // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } -QImage* BaghiraFactory::tintBrush( const QImage &img, const QColor &c ) const +TQImage* BaghiraFactory::tintBrush( const TQImage &img, const TQColor &c ) const { // if ( img.depth() != 32 ) // img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32); + TQImage *dest = new TQImage( img.width(), img.height(), 32); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -674,29 +674,29 @@ QImage* BaghiraFactory::tintBrush( const QImage &img, const QColor &c ) const SATURATION_COLOR(180, 180, 180); COLOR_SPACE(destR, destG, destB); - brushedMetalColor = QColor(destR, destG, destB); + brushedMetalColor = TQColor(destR, destG, destB); // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); - blue = qBlue( data[ current ] ); - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); + alpha = tqAlpha( data[ current ] ); + blue = tqBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); SATURATION_COLOR(red, green, blue); // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } return ( dest ); } void BaghiraFactory::createOS8Buttons(int style){ - QPainter p; - QColor initColor; + TQPainter p; + TQColor initColor; for ( int active = 0; active <= 1; ++active ){ for (int t = 0; t < 3; t++){ - initColor = QColor(color(style, Baghira::ColorTitleBar, active ).dark(100 + t*15)); - nostalgia_[style][t][active] = QPixmap(BUTTONSIZE, BUTTONSIZE); + initColor = TQColor(color(style, Baghira::ColorTitleBar, active ).dark(100 + t*15)); + nostalgia_[style][t][active] = TQPixmap(BUTTONSIZE, BUTTONSIZE); p.begin(&nostalgia_[style][t][active]); p.setPen(color(style, Baghira::ColorTitleBar, active )); p.drawPoint(0,BUTTONSIZE-1); @@ -744,22 +744,22 @@ void BaghiraFactory::createOS8Buttons(int style){ p.drawLine(BUTTONSIZE-1,1,BUTTONSIZE-1,BUTTONSIZE-1); //================================== // black frame - p.setPen(Qt::black); + p.setPen(TQt::black); p.drawRect(1,1,BUTTONSIZE-2,BUTTONSIZE-2); p.end(); } } } -QPixmap &BaghiraFactory::ButtonPixmap( Baghira::WindowState wState, +TQPixmap &BaghiraFactory::ButtonPixmap( Baghira::WindowState wState, Baghira::ButtonType type, Baghira::ButtonState state, int style, bool small ) { return ButtonPixmap_[style][ wState ][ type ][ state ][small]; } -QImage* BaghiraFactory::DecoImage( QPixmap *pix, int x, int y, int width, int height ) { - QPixmap tmpPix( width, height ); +TQImage* BaghiraFactory::DecoImage( TQPixmap *pix, int x, int y, int width, int height ) { + TQPixmap tmpPix( width, height ); bitBlt ( &tmpPix, 0, 0, pix, x, y, width, height ); - QImage *returnImage = new QImage( tmpPix.convertToImage() ); + TQImage *returnImage = new TQImage( tmpPix.convertToImage() ); return returnImage; } @@ -768,11 +768,11 @@ QImage* BaghiraFactory::DecoImage( QPixmap *pix, int x, int y, int width, int he // ---------------- // Create a gradient -void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QColor &dark, Baghira::TitlebarType effect) +void BaghiraFactory::createGradient(KPixmap &pix, const TQColor &light, const TQColor &dark, Baghira::TitlebarType effect) { if (pix.width() == 0) return; - QPainter p; + TQPainter p; switch( effect ){ case Baghira::Stipples: KPixmapEffect::unbalancedGradient(pix, light, light.dark(110), KPixmapEffect::VerticalGradient, 0); @@ -788,7 +788,7 @@ void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QCo { p.begin(&pix); p.fillRect(pix.rect(),light); - QColor mid; + TQColor mid; mid.setRgb((light.red()+2*dark.red())/3,(light.green()+2*dark.green())/3,(light.blue()+2*dark.blue())/3); p.setPen(mid); for( int i = pix.height() - 1; i > 0; i-=4 ) @@ -822,7 +822,7 @@ void BaghiraFactory::createGradient(KPixmap &pix, const QColor &light, const QCo } } -static bool blend( const QImage & upper, const QImage & lower, QImage & output) +static bool blend( const TQImage & upper, const TQImage & lower, TQImage & output) // adopted from kimageeffect::blend - what is not endian safe... { if @@ -886,15 +886,15 @@ static bool blend( const QImage & upper, const QImage & lower, QImage & output) // --------------- // Create all our pixmaps void BaghiraFactory::createPixmaps() { -// QPainter painter; - QColorGroup group; - QPainter icyAPainter; - QImage tmpResult; - QImage tmpResult2; - QImage tmpDeco; - QImage buttonImage; - QImage btnIcons[MenuButton]; - btnIcons[AboveBelowButton] = QImage(); +// TQPainter painter; + TQColorGroup group; + TQPainter icyAPainter; + TQImage tmpResult; + TQImage tmpResult2; + TQImage tmpDeco; + TQImage buttonImage; + TQImage btnIcons[MenuButton]; + btnIcons[AboveBelowButton] = TQImage(); // load icon images - useless for nostalgia style, but i assume they'll be used at least once ;) btnIcons[MinButton] = uic_findImage( "icon_minimize" ); btnIcons[MaxButton] = uic_findImage( "icon_maximize" ); @@ -925,21 +925,21 @@ void BaghiraFactory::createPixmaps() { createGradient( tbar, color(style, Baghira::ColorTitleBar, active ), color(style, Baghira::ColorTitleBlend, active ), effect_[style][active] ); } else if (brushedMode){ - QPixmap brushTile; - QPixmap brushGradient; + TQPixmap brushTile; + TQPixmap brushGradient; if (tintBrush_){ - brushTile = QPixmap(*tintBrush(uic_findImage( "brushed-tile" ), brushTint)); - brushGradient = QPixmap(*tintBrush(uic_findImage( "brushed-gradient" ), brushTint)); + brushTile = TQPixmap(*tintBrush(uic_findImage( "brushed-tile" ), brushTint)); + brushGradient = TQPixmap(*tintBrush(uic_findImage( "brushed-gradient" ), brushTint)); } else{ brushTile = uic_findImage( "brushed-tile" ); brushGradient = uic_findImage( "brushed-gradient" ); - brushedMetalColor = QColor(180,180,180); + brushedMetalColor = TQColor(180,180,180); } // resize pixmap tbar.resize( 256, small ? TITLESIZESMALL : TITLESIZE ); tcenter.resize( 1024, small ? TITLESIZESMALL : TITLESIZE ); - QPainter painter(&tbar); + TQPainter painter(&tbar); painter.drawTiledPixmap( 0,0, tbar.width(), tbar.height(), brushTile ); painter.end(); painter.begin(&tcenter); @@ -947,7 +947,7 @@ void BaghiraFactory::createPixmaps() { } else{ tbar.resize( 32, small ? TITLESIZESMALL : TITLESIZE); - KPixmap tmp = QPixmap(*tintGlossy(uic_findImage( "deco_glossy" ), color(style, Baghira::ColorTitleBar, active ))); + KPixmap tmp = TQPixmap(*tintGlossy(uic_findImage( "deco_glossy" ), color(style, Baghira::ColorTitleBar, active ))); if (tbar.height() > 18){ for (int i = 8; i < tbar.height() - 10; i++){ bitBlt(&tbar, 0, i, &tmp, 0, 8, 32, 1); @@ -975,7 +975,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[bt] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -986,7 +986,7 @@ void BaghiraFactory::createPixmaps() { tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[bt].dark(120)); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); KImageEffect::blendOnLower( xoff, yoff, btnIcons[bt], tmpResult); // must shift as well - ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = TQPixmap( tmpResult ); } @@ -1001,7 +1001,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[HelpButton].dark(120) : ButtonColor_[HelpButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1013,7 +1013,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[InactiveButton] : ButtonColor_[MenuButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } @@ -1022,7 +1022,7 @@ void BaghiraFactory::createPixmaps() { buttonImage = uic_findImage( "button_jaguar_menu_down"); tmpResult2 = *tintGlossy( buttonImage, ButtonColor_[MenuButton].dark(120)); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = TQPixmap( tmpResult ); break; @@ -1041,7 +1041,7 @@ void BaghiraFactory::createPixmaps() { for (int bs = ButtonInactive; bs < Pressed; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); if (bs > ButtonActive) blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -1050,14 +1050,14 @@ void BaghiraFactory::createPixmaps() { for (int bt = MinButton; bt < MenuButton; bt++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); blend( btnIcons[bt], tmpResult, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ Pressed ][small] = TQPixmap( tmpResult ); } // HelpButton buttonImage = uic_findImage( "icon_help"); for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1066,13 +1066,13 @@ void BaghiraFactory::createPixmaps() { buttonImage = uic_findImage( "button_milk_menu"); for (int bs = ButtonInactive; bs < Pressed; bs++){ /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } // pressed MenuButton // as pressed milk buttons differ buttonImage = uic_findImage( "button_milk_menu_down"); /*brushedMode ? blend( buttonImage, tmpDeco, tmpResult ) : */blend( buttonImage, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ Pressed ][small] = TQPixmap( tmpResult ); break; @@ -1088,14 +1088,14 @@ void BaghiraFactory::createPixmaps() { for (int bt = MinButton; bt < ButtonTypeAmount; bt++){ for (int bs = ButtonInactive; bs < ButtonStateAmount; bs++){ if (bs < Hovered) - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][1][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][1][active] ); else if (bs == Hovered) - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][0][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][0][active] ); else - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( nostalgia_[style][2][active] ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( nostalgia_[style][2][active] ); if (bs > ButtonInactive){ icyAPainter.begin(&ButtonPixmap_[style][ active ][ bt ][ bs ][small]); - icyAPainter.setPen(Qt::black); + icyAPainter.setPen(TQt::black); if (bt == MinButton){ icyAPainter.drawLine(2,B_3,BUTTONSIZE - 3,B_3); icyAPainter.drawLine(2,B_6,BUTTONSIZE - 3,B_6); @@ -1109,7 +1109,7 @@ void BaghiraFactory::createPixmaps() { continue; } if (bt == StickyButton){ - icyAPainter.fillRect(BUTTONSIZE/2-1,BUTTONSIZE/2-1,2,2,Qt::black); + icyAPainter.fillRect(BUTTONSIZE/2-1,BUTTONSIZE/2-1,2,2,TQt::black); icyAPainter.end(); continue; } @@ -1121,10 +1121,10 @@ void BaghiraFactory::createPixmaps() { continue; } if (bt == HelpButton){ - QFont tmpFont = QFont(options() ->font( true, false )); + TQFont tmpFont = TQFont(options() ->font( true, false )); tmpFont.setPixelSize(BUTTONSIZE - 4); icyAPainter.setFont(tmpFont); - icyAPainter.drawText( 0, 0, BUTTONSIZE, BUTTONSIZE, Qt::AlignHCenter | Qt::AlignVCenter, "?" ); + icyAPainter.drawText( 0, 0, BUTTONSIZE, BUTTONSIZE, TQt::AlignHCenter | TQt::AlignVCenter, "?" ); icyAPainter.end(); continue; } @@ -1138,7 +1138,7 @@ void BaghiraFactory::createPixmaps() { if (bt == MenuButton){ buttonImage = ButtonPixmap_[style][ active ][ bt ][ bs ][small].convertToImage(); blend( buttonImage , tmpDeco, tmpDeco ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap(tmpDeco); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap(tmpDeco); } } } @@ -1164,7 +1164,7 @@ void BaghiraFactory::createPixmaps() { if (bs > ButtonActive) blend( btnIcons[bt], tmpResult2, tmpResult2 ); if (bt == MaxButton && bs > ButtonInactive) deMaximizer_.setPixmap(bs - 1, tmpResult2); blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ bt ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ bt ][ bs ][small] = TQPixmap( tmpResult ); } } @@ -1180,7 +1180,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[HelpButton].dark(120) : ButtonColor_[HelpButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ HelpButton ][ bs ][small] = TQPixmap( tmpResult ); } tmpDeco = *DecoImage( &tbar, 0, ( tbar.height() - BUTTONSIZE ) / 2, MENUBUTTONWIDTH, BUTTONSIZE ); @@ -1194,7 +1194,7 @@ void BaghiraFactory::createPixmaps() { ButtonColor_[MenuButton].dark(120) : ButtonColor_[MenuButton] ); /*brushedMode ? blend( tmpResult2, tmpDeco, tmpResult ) : */blend( tmpResult2, tmpDeco, tmpResult ); - ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = QPixmap( tmpResult ); + ButtonPixmap_[style][ active ][ MenuButton ][ bs ][small] = TQPixmap( tmpResult ); } } } @@ -1207,8 +1207,8 @@ void BaghiraFactory::createPixmaps() { // ------------- // Return list of valid border sizes -QValueList<BaghiraFactory::BorderSize> BaghiraFactory::borderSizes() const { - return QValueList<BorderSize>() << BorderTiny << BorderNormal +TQValueList<BaghiraFactory::BorderSize> BaghiraFactory::borderSizes() const { + return TQValueList<BorderSize>() << BorderTiny << BorderNormal << BorderLarge << BorderVeryLarge << BorderHuge << BorderVeryHuge; } @@ -1222,11 +1222,11 @@ QValueList<BaghiraFactory::BorderSize> BaghiraFactory::borderSizes() const { // -------------- // Constructor -BaghiraButton::BaghiraButton( BaghiraClient *parent, const char *name, const QString& tip, bool small, ButtonType type, int style ) -: QButton( parent->widget(), name ), client_( parent ), type_( type ), deco_( 0 ), icon_(), small_( small ), lastmouse_( 0 ), mouseover_( false ), _blocked(false) { +BaghiraButton::BaghiraButton( BaghiraClient *parent, const char *name, const TQString& tip, bool small, ButtonType type, int style ) +: TQButton( parent->widget(), name ), client_( parent ), type_( type ), deco_( 0 ), icon_(), small_( small ), lastmouse_( 0 ), mouseover_( false ), _blocked(false) { setBackgroundMode( NoBackground ); setCursor( arrowCursor ); - QToolTip::add( this, tip ); + TQToolTip::add( this, tip ); down_ = false; mouseover_ = false; mask = NULL; @@ -1255,8 +1255,8 @@ BaghiraButton::~BaghiraButton() // ---------- // Return size hint -QSize BaghiraButton::sizeHint() const { - return QSize( BUTTONSIZE, BUTTONSIZE ); +TQSize BaghiraButton::sizeHint() const { + return TQSize( BUTTONSIZE, BUTTONSIZE ); } ////////////////////////////////////////////////////////////////////////////// @@ -1264,19 +1264,19 @@ QSize BaghiraButton::sizeHint() const { // ------------ // Mouse has entered the button -void BaghiraButton::enterEvent( QEvent *e ) { +void BaghiraButton::enterEvent( TQEvent *e ) { #if 0 if (type_ == CloseButton) { _blocked = true; - QTimer::singleShot(250,this,SLOT(delayedEnterEvent())); - QButton::enterEvent( e ); + TQTimer::singleShot(250,this,SLOT(delayedEnterEvent())); + TQButton::enterEvent( e ); return; } #endif mouseover_ = true; repaint( false ); - QButton::enterEvent( e ); + TQButton::enterEvent( e ); } void BaghiraButton::delayedEnterEvent() @@ -1294,13 +1294,13 @@ void BaghiraButton::delayedEnterEvent() // ------------ // Mouse has left the button -void BaghiraButton::leaveEvent( QEvent *e ) +void BaghiraButton::leaveEvent( TQEvent *e ) { mouseover_ = false; if ( type_ == Baghira::MenuButton ) down_ = false; repaint( false ); - QButton::leaveEvent( e ); + TQButton::leaveEvent( e ); } ////////////////////////////////////////////////////////////////////////////// @@ -1308,9 +1308,9 @@ void BaghiraButton::leaveEvent( QEvent *e ) // ----------------- // Button has been pressed -void BaghiraButton::mousePressEvent( QMouseEvent* e ) +void BaghiraButton::mousePressEvent( TQMouseEvent* e ) { - if (_blocked && !(e->state() & Qt::ControlButton)) + if (_blocked && !(e->state() & TQt::ControlButton)) return; lastmouse_ = e->button(); @@ -1327,14 +1327,14 @@ void BaghiraButton::mousePressEvent( QMouseEvent* e ) button = NoButton; // middle & right buttons inappropriate } down_ = true; - QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); repaint( false ); - QButton::mousePressEvent( &me ); + TQButton::mousePressEvent( &me ); } // void BaghiraButton::setOn(bool on) // { -// QButton::setOn(on); +// TQButton::setOn(on); // } ////////////////////////////////////////////////////////////////////////////// @@ -1342,7 +1342,7 @@ void BaghiraButton::mousePressEvent( QMouseEvent* e ) // ----------------- // Button has been released -void BaghiraButton::mouseReleaseEvent( QMouseEvent* e ) { +void BaghiraButton::mouseReleaseEvent( TQMouseEvent* e ) { lastmouse_ = e->button(); if (mask){ @@ -1355,9 +1355,9 @@ void BaghiraButton::mouseReleaseEvent( QMouseEvent* e ) { button = NoButton; // middle & right buttons inappropriate } down_ = false; - QMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), button, e->state() ); repaint( false ); - QButton::mouseReleaseEvent( &me ); + TQButton::mouseReleaseEvent( &me ); } inline ButtonState BaghiraButton::state() { @@ -1376,7 +1376,7 @@ inline ButtonState BaghiraButton::state() { // ------------ // Draw the button -void BaghiraButton::drawButton( QPainter *painter ) { +void BaghiraButton::drawButton( TQPainter *painter ) { if ( !BaghiraFactory::initialized() ) return ; @@ -1400,7 +1400,7 @@ void BaghiraButton::drawButton( QPainter *painter ) { } } -void BaghiraButton::setMasks(QBitmap *bitmask, QBitmap *bitmaskDown){ +void BaghiraButton::setMasks(TQBitmap *bitmask, TQBitmap *bitmaskDown){ clearMask(); mask = bitmask; maskDown = bitmaskDown; @@ -1455,7 +1455,7 @@ void BaghiraClient::init() int format, result; unsigned long n, left; currentStyle = BaghiraFactory::defaultMode(); - result = XGetWindowProperty(qt_xdisplay(), windowId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); + result = XGetWindowProperty(tqt_xdisplay(), windowId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); if (result == Success && data != None) // found set design { memcpy (¤tStyle, data, sizeof (unsigned int)); @@ -1465,11 +1465,11 @@ void BaghiraClient::init() { XClassHint classHint; FILE *file = NULL; - if ( XGetClassHint( qt_xdisplay(), windowId(), &classHint ) ) + if ( XGetClassHint( tqt_xdisplay(), windowId(), &classHint ) ) { - QString tmpString; + TQString tmpString; // overwrite file from bab starter? - don't worry, if there's been one and deleted by the style we've got the X setting (much better as it will take care of all subwindows) - tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + QString( classHint.res_class ).lower(); + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/" + TQString( classHint.res_class ).lower(); if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1478,7 +1478,7 @@ void BaghiraClient::init() } else { - tmpString = QDir::homeDirPath() + "/.baghira/" + QString( classHint.res_class ).lower(); + tmpString = TQDir::homeDirPath() + "/.baghira/" + TQString( classHint.res_class ).lower(); if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1490,7 +1490,7 @@ void BaghiraClient::init() } if (file == NULL) { - QString tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + TQString tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; if( (file = fopen(tmpString.latin1(), "r")) != NULL ) { fscanf(file,"%d\n%d\n", &format, ¤tStyle); @@ -1501,7 +1501,7 @@ void BaghiraClient::init() if (currentStyle > 4) currentStyle = BaghiraFactory::defaultMode(); #else - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); if (config.readBoolEntry( "Design_Default", 1 ) == 2) { @@ -1527,20 +1527,20 @@ void BaghiraClient::init() titleheight_ = TITLESIZE; // setup layout - QVBoxLayout *mainlayout = new QVBoxLayout( widget() ); - QHBoxLayout *titlelayout = new QHBoxLayout(); - windowlayout = new QHBoxLayout(); + TQVBoxLayout *mainlayout = new TQVBoxLayout( widget() ); + TQHBoxLayout *titlelayout = new TQHBoxLayout(); + windowlayout = new TQHBoxLayout(); - titlebar_ = new QSpacerItem( 1, titleheight_, QSizePolicy::Expanding, QSizePolicy::Fixed ); - mainlayout->setResizeMode( QLayout::FreeResize ); + titlebar_ = new TQSpacerItem( 1, titleheight_, TQSizePolicy::Expanding, TQSizePolicy::Fixed ); + mainlayout->setResizeMode( TQLayout::FreeResize ); mainlayout->addLayout( titlelayout ); mainlayout->addLayout( windowlayout ); windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) ); if ( isPreview() ) - windowlayout->addWidget( new QLabel( i18n( "<b><center>Baghira preview</center></b>" ), widget() ) ); + windowlayout->addWidget( new TQLabel( i18n( "<b><center>Baghira preview</center></b>" ), widget() ) ); else - windowlayout->addItem( new QSpacerItem( 0, 18 ) ); + windowlayout->addItem( new TQSpacerItem( 0, 18 ) ); windowlayout->addSpacing( BaghiraFactory::borderSize(currentStyle) ); @@ -1562,12 +1562,12 @@ void BaghiraClient::init() #endif if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed) - HandlePix = QPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); + HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); else if ( BaghiraFactory::bgStipple() ) { - HandlePix = QPixmap( 32, 32); - QPainter painter; - QColor c = widget()->colorGroup().background(); + HandlePix = TQPixmap( 32, 32); + TQPainter painter; + TQColor c = widget()->colorGroup().background(); HandlePix.fill(c); painter.begin( &HandlePix ); painter.setPen( c.dark( 100 + (BaghiraFactory::contrast()/2) ) ); @@ -1587,7 +1587,7 @@ void BaghiraClient::init() } } -QString BaghiraClient::caption() const +TQString BaghiraClient::caption() const { if (!BaghiraFactory::delAppname()) return KDecoration::caption(); @@ -1617,17 +1617,17 @@ QString BaghiraClient::caption() const // ------------ // Add buttons to title layout -void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) +void BaghiraClient::addButtons( TQBoxLayout *layout, const TQString& s ) { if (noDeco_) return; // const unsigned char *bitmap; - QString tip; - QBitmap *m = NULL; - QBitmap *mn = NULL; - QBitmap *mD = NULL; - QBitmap *mnD = NULL; - QBitmap *mH = NULL; + TQString tip; + TQBitmap *m = NULL; + TQBitmap *mn = NULL; + TQBitmap *mD = NULL; + TQBitmap *mnD = NULL; + TQBitmap *mH = NULL; if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ? &BaghiraFactory::pantherMask : @@ -1660,7 +1660,7 @@ void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) mH = &BaghiraFactory::helpMask; } if ( s.length() > 0 ) { -// qWarning("%s",s.ascii()); +// tqWarning("%s",s.ascii()); layout->addSpacing( MARGIN ); excursion = excursion + plusminus * MARGIN; bool buttonAdded; @@ -1812,29 +1812,29 @@ void BaghiraClient::addButtons( QBoxLayout *layout, const QString& s ) // ------------- // Event filter -bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) +bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e ) { if ( obj != widget() ) return false; switch ( e->type() ) { - case QEvent::MouseButtonDblClick: { - mouseDoubleClickEvent( static_cast<QMouseEvent *>( e ) ); + case TQEvent::MouseButtonDblClick: { + mouseDoubleClickEvent( static_cast<TQMouseEvent *>( e ) ); return true; } - case QEvent::MouseButtonPress: { - if (titlebar_->geometry().contains( static_cast<QMouseEvent *>(e)->pos() ) && static_cast<QMouseEvent *>(e)->state() == Qt::ControlButton){ + case TQEvent::MouseButtonPress: { + if (titlebar_->geometry().contains( static_cast<TQMouseEvent *>(e)->pos() ) && static_cast<TQMouseEvent *>(e)->state() == TQt::ControlButton){ currentStyle < 4 ? currentStyle++ : currentStyle = 0; #if KDE_IS_VERSION(3,3,91) unsigned long wmDesign = currentStyle; - XChangeProperty(qt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); + XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); #endif widget()->repaint(); - QBitmap *m = NULL; - QBitmap *mn = NULL; - QBitmap *mD = NULL; - QBitmap *mnD = NULL; - QBitmap *mH = NULL; + TQBitmap *m = NULL; + TQBitmap *mn = NULL; + TQBitmap *mD = NULL; + TQBitmap *mnD = NULL; + TQBitmap *mH = NULL; if (BaghiraFactory::effect(currentStyle, true) == Baghira::Brushed){ m = BaghiraFactory::buttonStyle(currentStyle) == Baghira::Panther ? &BaghiraFactory::pantherMask : @@ -1884,41 +1884,41 @@ bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) return true; } if (BaghiraFactory::allowEasyClosing()){ - if (maximizeMode() == MaximizeFull && isActive() && (leftClose && static_cast<QMouseEvent *>( e )->x() == 0 && static_cast<QMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<QMouseEvent *>( e )->x() == ((QWidget *)obj)->width() -1 && static_cast<QMouseEvent *>( e )->y() == 0)) + if (maximizeMode() == MaximizeFull && isActive() && (leftClose && static_cast<TQMouseEvent *>( e )->x() == 0 && static_cast<TQMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<TQMouseEvent *>( e )->x() == ((TQWidget *)obj)->width() -1 && static_cast<TQMouseEvent *>( e )->y() == 0)) performEasyClose = true; - else processMousePressEvent( static_cast<QMouseEvent *>( e ) ); + else processMousePressEvent( static_cast<TQMouseEvent *>( e ) ); } - else processMousePressEvent( static_cast<QMouseEvent *>( e ) ); + else processMousePressEvent( static_cast<TQMouseEvent *>( e ) ); return true; } - case QEvent::MouseButtonRelease:{ - if (performEasyClose && maximizeMode() == MaximizeFull && (leftClose && static_cast<QMouseEvent *>( e )->x() == 0 && static_cast<QMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<QMouseEvent *>( e )->x() == ((QWidget *)obj)->width() -1 && static_cast<QMouseEvent *>( e )->y() == 0)){ + case TQEvent::MouseButtonRelease:{ + if (performEasyClose && maximizeMode() == MaximizeFull && (leftClose && static_cast<TQMouseEvent *>( e )->x() == 0 && static_cast<TQMouseEvent *>( e )->y() == 0) || (rightClose && static_cast<TQMouseEvent *>( e )->x() == ((TQWidget *)obj)->width() -1 && static_cast<TQMouseEvent *>( e )->y() == 0)){ closeWindow(); performEasyClose = false; return true; } return FALSE; } - case QEvent::Paint: { - paintEvent( static_cast<QPaintEvent *>( e ) ); + case TQEvent::Paint: { + paintEvent( static_cast<TQPaintEvent *>( e ) ); return true; } - case QEvent::Resize: { - resizeEvent( static_cast<QResizeEvent *>( e ) ); + case TQEvent::Resize: { + resizeEvent( static_cast<TQResizeEvent *>( e ) ); return true; } - case QEvent::Show: { + case TQEvent::Show: { #if KDE_IS_VERSION(3,3,91) if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this); #endif - showEvent( static_cast<QShowEvent *>( e ) ); + showEvent( static_cast<TQShowEvent *>( e ) ); return true; } - case QEvent::Hide: { + case TQEvent::Hide: { emit hide(); } - case QEvent::Wheel: { - wheelEvent(static_cast<QWheelEvent *>( e )); + case TQEvent::Wheel: { + wheelEvent(static_cast<TQWheelEvent *>( e )); return true; } default: { @@ -1934,15 +1934,15 @@ bool BaghiraClient::eventFilter( QObject *obj, QEvent *e ) // ----------------------- // Doubleclick on title -void BaghiraClient::mouseDoubleClickEvent( QMouseEvent *e ) +void BaghiraClient::mouseDoubleClickEvent( TQMouseEvent *e ) { if ( titlebar_->geometry().contains( e->pos() ) ) titlebarDblClickOperation(); } -void BaghiraClient::wheelEvent( QWheelEvent *e ) +void BaghiraClient::wheelEvent( TQWheelEvent *e ) { - if (titlebar_->geometry().contains( e->pos() ) && e->state() == Qt::ControlButton){ + if (titlebar_->geometry().contains( e->pos() ) && e->state() == TQt::ControlButton){ // surf through the desktops :) int target, cD; if (e->delta() > 0){ @@ -1961,20 +1961,20 @@ void BaghiraClient::wheelEvent( QWheelEvent *e ) // ------------ // Repaint the window -void BaghiraClient::paintEvent( QPaintEvent* ) +void BaghiraClient::paintEvent( TQPaintEvent* ) { if ( !BaghiraFactory::initialized() || noDeco_) return ; - QPainter painter( widget() ); - QColorGroup group; + TQPainter painter( widget() ); + TQColorGroup group; - QRect title( 0, 0, width(), titlebar_->geometry().height() ); - QRect left( 0, title.height(), BaghiraFactory::borderSize(currentStyle), height() - + TQRect title( 0, 0, width(), titlebar_->geometry().height() ); + TQRect left( 0, title.height(), BaghiraFactory::borderSize(currentStyle), height() - title.height() ); - QRect right( width() - BaghiraFactory::borderSize(currentStyle), title.height(), + TQRect right( width() - BaghiraFactory::borderSize(currentStyle), title.height(), BaghiraFactory::borderSize(currentStyle), height() - title.height() ); - QRect handle( 0, height() - BaghiraFactory::borderSize(currentStyle), + TQRect handle( 0, height() - BaghiraFactory::borderSize(currentStyle), width(), BaghiraFactory::borderSize(currentStyle) ); int x, y, x2, y2, h, w; @@ -2002,7 +2002,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) y2 = title.bottom(); int shapeW = w; - const QColor *ttbar = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive())); + const TQColor *ttbar = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBar, isActive())); int tmp3Dimpact_ = 100 + BaghiraFactory::_3DImpact(currentStyle); @@ -2062,7 +2062,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) } } - const QColor *ttblend = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBlend, isActive())); + const TQColor *ttblend = &(BaghiraFactory::color(currentStyle, Baghira::ColorTitleBlend, isActive())); if (BaghiraFactory::LineImpact(currentStyle) > 0) { @@ -2081,7 +2081,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) BaghiraFactory::drawIcon(currentStyle) ? iconWidth = 16 : iconWidth = 0; if (BaghiraFactory::drawIcon(currentStyle) || BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia) { - QRect textBound = painter.boundingRect ( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() ); + TQRect textBound = painter.boundingRect ( x + 2 * MARGIN + iconWidth, y, w - MARGIN * 2 - iconWidth, h, BaghiraFactory::titleAlign() | AlignVCenter, caption() ); iconLeft = textBound.x() - MARGIN - iconWidth; if ( iconLeft < x + MARGIN ) iconLeft = x + MARGIN; @@ -2089,7 +2089,7 @@ void BaghiraClient::paintEvent( QPaintEvent* ) { ICONX = iconLeft; ICONY = y + ( titleheight_ - 16 ) / 2; - painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) ); + painter.drawPixmap( ICONX, ICONY, icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) ); } if (BaghiraFactory::effect(currentStyle, isActive()) == Baghira::Nostalgia) @@ -2108,13 +2108,13 @@ void BaghiraClient::paintEvent( QPaintEvent* ) iconLeft = x + MARGIN; ICONX = iconLeft; ICONY = y + ( titleheight_ - 16 ) / 2; - painter.drawPixmap( ICONX, ICONY, icon().pixmap( QIconSet::Small, QIconSet::Normal ) ); + painter.drawPixmap( ICONX, ICONY, icon().pixmap( TQIconSet::Small, TQIconSet::Normal ) ); } // draw outer frame if ( !isShade() ) { - QColor background = widget() ->colorGroup().background(); + TQColor background = widget() ->colorGroup().background(); // left side left.rect( &x, &y, &w, &h ); @@ -2258,12 +2258,12 @@ void BaghiraClient::paintEvent( QPaintEvent* ) // ------------- // Window is being resized -void BaghiraClient::resizeEvent( QResizeEvent* ) +void BaghiraClient::resizeEvent( TQResizeEvent* ) { if (noDeco_) return; /*if ( widget() ->isShown() ) { - QRegion region = widget() ->rect(); + TQRegion region = widget() ->rect(); region = region.subtract( titlebar_->geometry() ); widget() ->erase( region ); }*/ @@ -2278,41 +2278,41 @@ void BaghiraClient::resizeEvent( QResizeEvent* ) void BaghiraClient::doShape() { // return; - QRegion mask; + TQRegion mask; if (!(BaghiraFactory::allowEasyClosing() && maximizeMode() == MaximizeFull)){ int r = width(); int b = height() - 1; - mask = QRegion( 0, 0, r, b+1 ); + mask = TQRegion( 0, 0, r, b+1 ); if (BaghiraFactory::shapeUL(currentStyle)){ // Remove top-left corner. - mask -= QRegion( 0, 0, 5, 1 ); - mask -= QRegion( 0, 1, 3, 1 ); - mask -= QRegion( 0, 2, 2, 1 ); - mask -= QRegion( 0, 3, 1, 2 ); + mask -= TQRegion( 0, 0, 5, 1 ); + mask -= TQRegion( 0, 1, 3, 1 ); + mask -= TQRegion( 0, 2, 2, 1 ); + mask -= TQRegion( 0, 3, 1, 2 ); } if (BaghiraFactory::shapeUR(currentStyle)){ // Remove top-right corner. - mask -= QRegion( r - 5, 0, 5, 1 ); - mask -= QRegion( r - 3, 1, 3, 1 ); - mask -= QRegion( r - 2, 2, 2, 1 ); - mask -= QRegion( r - 1, 3, 1, 2 ); + mask -= TQRegion( r - 5, 0, 5, 1 ); + mask -= TQRegion( r - 3, 1, 3, 1 ); + mask -= TQRegion( r - 2, 2, 2, 1 ); + mask -= TQRegion( r - 1, 3, 1, 2 ); } if (BaghiraFactory::shapeLL(currentStyle)){ // Remove bottom-left corner. - mask -= QRegion(0, b-0, 5, 1); - mask -= QRegion(0, b-1, 3, 1); - mask -= QRegion(0, b-2, 2, 1); - mask -= QRegion(0, b-4, 1, 2); + mask -= TQRegion(0, b-0, 5, 1); + mask -= TQRegion(0, b-1, 3, 1); + mask -= TQRegion(0, b-2, 2, 1); + mask -= TQRegion(0, b-4, 1, 2); } if (BaghiraFactory::shapeLR(currentStyle)){ // Remove bottom-right corner. - mask -= QRegion(r - 5, b-0, 5, 1); - mask -= QRegion(r - 3, b-1, 3, 1); - mask -= QRegion(r - 2, b-2, 2, 1); - mask -= QRegion(r - 1, b-4, 1, 2); + mask -= TQRegion(r - 5, b-0, 5, 1); + mask -= TQRegion(r - 3, b-1, 3, 1); + mask -= TQRegion(r - 2, b-2, 2, 1); + mask -= TQRegion(r - 1, b-4, 1, 2); } } setMask( mask, 1 ); @@ -2324,7 +2324,7 @@ void BaghiraClient::doShape() // ----------- // Window is being shown -void BaghiraClient::showEvent( QShowEvent* ) +void BaghiraClient::showEvent( TQShowEvent* ) { if (noDeco_) return; @@ -2408,9 +2408,9 @@ void BaghiraClient::desktopChange() bool d = isOnAllDesktops(); if ( button[ StickyButton ] ) { - QToolTip::remove + TQToolTip::remove ( button[ StickyButton ] ); - QToolTip::add + TQToolTip::add ( button[ StickyButton ], d ? i18n( "Un-Sticky" ) : i18n( "Sticky" ) ); } } @@ -2448,9 +2448,9 @@ void BaghiraClient::maximizeChange() BaghiraFactory::deMaximizer().hide(); } if ( button[ MaxButton ] ) { - QToolTip::remove + TQToolTip::remove ( button[ MaxButton ] ); - QToolTip::add + TQToolTip::add ( button[ MaxButton ], m ? i18n( "Restore" ) : i18n( "Maximize" ) ); } } @@ -2493,7 +2493,7 @@ void BaghiraClient::borders( int &l, int &r, int &t, int &b ) const // -------- // Called to resize the window -void BaghiraClient::resize( const QSize &size ) +void BaghiraClient::resize( const TQSize &size ) { if (noDeco_) return; @@ -2505,9 +2505,9 @@ void BaghiraClient::resize( const QSize &size ) // ------------- // Return the minimum allowable size for this decoration -QSize BaghiraClient::minimumSize() const +TQSize BaghiraClient::minimumSize() const { - return QSize( 100, 60 ); + return TQSize( 100, 60 ); } ////////////////////////////////////////////////////////////////////////////// @@ -2515,7 +2515,7 @@ QSize BaghiraClient::minimumSize() const // --------------- // Return mouse position (for resizing) -KDecoration::Position BaghiraClient::mousePosition( const QPoint &point ) const +KDecoration::Position BaghiraClient::mousePosition( const TQPoint &point ) const { if (noDeco_) return PositionCenter; @@ -2574,7 +2574,7 @@ void BaghiraClient::maxButtonPressed() { void BaghiraClient::menuButtonPressed() { if ( button[ MenuButton ] ) { - QPoint pt( button[ MenuButton ] ->rect().bottomLeft().x(), + TQPoint pt( button[ MenuButton ] ->rect().bottomLeft().x(), button[ MenuButton ] ->rect().bottomLeft().y() + 4 ); KDecorationFactory* f = factory(); showWindowMenu( button[ MenuButton ] ->mapToGlobal( pt ) ); |