diff options
author | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
---|---|---|
committer | Slávek Banko <[email protected]> | 2016-03-25 20:03:28 +0100 |
commit | 2ee99ab520931c5efe91123c85ba10064a45e95d (patch) | |
tree | a367666e410de28d0f258aed77b11e17cafb28e4 /style | |
parent | cfa36e1a95e82492c17225ff376911abb3688f62 (diff) | |
download | tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.tar.gz tde-style-baghira-2ee99ab520931c5efe91123c85ba10064a45e95d.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'style')
-rw-r--r-- | style/baghira.cpp | 930 | ||||
-rw-r--r-- | style/baghira.h | 300 | ||||
-rw-r--r-- | style/eventfilter.cpp | 580 | ||||
-rw-r--r-- | style/optionHandler.cpp | 100 | ||||
-rw-r--r-- | style/polish.cpp | 510 | ||||
-rw-r--r-- | style/utils.cpp | 360 |
6 files changed, 1390 insertions, 1390 deletions
diff --git a/style/baghira.cpp b/style/baghira.cpp index bae1611..bb61570 100644 --- a/style/baghira.cpp +++ b/style/baghira.cpp @@ -3,54 +3,54 @@ #include "pixmaps.h" //#include "../deco/baghiradecobuttons.h" -#include <qapplication.h> -#include <qbitmap.h> -#include <qbrush.h> -#include <qbutton.h> -#include <qcleanuphandler.h> -#include <qcolor.h> -#include <qcombobox.h> -//#include <qevent.h> -#include <qfont.h> -#include <qframe.h> -#include <qgroupbox.h> -#include <qheader.h> -#include <qiconset.h> -#include <qimage.h> -#include <qlayout.h> -#include <qlistbox.h> -#include <qlistview.h> -#include <qmenubar.h> -#include <qobject.h> -#include <qobjectlist.h> -#include <qpaintdevice.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpen.h> -#include <qpoint.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -//#include <qrangecontrol.h> -#include <qrect.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qslider.h> -#include <qstring.h> -#include <qstyleplugin.h> -#include <qtabbar.h> -#include <qtabwidget.h> -#include <qvariant.h> +#include <tqapplication.h> +#include <tqbitmap.h> +#include <tqbrush.h> +#include <tqbutton.h> +#include <tqcleanuphandler.h> +#include <tqcolor.h> +#include <tqcombobox.h> +//#include <tqevent.h> +#include <tqfont.h> +#include <tqframe.h> +#include <tqgroupbox.h> +#include <tqheader.h> +#include <tqiconset.h> +#include <tqimage.h> +#include <tqlayout.h> +#include <tqlistbox.h> +#include <tqlistview.h> +#include <tqmenubar.h> +#include <tqobject.h> +#include <tqobjectlist.h> +#include <tqpaintdevice.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpen.h> +#include <tqpoint.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +//#include <tqrangecontrol.h> +#include <tqrect.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqstyleplugin.h> +#include <tqtabbar.h> +#include <tqtabwidget.h> +#include <tqvariant.h> #include <ktoolbar.h> #include <ktoolbarbutton.h> #include <kwordwrap.h> #include "config.h" -#define PRINTDEVICE(p) qWarning("device is %s", (p->device()->devType() == QInternal::Widget) ?\ -"Widget": (p->device()->devType() == QInternal::Pixmap) ?\ -"Pixmap": (p->device()->devType() == QInternal::Printer) ?\ -"Printer": (p->device()->devType() == QInternal::Picture) ?\ -"Picture": (p->device()->devType() == QInternal::UndefinedDevice) ?\ +#define PRINTDEVICE(p) tqWarning("device is %s", (p->device()->devType() == TQInternal::Widget) ?\ +"Widget": (p->device()->devType() == TQInternal::Pixmap) ?\ +"Pixmap": (p->device()->devType() == TQInternal::Printer) ?\ +"Printer": (p->device()->devType() == TQInternal::Picture) ?\ +"Picture": (p->device()->devType() == TQInternal::UndefinedDevice) ?\ "UndefinedDevice": "fuckdevice!" ); #define GCC_VERSION (__GNUC__ * 10000 \ @@ -73,19 +73,19 @@ int OptionHandler::menuOpacity; bool OptionHandler::menuColorButton; bool OptionHandler::shadowText; //color -QColor OptionHandler::customButtonColor, OptionHandler::menuStripeColor_; +TQColor OptionHandler::customButtonColor, OptionHandler::menuStripeColor_; //widgets bool OptionHandler::customWidgetColor; -QColor OptionHandler::customColors[ 10 ]; +TQColor OptionHandler::customColors[ 10 ]; //menu bool OptionHandler::useCustomMenuColor; -QColor OptionHandler::color, OptionHandler::color2, OptionHandler::colorHigh, OptionHandler::fgColor, OptionHandler::fgColorHigh; +TQColor OptionHandler::color, OptionHandler::color2, OptionHandler::colorHigh, OptionHandler::fgColor, OptionHandler::fgColorHigh; //Panel // bool OptionHandler::panelCustom; -// QColor OptionHandler::customPanelColor; +// TQColor OptionHandler::customPanelColor; //incativeButton int OptionHandler::inactiveButtonColor; -QColor OptionHandler::customInactiveButtonColor; +TQColor OptionHandler::customInactiveButtonColor; //Design //stipples @@ -98,7 +98,7 @@ int OptionHandler::shadowDarkness; //istviews; bool OptionHandler::drawDotlines, OptionHandler::useCustomExpanderColor; int OptionHandler::expanderStyle; -QColor OptionHandler::expanderColor, OptionHandler::dotlineColor; +TQColor OptionHandler::expanderColor, OptionHandler::dotlineColor; int OptionHandler::dotlineStyle; //slider bool OptionHandler::squeezesbslider; @@ -117,18 +117,18 @@ int OptionHandler::progressBar; bool OptionHandler::removeKickerBevel; Style OptionHandler::_toolbuttonStyle; bool OptionHandler::drawProgressLabel; -QColor OptionHandler::brushTint; -QColor OptionHandler::aDecoColor1_; -QColor OptionHandler::aDecoColor2_; -QColor OptionHandler::titleColor_[2]; -QColor OptionHandler::titleButtonColor_[3]; +TQColor OptionHandler::brushTint; +TQColor OptionHandler::aDecoColor1_; +TQColor OptionHandler::aDecoColor2_; +TQColor OptionHandler::titleColor_[2]; +TQColor OptionHandler::titleButtonColor_[3]; bool OptionHandler::tintBrush; tabStyle OptionHandler::tabStyle_; unsigned long OptionHandler::wmDesign; bool OptionHandler::animateButton; int OptionHandler::custCols[8]; -QPixmap LiquidStyle::popupBack; +TQPixmap LiquidStyle::popupBack; //============ @@ -137,12 +137,12 @@ class KAccessToolBarButton : public KToolBarButton // to get me access to the toolbbar friend class LiquidStyle; public: - KAccessToolBarButton( QWidget* parent=0, const char* name=0 ) + KAccessToolBarButton( TQWidget* parent=0, const char* name=0 ) : KToolBarButton( parent, name ) {} }; -class LiquidStylePlugin : public QStylePlugin { +class LiquidStylePlugin : public TQStylePlugin { public: LiquidStylePlugin() { ; @@ -151,13 +151,13 @@ class LiquidStylePlugin : public QStylePlugin { ; } - QStringList keys() const { - return ( QStringList() << "Baghira" ); + TQStringList keys() const { + return ( TQStringList() << "Baghira" ); } - QStyle *create( const QString & ); + TQStyle *create( const TQString & ); }; -QStyle *LiquidStylePlugin::create( const QString &s ) { +TQStyle *LiquidStylePlugin::create( const TQString &s ) { if ( s.lower() == "baghira" ) return ( new LiquidStyle() ); return ( 0 ); @@ -174,10 +174,10 @@ static const int rightBorder = 12; LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ) { - QIntDict<ButtonFadeInfo>bfi(31);// assuming 31 btns will be enough - a pointer list would be more accurate, but we need to lookup this every 50ms... - QIntDict<ButtonTile>btnShadowedDict(223);// we need around 10/color, 3 colors/button assuming 10 different colors (e.g. kcalc) - QIntDict<ButtonTile>buttonGlowDict(109); - QIntDict<ButtonTile>buttonDict(331); + TQIntDict<ButtonFadeInfo>bfi(31);// assuming 31 btns will be enough - a pointer list would be more accurate, but we need to lookup this every 50ms... + TQIntDict<ButtonTile>btnShadowedDict(223);// we need around 10/color, 3 colors/button assuming 10 different colors (e.g. kcalc) + TQIntDict<ButtonTile>buttonGlowDict(109); + TQIntDict<ButtonTile>buttonDict(331); headerHoverID = -1; headerSortID = -1; hoveredTabIndex = -1; @@ -206,16 +206,16 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou progAnimShift = 0; prog2AnimShift = 0; sliderAnimShift = 0; - QTimer* timer = new QTimer( this ); + TQTimer* timer = new TQTimer( this ); timer->start(50, false); // if (optionHandler->AnimateProgress()) connect(timer, SIGNAL(timeout()), this, SLOT(updateProgressPos())); activeScroller = NULL; //-------------------------------------- - tooltipPalette = qApp->palette(); - tooltipPalette.setBrush( QColorGroup::Background, QColor( 255, 255, 220 ) ); - tooltipPalette.setBrush( QColorGroup::Foreground, Qt::black ); + tooltipPalette = tqApp->palette(); + tooltipPalette.setBrush( TQColorGroup::Background, TQColor( 255, 255, 220 ) ); + tooltipPalette.setBrush( TQColorGroup::Foreground, TQt::black ); rMatrix.rotate( 90.0 ); lMatrix.rotate( 270.0 ); @@ -232,58 +232,58 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou switch (optionHandler->buttonStyle()) { case Jaguar: - btnBorderImg = new QImage( uic_findImage("button-jaguar") ); - btnShadowImg = new QImage( uic_findImage( "button-shadow" ) ); - buttonGlow = new QImage( uic_findImage( "button-glow" ) ); - combo = new QImage( uic_findImage("combo-jaguar") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + btnBorderImg = new TQImage( uic_findImage("button-jaguar") ); + btnShadowImg = new TQImage( uic_findImage( "button-shadow" ) ); + buttonGlow = new TQImage( uic_findImage( "button-glow" ) ); + combo = new TQImage( uic_findImage("combo-jaguar") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; break; case Panther: case Tiger: - btnBorderImg = new QImage( uic_findImage("button-base") ); - btnShadowImg = new QImage( uic_findImage( "button-shadow" ) ); - buttonGlow = new QImage( uic_findImage( "button-glow" ) ); - combo = new QImage( uic_findImage("combo") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + btnBorderImg = new TQImage( uic_findImage("button-base") ); + btnShadowImg = new TQImage( uic_findImage( "button-shadow" ) ); + buttonGlow = new TQImage( uic_findImage( "button-glow" ) ); + combo = new TQImage( uic_findImage("combo") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; break; case Brushed: btnBorderImg = 0L; btnShadowImg = 0L; buttonGlow = 0L; - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); switch (optionHandler->toolbuttonStyle()) { case Jaguar: - combo = new QImage( uic_findImage("combo-jaguar") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-jaguar") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); break; case Panther: case Tiger: case Brushed: - combo = new QImage( uic_findImage("combo") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); break; case Milk: - combo = new QImage( uic_findImage("combo-milk") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-milk") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); default: break; } break; case Milk: - btnBorderImg = new QImage( uic_findImage("button-milk") ); + btnBorderImg = new TQImage( uic_findImage("button-milk") ); btnShadowImg = 0L; buttonGlow = 0L; - combo = new QImage( uic_findImage("combo-milk") ); - comboShadow = new QImage( uic_findImage( "combo-shadow" ) ); + combo = new TQImage( uic_findImage("combo-milk") ); + comboShadow = new TQImage( uic_findImage( "combo-shadow" ) ); if (optionHandler->toolbuttonStyle() == Brushed || !optionHandler->SmoothListViewHeaders()) - rectbutton = new QImage( uic_findImage( "rectbutton" ) ); + rectbutton = new TQImage( uic_findImage( "rectbutton" ) ); else rectbutton = 0L; default: break; @@ -309,13 +309,13 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou if (optionHandler->style() == Milk) { - slider_top = new QImage( uic_findImage( "sbslider_top-milk" ) ); - slider_btm = new QImage( uic_findImage( "sbslider_btm-milk" ) ); + slider_top = new TQImage( uic_findImage( "sbslider_top-milk" ) ); + slider_btm = new TQImage( uic_findImage( "sbslider_btm-milk" ) ); } else { - slider_top = new QImage( uic_findImage( "sbslider_top" ) ); - slider_btm = new QImage( uic_findImage( "sbslider_btm" ) ); + slider_top = new TQImage( uic_findImage( "sbslider_top" ) ); + slider_btm = new TQImage( uic_findImage( "sbslider_btm" ) ); } if ( slider_top->depth() < 32 ) @@ -326,11 +326,11 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou if (optionHandler->shadowSbSlider()) { - slider_top_shd = new QImage( uic_findImage( "sbslider_top_shd" ) ); + slider_top_shd = new TQImage( uic_findImage( "sbslider_top_shd" ) ); if ( slider_top_shd->depth() < 32 ) * slider_top_shd = slider_top_shd->convertDepth( 32 ); - slider_btm_shd = new QImage( uic_findImage( "sbslider_btm_shd" ) ); + slider_btm_shd = new TQImage( uic_findImage( "sbslider_btm_shd" ) ); if ( slider_btm_shd->depth() < 32 ) * slider_btm_shd = slider_btm_shd->convertDepth( 32 ); } @@ -340,7 +340,7 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou slider_btm_shd = 0L; } - roundFrame = new QImage( uic_findImage( "roundFrame" ) ); + roundFrame = new TQImage( uic_findImage( "roundFrame" ) ); if ( roundFrame->depth() < 32 ) * roundFrame = roundFrame->convertDepth( 32 ); @@ -352,28 +352,28 @@ LiquidStyle::LiquidStyle() : KStyle( AllowMenuTransparency | FilledFrameWorkarou pixmaps[ i ] = NULL; } - sbLeft = new QBitmap( 6, 7, sbarrow_left_bits, true ); + sbLeft = new TQBitmap( 6, 7, sbarrow_left_bits, true ); sbLeft->setMask( *sbLeft ); - sbRight = new QBitmap( 6, 7, sbarrow_right_bits, true ); + sbRight = new TQBitmap( 6, 7, sbarrow_right_bits, true ); sbRight->setMask( *sbRight ); - sbUp = new QBitmap( 7, 6, sbarrow_up_bits, true ); + sbUp = new TQBitmap( 7, 6, sbarrow_up_bits, true ); sbUp->setMask( *sbUp ); - sbDown = new QBitmap( 7, 6, sbarrow_down_bits, true ); + sbDown = new TQBitmap( 7, 6, sbarrow_down_bits, true ); sbDown->setMask( *sbDown ); - checkmark = new QBitmap( 6, 7, checkmark_bits, true ); + checkmark = new TQBitmap( 6, 7, checkmark_bits, true ); checkmark->setMask( *checkmark ); - isKicker = ( qstrcmp( qApp->argv() [ 0 ], "kicker" ) == 0 ) || - ( qstrcmp( qApp->argv() [ 0 ], "appletproxy" ) == 0 ); - isOOO = !qstrcmp( qApp->argv() [ 0 ], "soffice.bin" ); + isKicker = ( qstrcmp( tqApp->argv() [ 0 ], "kicker" ) == 0 ) || + ( qstrcmp( tqApp->argv() [ 0 ], "appletproxy" ) == 0 ); + isOOO = !qstrcmp( tqApp->argv() [ 0 ], "soffice.bin" ); - groupShadow = new QPixmap( 64, 64 ); - QColor c; - optionHandler->custCols[0] != -1 ? c = QColor(optionHandler->custCols[0]) : c= QColor(qApp->palette().color(QPalette::Active, isKicker?QColorGroup::Button:QColorGroup::Background)); + groupShadow = new TQPixmap( 64, 64 ); + TQColor c; + optionHandler->custCols[0] != -1 ? c = TQColor(optionHandler->custCols[0]) : c= TQColor(tqApp->palette().color(TQPalette::Active, isKicker?TQColorGroup::Button:TQColorGroup::Background)); groupShadow->fill( ( c.dark( 100 + optionHandler->ShadowDarkness() ) ).rgb() ); if ( (optionHandler->style() != Brushed) && optionHandler->useBgStipple() ) { - QPainter p; + TQPainter p; p.begin( groupShadow ); p.setPen( c.dark( 100 + optionHandler->ShadowDarkness() + (int)(optionHandler->stippleContrast()/2) ) ); for ( int i = 1; i < 64; i += 4 ) { @@ -468,10 +468,10 @@ inline void LiquidStyle::updateProgressPos() progAnimShift = (progAnimShift + 1) % 20; prog2AnimShift = (prog2AnimShift + 1) % 38; //Update the registered progressbars. - QMap<QWidget*, int>::iterator iter; + TQMap<TQWidget*, int>::iterator iter; for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); iter++) { - if ( !::qt_cast<QProgressBar*>(iter.key()) ) + if ( !::tqt_cast<TQProgressBar*>(iter.key()) ) continue; (iter.key())->repaint(false); } @@ -483,8 +483,8 @@ inline void LiquidStyle::updateSliderPos(){ activeScroller->repaint(false); } -void LiquidStyle::progressBarDestroyed(QObject* obj){ - progAnimWidgets.remove(static_cast<QWidget*>(obj)); +void LiquidStyle::progressBarDestroyed(TQObject* obj){ + progAnimWidgets.remove(static_cast<TQWidget*>(obj)); } bool LiquidStyle::isPlain() const { @@ -492,9 +492,9 @@ bool LiquidStyle::isPlain() const { } -void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, - const QRect &r, const QColorGroup &cg, - SFlags flags, const QStyleOption &opt ) const +void LiquidStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, + const TQRect &r, const TQColorGroup &cg, + SFlags flags, const TQStyleOption &opt ) const { bool down = flags & Style_Down; bool on = flags & Style_On; @@ -504,34 +504,34 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_TabBarBase: { bool isDialog = false; - if (p->device() && p->device()->devType() == QInternal::Widget) + if (p->device() && p->device()->devType() == TQInternal::Widget) { - QWidget *w = (QWidget*)p->device(); - if (w && ::qt_cast<QTabWidget*>(w) && w->children()) + TQWidget *w = (TQWidget*)p->device(); + if (w && ::tqt_cast<TQTabWidget*>(w) && w->children()) { - QObjectListIt it( *w->children() ); // iterate over the buttons - QObject *obj; - QTabBar *tabBar = 0L; + TQObjectListIt it( *w->children() ); // iterate over the buttons + TQObject *obj; + TQTabBar *tabBar = 0L; while ( (obj = it.current()) != 0 ) { ++it; - if (::qt_cast<QTabBar*>(obj)) + if (::tqt_cast<TQTabBar*>(obj)) { - tabBar = (QTabBar*)obj; + tabBar = (TQTabBar*)obj; break; } } if (!tabBar || !tabBar->isVisible()) break; } - isDialog = optionHandler->TabStyle() == Clever && w->topLevelWidget()->inherits("QDialog"); + isDialog = optionHandler->TabStyle() == Clever && w->topLevelWidget()->inherits("TQDialog"); } if (isDialog || optionHandler->TabStyle() == Chooser) { int x = r.x(); int right = r.right(); int bottom = r.bottom(); int y2 = r.y() + 1; - QColor bright( cg.background().dark( 110 ) ); - QColor mid( cg.background().dark( 130 ) ); - QColor dark( cg.background().dark( 150 ) ); + TQColor bright( cg.background().dark( 110 ) ); + TQColor mid( cg.background().dark( 130 ) ); + TQColor dark( cg.background().dark( 150 ) ); p->setPen( dark ); p->drawLine( x + 6, y2, right - 6, y2 ); p->drawPoint(x+3,y2+1);p->drawPoint(x+4,y2+1); @@ -569,11 +569,11 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else { drawCombo( p, cg, cg.button(), r.x()+1, r.y()+1, r.width()-2, r.height()+1, false, false, false, center); - QPen oldPen = p->pen(); + TQPen oldPen = p->pen(); // p->setClipping ( false ); p->setPen( cg.button().dark( 158 ) ); p->drawRect(r); -// p->fillRect(r, Qt::red); +// p->fillRect(r, TQt::red); // p->flush(); p->setPen(oldPen); } @@ -585,10 +585,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, bool sunken = on || down; bool hover = flags & Style_MouseOver; bool focused = flags & Style_HasFocus; - QColor newColor = sunken ? cg.button().dark( 110 ) : hover || focused ? cg.button() : optionHandler->InactiveButtonColor(); + TQColor newColor = sunken ? cg.button().dark( 110 ) : hover || focused ? cg.button() : optionHandler->InactiveButtonColor(); if (optionHandler->AnimateButton() && (sunken || hover || focused)) { - ButtonFadeInfo *bfi_ = /*(::qt_cast<QWidget*>(*/opt.widget()/*))*/ ? bfi[opt.widget()->winId()] : 0L; + ButtonFadeInfo *bfi_ = /*(::tqt_cast<TQWidget*>(*/opt.widget()/*))*/ ? bfi[opt.widget()->winId()] : 0L; if (bfi_) { int index = bfi_->index; @@ -603,7 +603,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else if ( ( r.width() < 21 || r.height() < 25 )) { drawCombo( p, cg, newColor, r.x(), r.y(), r.width(), r.height()+2, sunken, hover, false, center, isHTMLButton ); - QPen oldpen(p->pen()); + TQPen oldpen(p->pen()); p->setPen( newColor.dark(150)); p->drawRect(r.x(), r.y(), r.width(), r.height()); if (sunken) @@ -647,7 +647,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { bool sunken = on || down; bool hover = flags & Style_MouseOver; - QPen oldpen(p->pen()); + TQPen oldpen(p->pen()); if ( isTaskContainer ) // is kicker? { if (optionHandler->SmoothListViewHeaders()) @@ -675,16 +675,16 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } else { - if ( (p->device() && p->device()->devType() == QInternal::Widget) && ::qt_cast<QHeader*>((QWidget*)p->device()) ) + if ( (p->device() && p->device()->devType() == TQInternal::Widget) && ::tqt_cast<TQHeader*>((TQWidget*)p->device()) ) { - QHeader *header = (QHeader*)p->device(); - int id = header->orientation() == Qt::Horizontal ? header->sectionAt( r.x() + 2 + header->offset() ) : header->sectionAt( r.y() + 2 + header->offset() ); + TQHeader *header = (TQHeader*)p->device(); + int id = header->orientation() == TQt::Horizontal ? header->sectionAt( r.x() + 2 + header->offset() ) : header->sectionAt( r.y() + 2 + header->offset() ); hover = ((id != -1) && ((currentHeader == header && id == headerHoverID ) || id == headerSortID)); if (header->mapToIndex(id) == header->count()-1 && (r.bottom() < header->rect().bottom() || r.right() < header->rect().right())) { bool hadClip = p->hasClipping(); p->setClipping( false ); - if (header->orientation() == Qt::Horizontal) + if (header->orientation() == TQt::Horizontal) p->fillRect(r.right()+1, r.y(), header->width()-r.right(), r.height(), cg.base()); else p->fillRect(r.x(), r.bottom()+1, r.width(), header->height()-r.bottom(), cg.base()); @@ -710,9 +710,9 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_ScrollBarAddPage: case PE_ScrollBarSubPage: { - QColor sbBgColor = optionHandler->useCustomColors() ? + TQColor sbBgColor = optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background(); + tqApp->palette().active().background(); bool isActive = optionHandler->ScrollerActive(); bool isHover = currentScrollBar->hasMouse(); @@ -723,10 +723,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, if ( flags & Style_Horizontal ) { int extent = currentScrollBar->height(); - QRect bgR( extent, 0, currentScrollBar->width() - extent * 3 + 1, extent ); + TQRect bgR( extent, 0, currentScrollBar->width() - extent * 3 + 1, extent ); if ( sbBuffer.size() != currentScrollBar->size() ) const_cast<LiquidStyle*>( this )->sbBuffer.resize( currentScrollBar->size() ); - QPainter painter; + TQPainter painter; painter.begin( &sbBuffer ); // pixmaps if (drawSlider) @@ -758,7 +758,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, (isHover || isActive || isOOO) ? *getPixmap( HSBSliderTopActive ) : *getPixmap( HSBSliderTop ) ); // mid part last, as i have to redefine clip section - painter.setClipRect(r.x() + 7 + offset2, r.y() + 1, r.width() - 14 - 2*offset2, 13, QPainter::CoordPainter); + painter.setClipRect(r.x() + 7 + offset2, r.y() + 1, r.width() - 14 - 2*offset2, 13, TQPainter::CoordPainter); painter.drawTiledPixmap( r.x() + 7 + offset2 + ((isHover && !isPressed) ? (sliderAnimShift - 32) : 0), r.y() + 1, r.width() - 14 - 2*offset2 - ((isHover && !isPressed) ? (sliderAnimShift - 32) : 0), 13, isPressed ? *getPixmap( HSBSliderMidPressed ) : (isHover || isActive || isOOO) ? *getPixmap( HSBSliderMidActive ) : @@ -772,11 +772,11 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, else { int extent = currentScrollBar->width(); - QRect bgR( 0, extent, extent, currentScrollBar->height() - extent * 3 + 1 ); + TQRect bgR( 0, extent, extent, currentScrollBar->height() - extent * 3 + 1 ); if ( sbBuffer.size() != currentScrollBar->size() ) const_cast<LiquidStyle*>( this ) -> sbBuffer.resize( currentScrollBar->size() ); - QPainter painter; + TQPainter painter; painter.begin( &sbBuffer ); // set painter to pixelbuffer if (drawSlider) { @@ -809,7 +809,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, (isHover || isActive || isOOO) ? *getPixmap( VSBSliderBtmActive ) : *getPixmap( VSBSliderBtm ) ); // mid part last, as i have to redefine clipping section - painter.setClipRect(r.x() + 1, r.y() + 7+offset2, 13, r.height() - 14 - 2*offset2, QPainter::CoordPainter); + painter.setClipRect(r.x() + 1, r.y() + 7+offset2, 13, r.height() - 14 - 2*offset2, TQPainter::CoordPainter); painter.drawTiledPixmap( r.x() + 1, r.y() + 7 + offset2 - ((isHover && !isPressed) ? sliderAnimShift : 0), 13, r.height() - 14 - 2*offset2 + ((isHover && !isPressed) ? sliderAnimShift : 0), isPressed ? *getPixmap( VSBSliderMidPressed ) : @@ -823,10 +823,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_ScrollBarAddLine: { - QColor c( optionHandler->useCustomColors() ? + TQColor c( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background() ); - QColor pixColor = flags & Style_Down ? qApp->palette().active().button() : c; + tqApp->palette().active().background() ); + TQColor pixColor = flags & Style_Down ? tqApp->palette().active().button() : c; bool drawSlider = currentScrollBar->minValue() < currentScrollBar->maxValue(); @@ -846,18 +846,18 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } if (drawSlider) { - p->setPen( flags & Style_Down ? cg.button() : QColor(85,85,85) ); - p->setBrush( flags & Style_Down ? cg.button() : QColor(85,85,85) ); + p->setPen( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); + p->setBrush( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); p->drawPixmap( r.x() + 4, r.y() + 4, flags & Style_Horizontal ? *sbRight : *sbDown ); } break; } case PE_ScrollBarSubLine: { - QColor c( optionHandler->useCustomColors() ? + TQColor c( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : - qApp->palette().active().background() ); - QColor pixColor = flags & Style_Down ? qApp->palette().active().button() : c; + tqApp->palette().active().background() ); + TQColor pixColor = flags & Style_Down ? tqApp->palette().active().button() : c; bool top = flags & Style_Horizontal ? r.x() == 0 : r.y() == 0; bool drawSlider = currentScrollBar->minValue() < currentScrollBar->maxValue(); @@ -892,8 +892,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } if (drawSlider) { - p->setPen( flags & Style_Down ? cg.button() : QColor(85,85,85) ); - p->setBrush( flags & Style_Down ? cg.button() : QColor(85,85,85) ); + p->setPen( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); + p->setBrush( flags & Style_Down ? cg.button() : TQColor(85,85,85) ); if (currentScrollBar->minValue() < currentScrollBar->maxValue()) p->drawPixmap( r.x() + 4, r.y() + 4, flags & Style_Horizontal ? *sbLeft : *sbUp ); } break; @@ -902,7 +902,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { bool hover = flags & Style_MouseOver; bool pressed = flags & Style_Down; -// bool isMasked = p->device() && p->device() ->devType() == QInternal::Widget && ( ( QWidget * ) p->device() ) ->autoMask(); +// bool isMasked = p->device() && p->device() ->devType() == TQInternal::Widget && ( ( TQWidget * ) p->device() ) ->autoMask(); #if 0 if ( isMasked ) { @@ -937,7 +937,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_IndicatorMask: { - p->fillRect( r, Qt::color1 ); + p->fillRect( r, TQt::color1 ); break; } case PE_ExclusiveIndicator: @@ -964,8 +964,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_Splitter: case PE_DockWindowResizeHandle: { - QPen oldpen(p->pen()); - QBrush oldbrush(p->brush()); + TQPen oldpen(p->pen()); + TQBrush oldbrush(p->brush()); if (highlightWidget == p->device()) { if (flags & Style_Horizontal) @@ -1017,17 +1017,17 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_PanelGroupBox: case PE_GroupBoxFrame: { - QColor bgColor; - QWidget* w = (p->device() && p->device()->devType() == QInternal::Widget) ? - (QWidget*)(p->device()) : 0; - QGroupBox* gb = ::qt_cast<QGroupBox*>(w); + TQColor bgColor; + TQWidget* w = (p->device() && p->device()->devType() == TQInternal::Widget) ? + (TQWidget*)(p->device()) : 0; + TQGroupBox* gb = ::tqt_cast<TQGroupBox*>(w); optionHandler->drawGroupBoxShadow() ? - bgColor = QColor(cg.background().dark( 100 + optionHandler->ShadowDarkness() )) : - bgColor = QColor(cg.background()); - QColor bright( bgColor.dark( 110 ) ); - QColor mid( bgColor.dark( 130 ) ); - QColor dark( bgColor.dark( 150 ) ); + bgColor = TQColor(cg.background().dark( 100 + optionHandler->ShadowDarkness() )) : + bgColor = TQColor(cg.background()); + TQColor bright( bgColor.dark( 110 ) ); + TQColor mid( bgColor.dark( 130 ) ); + TQColor dark( bgColor.dark( 150 ) ); int titleHeight = (gb && !gb->title().isEmpty() && pe == PE_PanelGroupBox) ? p->fontMetrics().height()+(gb->isCheckable()?4:1) : 0; @@ -1045,44 +1045,44 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, if (gb && titleHeight) { bool hadClip = p->hasClipping(); - QRegion oldClip = p->clipRegion(); + TQRegion oldClip = p->clipRegion(); if (gb->parentWidget()) { - const QPixmap *pix = gb->parentWidget()->paletteBackgroundPixmap(); + const TQPixmap *pix = gb->parentWidget()->paletteBackgroundPixmap(); if (optionHandler->drawGroupBoxShadow()) { - QPointArray pa1(3); + TQPointArray pa1(3); pa1.setPoint(0, x,y2); pa1.setPoint(1, x+5,y2); pa1.setPoint(2, x,y2+5); - QPointArray pa2(3); + TQPointArray pa2(3); pa2.setPoint(0, right-5,y2); pa2.setPoint(1, right,y2); pa2.setPoint(2, right,y2+5); - QPointArray pa3(3); + TQPointArray pa3(3); pa3.setPoint(0, right,bottom-5); pa3.setPoint(1, right,bottom); pa3.setPoint(2, right-5,bottom); - QPointArray pa4(3); + TQPointArray pa4(3); pa4.setPoint(0, x+5,bottom); pa4.setPoint(1, x,bottom); pa4.setPoint(2, x,bottom-5); - QRegion reg2(0,0, r.right(), titleHeight); - p->setClipRegion(QRegion(pa1)+QRegion(pa2)+QRegion(pa3)+QRegion(pa4)+reg2); + TQRegion reg2(0,0, r.right(), titleHeight); + p->setClipRegion(TQRegion(pa1)+TQRegion(pa2)+TQRegion(pa3)+TQRegion(pa4)+reg2); } else p->setClipRect(0,0,r.right(),titleHeight); - pix ? p->drawTiledPixmap( QRect( 0, 0, w->width(), w->height()), *pix, w->backgroundOffset()) : p->fillRect(QRect(0, 0, w->width(), w->height()),w->parentWidget()->backgroundBrush()); + pix ? p->drawTiledPixmap( TQRect( 0, 0, w->width(), w->height()), *pix, w->backgroundOffset()) : p->fillRect(TQRect(0, 0, w->width(), w->height()),w->parentWidget()->backgroundBrush()); } if (gb && !gb->isCheckable()) { - QString title = gb->title(); - QFont font( p->font() ); + TQString title = gb->title(); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); - drawItem( p, QRect(10,0,r.width(),titleHeight), ShowPrefix, cg, flags & Style_Enabled, 0, title, -1, &cg.text() ); + drawItem( p, TQRect(10,0,r.width(),titleHeight), ShowPrefix, cg, flags & Style_Enabled, 0, title, -1, &cg.text() ); } p->setClipRegion(oldClip); p->setClipping(hadClip); @@ -1185,12 +1185,12 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { // don't ask bool isDialog = optionHandler->TabStyle() == Clever && - (p->device() && p->device()->devType() == QInternal::Widget)&& - ((QWidget*)p->device())->topLevelWidget()->inherits("QDialog"); + (p->device() && p->device()->devType() == TQInternal::Widget)&& + ((TQWidget*)p->device())->topLevelWidget()->inherits("TQDialog"); - QColor bright( cg.background().dark( 110 ) ); - QColor mid( cg.background().dark( 130 ) ); - QColor dark( cg.background().dark( 150 ) ); + TQColor bright( cg.background().dark( 110 ) ); + TQColor mid( cg.background().dark( 130 ) ); + TQColor dark( cg.background().dark( 150 ) ); int x = r.x(); int right = r.right(); int bottom = r.bottom(); int y2 = r.y(); if (isDialog || optionHandler->TabStyle() == Chooser) { @@ -1238,7 +1238,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_PanelLineEdit: { bool focused = flags & Style_HasFocus; - bool isHTML = p->device() && p->device()->devType() == QInternal::Widget && isHTMLWidget((QWidget*)p->device()); + bool isHTML = p->device() && p->device()->devType() == TQInternal::Widget && isHTMLWidget((TQWidget*)p->device()); drawEditFrame( p, r, cg, isHTML, focused, false); break; } @@ -1246,7 +1246,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { int x, y, w , h; r.rect( &x, &y, &w, &h ); - QColor c( optionHandler->UseCustomMenuColor()? + TQColor c( optionHandler->UseCustomMenuColor()? optionHandler->Color(): optionHandler->MenuColorButton()? optionHandler->buttonColor(): @@ -1269,7 +1269,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, case PE_DockWindowSeparator: { break; //don't draw anything - if (!(p->device() && p->device()->devType() == QInternal::Widget && ::qt_cast<QToolBar*>((QWidget*)p->device()))) + if (!(p->device() && p->device()->devType() == TQInternal::Widget && ::tqt_cast<TQToolBar*>((TQWidget*)p->device()))) { if ( !( flags & Style_Horizontal ) ) { @@ -1295,8 +1295,8 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, bool hover = flags & Style_MouseOver; int x = r.x() + ( r.width() - 7 ) / 2; int y = pe == PE_SpinWidgetDown ? r.y() + 1 : r.bottom() - 7; - QPen oldPen( p->pen() ); - QBrush oldBrush( p->brush() ); + TQPen oldPen( p->pen() ); + TQBrush oldBrush( p->brush() ); p->setPen( sunken ? cg.button() : hover ? cg.mid() : cg.text() ); p->setBrush( sunken ? cg.button() : hover ? cg.mid() : cg.text() ); p->drawPixmap( x, y, pe == PE_SpinWidgetUp ? *sbUp : *sbDown ); @@ -1306,7 +1306,7 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } case PE_CheckMark: { - QPen oldPen( p->pen() ); + TQPen oldPen( p->pen() ); p->setPen( flags & Style_On ? cg.highlightedText() : optionHandler->textColor() ); p->drawPixmap(r.x() + r.width()/2 - 4,r.y() + r.height()/2 - 4,*checkmark); p->setPen( oldPen ); @@ -1316,9 +1316,9 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, { if ( (pe >= PE_ArrowUp && pe <= PE_ArrowLeft ) || pe == PE_HeaderArrow) { - QBrush oldBrush(p->brush()); - QColor tmpC = flags & Style_Enabled ? (flags & Style_Down || flags & Style_Sunken) && pe != PE_HeaderArrow ? cg.light() : cg.buttonText() : cg.mid(); - if (tmpC == Qt::black) tmpC = QColor(85,85,85); + TQBrush oldBrush(p->brush()); + TQColor tmpC = flags & Style_Enabled ? (flags & Style_Down || flags & Style_Sunken) && pe != PE_HeaderArrow ? cg.light() : cg.buttonText() : cg.mid(); + if (tmpC == TQt::black) tmpC = TQColor(85,85,85); p->setBrush(tmpC); int x = r.width() > 7 ? r.x() + r.width()/2 - 4 : r.right() - 7; int y = r.height() > 7 ? r.y() + r.height()/2 - 4 : r.bottom() - 7; @@ -1362,10 +1362,10 @@ void LiquidStyle::drawPrimitive( PrimitiveElement pe, QPainter *p, } // general switch } -void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, - const QWidget* widget, const QRect &r, - const QColorGroup &cg, SFlags flags, - const QStyleOption &opt ) const +void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, + const TQWidget* widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, + const TQStyleOption &opt ) const { switch ( kpe ) { @@ -1376,7 +1376,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, int x, y, w, h; r.rect( &x, &y, &w, &h ); w = (int)((w-3)/2); - QColor c( (optionHandler->style() == Brushed) ? cg.background() : cg.background().dark(120) ); + TQColor c( (optionHandler->style() == Brushed) ? cg.background() : cg.background().dark(120) ); p->setPen(c); p->setBrush(c); for (int i = 0; i < h-3; i += 5 ) @@ -1393,7 +1393,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, int x, y, w, h; r.rect( &x, &y, &w, &h ); w = (int)((w-3)/2); - QColor c( widget->hasMouse() ? cg.button() : cg.background().dark(110) ); + TQColor c( widget->hasMouse() ? cg.button() : cg.background().dark(110) ); p->setPen(c); p->setBrush(c); for (int i = 0; i < h-3; i += 5 ) @@ -1431,8 +1431,8 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, { int x, y, w, h; r.rect( &x, &y, &w, &h ); - if (qstrcmp( qApp->argv() [ 0 ], "kmix" ) == 0) x = x+3; - if ( ( ( const QSlider * ) widget ) ->orientation() == Qt::Horizontal ) + if (qstrcmp( tqApp->argv() [ 0 ], "kmix" ) == 0) x = x+3; + if ( ( ( const TQSlider * ) widget ) ->orientation() == TQt::Horizontal ) { int x2 = x + w - 1; y = y + ( h - 5 ) / 2; @@ -1471,18 +1471,18 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, p->drawPixmap( r.x(), r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)); break; } - if ((( const QSlider * ) widget ) ->orientation() == Qt::Horizontal) + if ((( const TQSlider * ) widget ) ->orientation() == TQt::Horizontal) (widget && widget->height() < 17) ? p->drawPixmap( r.x(), r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)) : p->drawPixmap( r.x(), (optionHandler->style() == Milk) ? r.y() : r.y()+2, *getPixmap( flags & Style_Enabled ? HSlider : HSliderInactive)); else { - bool right = (( const QSlider * ) widget )->tickmarks() == QSlider::NoMarks || (( const QSlider * ) widget )->tickmarks() == QSlider::Right; + bool right = (( const TQSlider * ) widget )->tickmarks() == TQSlider::NoMarks || (( const TQSlider * ) widget )->tickmarks() == TQSlider::Right; (widget && widget->width() < 17) ? p->drawPixmap( r.x()+2, r.y(), *getPixmap( flags & Style_Enabled ? RadioOffHover : RadioOff)) : p->drawPixmap( (optionHandler->style() == Milk) ? r.x() : right ? r.x()+5 : r.x()-3, r.y(), *getPixmap( flags & Style_Enabled ? (right ? VSlider : VSliderAbove) : (right ? VSliderInactive : VSliderAboveInactive))); } break; } case KPE_ListViewExpander: { - p->fillRect(r,Qt::green); + p->fillRect(r,TQt::green); // int radius = ( r.width() - 4 ) / 2; // int centerx = r.x() + r.width() / 2; // int centery = r.y() + r.height() / 2; @@ -1491,7 +1491,7 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, // red = ( cg.dark().red() >> 1 ) + ( cg.base().red() >> 1 ); // green = ( cg.dark().green() >> 1 ) + ( cg.base().green() >> 1 ); // blue = ( cg.dark().blue() >> 1 ) + ( cg.base().blue() >> 1 ); - // QColor blendColor( red, green, blue ); + // TQColor blendColor( red, green, blue ); // // p->setPen( cg.dark() ); // p->drawLine( r.x() + 1, r.y(), r.right() - 1, r.y() ); @@ -1518,10 +1518,10 @@ void LiquidStyle::drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, } } -void LiquidStyle::drawControl( ControlElement element, QPainter *p, - const QWidget *widget, const QRect &r, - const QColorGroup &cg, SFlags flags, - const QStyleOption &opt ) const +void LiquidStyle::drawControl( ControlElement element, TQPainter *p, + const TQWidget *widget, const TQRect &r, + const TQColorGroup &cg, SFlags flags, + const TQStyleOption &opt ) const { switch ( element ) { @@ -1534,30 +1534,30 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } case CE_ProgressBarContents: { -// qWarning("%s - %s,%s : %s,%s",qApp->argv()[0],widget->className(),widget->name(),widget->parentWidget()->className(),widget->parentWidget()->name()); - const QProgressBar *progress = ( const QProgressBar * ) widget; - QRect contentsR( subRect( SR_ProgressBarContents, widget ) ); +// tqWarning("%s - %s,%s : %s,%s",tqApp->argv()[0],widget->className(),widget->name(),widget->parentWidget()->className(),widget->parentWidget()->name()); + const TQProgressBar *progress = ( const TQProgressBar * ) widget; + TQRect contentsR( subRect( SR_ProgressBarContents, widget ) ); double val = progress->progress(); - bool reverse = QApplication::reverseLayout(); + bool reverse = TQApplication::reverseLayout(); val = val / progress->totalSteps(); if ( val > 0.0 ) { - int w = QMIN( contentsR.width(), ( int ) (val * contentsR.width() ) ); + int w = TQMIN( contentsR.width(), ( int ) (val * contentsR.width() ) ); if ( w > 1 ) { int x = contentsR.x(); int y = contentsR.y(); - QRect progressRect; + TQRect progressRect; if (reverse) - progressRect = QRect(x+(contentsR.width()-w), y, w, contentsR.height()+1); + progressRect = TQRect(x+(contentsR.width()-w), y, w, contentsR.height()+1); else - progressRect = QRect(x, y, w, contentsR.height()+1); + progressRect = TQRect(x, y, w, contentsR.height()+1); if (optionHandler->ProgressBar() == liquid) { int x2 = x + w - 1; int y2 = contentsR.bottom(); //Clip to the old rectangle - p->setClipRect(progressRect, QPainter::CoordPainter); + p->setClipRect(progressRect, TQPainter::CoordPainter); //Expand progressRect.setLeft(progressRect.x() - progAnimShift); p->setPen(cg.button().dark(120)); @@ -1567,7 +1567,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->setPen(cg.button().dark(110)); p->drawLine(x2, y, x2, y2); p->drawLine(x, y2, x2, y2); - QPixmap * pix = getPixmap( Progress ); + TQPixmap * pix = getPixmap( Progress ); p->drawTiledPixmap(/*x+1, y+1, w-2, contentsR.height()-2*/progressRect, *pix); } else if (optionHandler->ProgressBar() == baghira) @@ -1579,11 +1579,11 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, ButtonTile *progress2Tile = progress2Dict.find( cg.button().rgb() ); if ( !progress2Tile ) { - QPixmap *pix = getPixmap(progress2); + TQPixmap *pix = getPixmap(progress2); progress2Tile = separateTiles( pix, 0, 15, 38, 1, 0, true); if ( !progress2Tile ) { - qWarning( "Progress tile is NULL!" ); + tqWarning( "Progress tile is NULL!" ); return ; } else @@ -1593,7 +1593,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } } //Clip to the old rectangle - p->setClipRect(progressRect, QPainter::CoordPainter); + p->setClipRect(progressRect, TQPainter::CoordPainter); //Expand progressRect.setLeft(progressRect.x() - 38 + prog2AnimShift); int h; /*x, y, w;*/ @@ -1610,10 +1610,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, }/* case CE_ToolButtonLabel: { - const QToolButton *toolbutton = (const QToolButton *) widget; - QRect rect = r; - Qt::ArrowType arrowType = opt.isDefault() - ? Qt::DownArrow : opt.arrowType(); + const TQToolButton *toolbutton = (const TQToolButton *) widget; + TQRect rect = r; + TQt::ArrowType arrowType = opt.isDefault() + ? TQt::DownArrow : opt.arrowType(); int shiftX = 0; int shiftY = 0; @@ -1627,11 +1627,11 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, PrimitiveElement pe; switch (arrowType) { - case Qt::LeftArrow: pe = PE_ArrowLeft; break; - case Qt::RightArrow: pe = PE_ArrowRight; break; - case Qt::UpArrow: pe = PE_ArrowUp; break; + case TQt::LeftArrow: pe = PE_ArrowLeft; break; + case TQt::RightArrow: pe = PE_ArrowRight; break; + case TQt::UpArrow: pe = PE_ArrowUp; break; default: - case Qt::DownArrow: pe = PE_ArrowDown; break; + case TQt::DownArrow: pe = PE_ArrowDown; break; } rect.moveBy(shiftX, shiftY); @@ -1639,13 +1639,13 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } else { - QColor btext = Qt::black;//(flags & (Style_Down | Style_On)) ? qApp->palette().color(QPalette::Active,QColorGroup::ButtonText) : toolbutton->paletteForegroundColor(); + TQColor btext = TQt::black;//(flags & (Style_Down | Style_On)) ? tqApp->palette().color(TQPalette::Active,TQColorGroup::ButtonText) : toolbutton->paletteForegroundColor(); if (toolbutton->iconSet().isNull() && ! toolbutton->text().isNull() && ! toolbutton->usesTextLabel()) { int alignment = AlignCenter | ShowPrefix; - if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0)) + if (!styleHint(SH_UnderlineAccelerator, widget, TQStyleOption::Default, 0)) alignment |= NoAccel; rect.moveBy(shiftX, shiftY); @@ -1653,36 +1653,36 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, flags & Style_Enabled, 0, toolbutton->text(), toolbutton->text().length(), &btext); } else { - QPixmap pm; - QIconSet::Size size = - toolbutton->usesBigPixmap() ? QIconSet::Large : QIconSet::Small; - QIconSet::State state = - toolbutton->isOn() ? QIconSet::On : QIconSet::Off; - QIconSet::Mode mode; + TQPixmap pm; + TQIconSet::Size size = + toolbutton->usesBigPixmap() ? TQIconSet::Large : TQIconSet::Small; + TQIconSet::State state = + toolbutton->isOn() ? TQIconSet::On : TQIconSet::Off; + TQIconSet::Mode mode; if (! toolbutton->isEnabled()) - mode = QIconSet::Disabled; + mode = TQIconSet::Disabled; else if (flags & (Style_Down | Style_On) || (flags & Style_Raised) && (flags & Style_AutoRaise)) - mode = QIconSet::Active; + mode = TQIconSet::Active; else - mode = QIconSet::Normal; + mode = TQIconSet::Normal; pm = toolbutton->iconSet().pixmap( size, mode, state ); if ( toolbutton->usesTextLabel() ) { p->setFont( toolbutton->font() ); - QRect pr = rect, tr = rect; + TQRect pr = rect, tr = rect; int alignment = ShowPrefix; - if (!styleHint(SH_UnderlineAccelerator, widget, QStyleOption::Default, 0)) + if (!styleHint(SH_UnderlineAccelerator, widget, TQStyleOption::Default, 0)) alignment |= NoAccel; - if ( toolbutton->textPosition() == QToolButton::Under ) + if ( toolbutton->textPosition() == TQToolButton::Under ) { int fh = p->fontMetrics().height(); pr.addCoords( 0, 1, 0, -fh-3 ); tr.addCoords( 0, pr.bottom(), 0, -3 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); alignment |= AlignCenter; } else @@ -1691,7 +1691,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, tr.addCoords( pr.right(), 0, 0, 0 ); pr.moveBy(shiftX, shiftY); - drawItem( p, pr, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, pr, AlignCenter, cg, TRUE, &pm, TQString::null ); alignment |= AlignLeft | AlignVCenter; } @@ -1703,7 +1703,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else { rect.moveBy(shiftX, shiftY); - drawItem( p, rect, AlignCenter, cg, TRUE, &pm, QString::null ); + drawItem( p, rect, AlignCenter, cg, TRUE, &pm, TQString::null ); } } } @@ -1714,42 +1714,42 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, /* case CE_HeaderLabel: { - QRect rect = r; - const QHeader* header = (const QHeader *) widget; + TQRect rect = r; + const TQHeader* header = (const TQHeader *) widget; int section = opt.headerSection(); - QIconSet* icon = header->iconSet( section ); + TQIconSet* icon = header->iconSet( section ); if ( icon ) { - QPixmap pixmap = icon->pixmap( QIconSet::Small, + TQPixmap pixmap = icon->pixmap( TQIconSet::Small, flags & Style_Enabled ? - QIconSet::Normal : QIconSet::Disabled ); + TQIconSet::Normal : TQIconSet::Disabled ); int pixw = pixmap.width(); int pixh = pixmap.height(); // "pixh - 1" because of tricky integer division - QRect pixRect = rect; + TQRect pixRect = rect; pixRect.setY( rect.center().y() - (pixh - 1) / 2 ); drawItem ( p, pixRect, AlignVCenter, cg, flags & Style_Enabled, - &pixmap, QString::null ); + &pixmap, TQString::null ); rect.setLeft( rect.left() + pixw + 2 ); } drawItem ( p, rect, AlignVCenter, cg, flags & Style_Enabled, - 0, header->label( section ), -1, (isTaskContainer && (flags & Style_MouseOver)) ? &(qApp->palette().color(QPalette::Active,QColorGroup::ButtonText)) : &(cg.buttonText()) ); + 0, header->label( section ), -1, (isTaskContainer && (flags & Style_MouseOver)) ? &(tqApp->palette().color(TQPalette::Active,TQColorGroup::ButtonText)) : &(cg.buttonText()) ); break; }*/ case CE_ProgressBarLabel: { if (optionHandler->DrawProgressLabel()) { - QRect contentsR( subRect( SR_ProgressBarContents, widget ) ); + TQRect contentsR( subRect( SR_ProgressBarContents, widget ) ); if ( !contentsR.isValid() ) return ; - QFont font( p->font() ); + TQFont font( p->font() ); font.setBold( true ); p->setFont( font ); p->setPen( widget->colorGroup().buttonText() ); - p->setClipRect(r, QPainter::CoordPainter); - p->drawText( contentsR, AlignCenter, ( ( const QProgressBar * ) widget ) ->progressString() ); + p->setClipRect(r, TQPainter::CoordPainter); + p->drawText( contentsR, AlignCenter, ( ( const TQProgressBar * ) widget ) ->progressString() ); } break; } @@ -1757,7 +1757,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { // new style with tiled pixmaps if ( !widget || !widget->parentWidget(true) ) break; - const QTabBar *tabBar = ( const QTabBar * ) widget; + const TQTabBar *tabBar = ( const TQTabBar * ) widget; bool selected = flags & Style_Selected; bool hover = currentTabBar && currentTabBar == tabBar && tabBar->indexOf(opt.tab()->identifier()) == hoveredTabIndex; @@ -1771,7 +1771,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else pos = center; - QColor c; + TQColor c; if (hover || selected) { if (optionHandler->useCustomColors()) @@ -1787,14 +1787,14 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, c = optionHandler->InactiveButtonColor(); } - bool isDialog = optionHandler->TabStyle() == Clever && widget->topLevelWidget()->inherits("QDialog"); + bool isDialog = optionHandler->TabStyle() == Clever && widget->topLevelWidget()->inherits("TQDialog"); if (isDialog || optionHandler->TabStyle() == Chooser) drawCombo( p, cg, c, r.x(), r.y(), r.width(), r.height(), false, false, false, pos ); else { LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); - bool above = tabBar->shape() == QTabBar::RoundedAbove || tabBar->shape() == QTabBar::TriangularAbove; - QPixmap *pix; + bool above = tabBar->shape() == TQTabBar::RoundedAbove || tabBar->shape() == TQTabBar::TriangularAbove; + TQPixmap *pix; if (above) pix = selected ? getPixmap( TabDown ) : getPixmap( Tab ); else @@ -1804,7 +1804,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, tabTile = separateTiles( pix, 9, 15, 67, 1, 0, false); if ( !tabTile ) { - qWarning( "Tab tile is NULL!" ); + tqWarning( "Tab tile is NULL!" ); return ; } else @@ -1850,38 +1850,38 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { if ( opt.isDefault() ) return ; - QTab *t = opt.tab(); - const QTabBar * tb = ( const QTabBar * ) widget; + TQTab *t = opt.tab(); + const TQTabBar * tb = ( const TQTabBar * ) widget; if ( ( tb->currentTab() != t->identifier() )) { if (optionHandler->TabStyle() == TrueTab || - (optionHandler->TabStyle() == Clever && !(widget->topLevelWidget()->inherits("QDialog")))) + (optionHandler->TabStyle() == Clever && !(widget->topLevelWidget()->inherits("TQDialog")))) { - drawItem( p, QRect( r.x(), r.y() + 1, r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y() + 1, r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } - drawItem( p, QRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } - drawItem( p, QRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); + drawItem( p, TQRect( r.x(), r.y(), r.width(), r.height() ), AlignCenter | ShowPrefix, cg, flags & Style_Enabled, 0, t->text(), -1/*, &cg.text()*/ ); break; } case CE_PushButton: { // if (_htmlWidgetWId == widget->winId()) // return; - QPushButton *btn = ( QPushButton* ) widget; + TQPushButton *btn = ( TQPushButton* ) widget; const_cast<LiquidStyle*>( this ) ->isHTMLButton = isHTMLWidget( btn ); ButtonFadeInfo *bfi_ = bfi[btn->winId()]; if ( widget == highlightWidget || (bfi_ && !bfi_->fadeIn) ) flags |= Style_MouseOver; if (btn->isDefault()) flags |= Style_HasFocus; - // Qt messes this up with WindowOrigin, so we do it ourselves :P + // TQt messes this up with WindowOrigin, so we do it ourselves :P if ( !isPlain() && !btn->autoMask() ) const_cast<LiquidStyle*>( this ) ->btnOffset = btn->backgroundOffset(); - const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<QWidget*>( widget ); - drawPrimitive( PE_ButtonDefault, p, r, cg, flags, QStyleOption( btn )); + const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<TQWidget*>( widget ); + drawPrimitive( PE_ButtonDefault, p, r, cg, flags, TQStyleOption( btn )); const_cast<LiquidStyle*>( this ) ->paintWidget = 0L; const_cast<LiquidStyle*>( this ) ->isHTMLButton = false; break; @@ -1890,7 +1890,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { // if (_htmlWidgetWId == widget->winId()) // return; - const QPushButton *btn = ( const QPushButton* ) widget; + const TQPushButton *btn = ( const TQPushButton* ) widget; int x, y, w, h; r.rect( &x, &y, &w, &h ); @@ -1900,15 +1900,15 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int xoff = x; if ( btn->iconSet() && !btn->iconSet() ->isNull() ) { - QIconSet::Mode mode = btn->isEnabled() ? QIconSet::Normal : QIconSet::Disabled; - if ( mode == QIconSet::Normal && btn->hasFocus() ) - mode = QIconSet::Active; + TQIconSet::Mode mode = btn->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled; + if ( mode == TQIconSet::Normal && btn->hasFocus() ) + mode = TQIconSet::Active; - QIconSet::State state = QIconSet::Off; + TQIconSet::State state = TQIconSet::Off; if ( btn->isToggleButton() && btn->isOn() ) - state = QIconSet::On; + state = TQIconSet::On; - QPixmap pix( btn->iconSet() ->pixmap( QIconSet::Small, mode, state ) ); + TQPixmap pix( btn->iconSet() ->pixmap( TQIconSet::Small, mode, state ) ); xoff += (x<6?8:2); if (btn->text().isEmpty() && !btn->pixmap()) p->drawPixmap( x + w/2 - pix.width()/2, y + h / 2 - pix.height() / 2, pix ); @@ -1918,18 +1918,18 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, if ( btn->isMenuButton() ) { - drawPrimitive( PE_ArrowDown, p, QRect( w-14, (int)(h/2), 7, 7 ) , cg, flags, opt ); + drawPrimitive( PE_ArrowDown, p, TQRect( w-14, (int)(h/2), 7, 7 ) , cg, flags, opt ); w -= 14; } - QColor tmp; + TQColor tmp; tmp = btn->isDown() && !optionHandler->IcyButtons() ? btn->colorGroup().highlightedText() : btn->colorGroup().buttonText(); - drawItem( p, QRect( xoff, optionHandler->style() == Milk ? y-1 : y, w, h ), AlignCenter | ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + drawItem( p, TQRect( xoff, optionHandler->style() == Milk ? y-1 : y, w, h ), AlignCenter | ShowPrefix, cg, btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); break; } case CE_MenuBarItem: { - QMenuItem *mi = opt.menuItem(); + TQMenuItem *mi = opt.menuItem(); bool active = flags & Style_Active; bool focused = flags & Style_HasFocus; @@ -1940,13 +1940,13 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->fillRect(r,cg.highlight()); } - // QColor tmpColor( cg.background().dark( 120 ) ); + // TQColor tmpColor( cg.background().dark( 120 ) ); if ( optionHandler->useShadowText() && !( active && focused )) { p->setPen(cg.background().dark( 120 )); p->drawText(r, AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, mi->text()); } - // drawItem( p, QRect( r.x() + 1, r.y() + 1, r.width(), r.height() ), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, &tmpColor ); + // drawItem( p, TQRect( r.x() + 1, r.y() + 1, r.width(), r.height() ), AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, &tmpColor ); // drawItem( p, r, AlignCenter | AlignVCenter | ShowPrefix | DontClip | SingleLine, cg, flags & Style_Enabled, mi->pixmap(), mi->text(), -1, active && focused ? &(cg.highlightedText()) : &(cg.text()) ); p->setPen(active && focused ? cg.highlightedText() : cg.text()); @@ -1958,8 +1958,8 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int x,y,w, h; r.rect( &x, &y, &w, &h ); - const QPopupMenu *popupmenu = ( const QPopupMenu * ) widget; - QMenuItem *mi = opt.menuItem(); + const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget; + TQMenuItem *mi = opt.menuItem(); int tab = opt.tabWidth(); int maxpmw = opt.maxIconWidth(); @@ -1969,10 +1969,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, bool enabled = flags & Style_Enabled; int checkcol = maxpmw; - QColor menuBgColor( optionHandler->UseCustomMenuColor() ? optionHandler->Color() : optionHandler->bgColor() ); + TQColor menuBgColor( optionHandler->UseCustomMenuColor() ? optionHandler->Color() : optionHandler->bgColor() ); if ( checkable ) - checkcol = QMAX( maxpmw, 20 ); + checkcol = TQMAX( maxpmw, 20 ); if ( mi && mi->isSeparator() ) { @@ -2004,10 +2004,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, if ( !mi ) return ; - // Menu contents drawing code based on Qt's styles. Qt is property of + // Menu contents drawing code based on TQt's styles. TQt is property of // TrollTech: www.trolltech.com. Used with permission. int xpos = x; - QRect vrect = visualRect( QRect( xpos, y, checkcol, h ), r ); + TQRect vrect = visualRect( TQRect( xpos, y, checkcol, h ), r ); int xvis = vrect.x(); // icon @@ -2015,17 +2015,17 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, p->fillRect(x,y,h,h, optionHandler->menuStripeColor()); if ( mi->iconSet() ) { - QIconSet::Mode mode = dis ? QIconSet::Disabled : QIconSet::Normal; + TQIconSet::Mode mode = dis ? TQIconSet::Disabled : TQIconSet::Normal; if ( act && !dis ) - mode = QIconSet::Active; - QPixmap pixmap; + mode = TQIconSet::Active; + TQPixmap pixmap; if ( checkable && mi->isChecked() ) - pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode, QIconSet::On ); + pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode, TQIconSet::On ); else - pixmap = mi->iconSet() ->pixmap( QIconSet::Small, mode ); + pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode ); int pixw = pixmap.width(); int pixh = pixmap.height(); - QRect pmr( 0, 0, pixw, pixh ); + TQRect pmr( 0, 0, pixw, pixh ); pmr.moveCenter( vrect.center() ); p->setPen( cg.text() ); p->drawPixmap( pmr.topLeft(), pixmap ); @@ -2041,10 +2041,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, cflags |= Style_Enabled; if ( act ) cflags |= Style_On; - drawPrimitive( PE_CheckMark, p, visualRect( QRect( xp, y + windowsItemFrame, checkcol - 2 * windowsItemFrame, h - 2 * windowsItemFrame ), r ), cg, cflags ); + drawPrimitive( PE_CheckMark, p, visualRect( TQRect( xp, y + windowsItemFrame, checkcol - 2 * windowsItemFrame, h - 2 * windowsItemFrame ), r ), cg, cflags ); } } - QColor discol; + TQColor discol; if ( dis ) { discol = cg.text(); @@ -2054,7 +2054,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int xm = windowsItemFrame + checkcol + windowsItemHMargin; xpos += xm; - vrect = visualRect( QRect( xpos, y + windowsItemVMargin, w - xm - tab + 1, h - 2 * windowsItemVMargin ), r ); + vrect = visualRect( TQRect( xpos, y + windowsItemVMargin, w - xm - tab + 1, h - 2 * windowsItemVMargin ), r ); xvis = vrect.x(); if ( mi->custom() ) { @@ -2070,10 +2070,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } // Text - QString s = mi->text(); + TQString s = mi->text(); if ( !s.isNull() ) { - QColor textColor, shadowColor; + TQColor textColor, shadowColor; shadowColor = optionHandler->bgColor().dark( 130 ); if ( dis ) @@ -2087,12 +2087,12 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, int t = s.find( '\t' ); int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; - text_flags |= ( QApplication::reverseLayout() ? AlignRight : AlignLeft ); + text_flags |= ( TQApplication::reverseLayout() ? AlignRight : AlignLeft ); if ( t >= 0 ) { // draw tab text int xp; xp = x + w - tab - 20 - windowsItemHMargin - windowsItemFrame + 1; - QString tabStr( s.right( s.length() - t - 1 ) ); + TQString tabStr( s.right( s.length() - t - 1 ) ); if ( !tabStr.isEmpty() ) { if ( optionHandler->useShadowText() ) @@ -2116,7 +2116,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, else if ( mi->pixmap() ) // draw pixmap { - QPixmap * pixmap = mi->pixmap(); + TQPixmap * pixmap = mi->pixmap(); if ( pixmap->depth() == 1 ) p->setBackgroundMode( OpaqueMode ); p->drawPixmap( xvis, y + windowsItemFrame, *pixmap ); @@ -2128,21 +2128,21 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, { int dim = (int)((float)( h - 2 * windowsItemFrame ) / 2); PrimitiveElement arrow; - arrow = ( QApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight ); + arrow = ( TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight ); xpos = x + w - windowsArrowHMargin - windowsItemFrame/* - dim*/-8; - vrect = visualRect( QRect( xpos, y + h / 2 - dim / 2, /*dim*/8, dim ), r ); + vrect = visualRect( TQRect( xpos, y + h / 2 - dim / 2, /*dim*/8, dim ), r ); if ( act ) { if ( !dis ) discol = cg.highlightedText(); - QColorGroup g2( discol, cg.highlight(), white, white, dis ? discol : white, discol, white ); + TQColorGroup g2( discol, cg.highlight(), white, white, dis ? discol : white, discol, white ); drawPrimitive( arrow, p, vrect, g2, Style_Enabled ); } else { if ( !dis ) discol = optionHandler->textColor(); - QColorGroup g2( discol, cg.background(), white, white, dis ? discol : white, discol, white ); + TQColorGroup g2( discol, cg.background(), white, white, dis ? discol : white, discol, white ); drawPrimitive( arrow, p, vrect, g2, mi->isEnabled() ? Style_Enabled : Style_Default ); } } @@ -2159,10 +2159,10 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, } -// void LiquidStyle::drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& opt ) const { +// void LiquidStyle::drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& opt ) const { // switch ( element ) { // case CE_PushButton: { -// p->fillRect( r, Qt::color1 ); +// p->fillRect( r, TQt::color1 ); // break; // } // default: @@ -2171,7 +2171,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, // } // } -// void LiquidStyle::drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption &opt ) const { +// void LiquidStyle::drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &opt ) const { // // switch ( control ) { // // case CC_ComboBox: { // // drawControlMask( CE_PushButton, p, widget, r, opt ); @@ -2182,7 +2182,7 @@ void LiquidStyle::drawControl( ControlElement element, QPainter *p, // // } // } -void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const QStyleOption &opt ) const +void LiquidStyle::drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const TQStyleOption &opt ) const { switch ( control ) { @@ -2191,11 +2191,11 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const bool sunken = (active & SC_ComboBoxArrow);// || (flags & Style_Active) || (flags & Style_Sunken) || (active & SC_ComboBoxListBoxPopup); bool hovered = (widget == highlightWidget) || (flags & Style_HasFocus); // bool isHtml = isHTMLWidget( widget ); - const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<QWidget*>( widget ); - QPen oldPen( p->pen() ); + const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<TQWidget*>( widget ); + TQPen oldPen( p->pen() ); if ( controls & SC_ComboBoxArrow ) { - if ( controls & SC_ComboBoxEditField && ( ( const QComboBox * ) widget ) ->editable()) + if ( controls & SC_ComboBoxEditField && ( ( const TQComboBox * ) widget ) ->editable()) { // editable? #if 0 if ( optionHandler->buttonStyle() == Brushed ) @@ -2245,13 +2245,13 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } case CC_ToolButton: { - const QToolButton *toolbutton = ( const QToolButton * ) widget; - const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<QWidget*>( widget ); + const TQToolButton *toolbutton = ( const TQToolButton * ) widget; + const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<TQWidget*>( widget ); const KAccessToolBarButton *toolbutton2 = 0L; - QRect button, menuarea; + TQRect button, menuarea; button = querySubControlMetrics( control, widget, SC_ToolButton, opt ); menuarea = querySubControlMetrics( control, widget, SC_ToolButtonMenu, opt ); - if (::qt_cast<KToolBarButton*>(toolbutton)) + if (::tqt_cast<KToolBarButton*>(toolbutton)) { toolbutton2 = (const KAccessToolBarButton*)toolbutton; #if GCC_VERSION < 40000 @@ -2259,7 +2259,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const button.setBottom(button.bottom() - p->fontMetrics().height() - 1); #endif } - else if (toolbutton->usesTextLabel() && toolbutton->textPosition() == QToolButton::BelowIcon) + else if (toolbutton->usesTextLabel() && toolbutton->textPosition() == TQToolButton::BelowIcon) button.setBottom(button.bottom() - p->fontMetrics().height()); menuarea.setX(menuarea.x() - 1); SFlags bflags = flags, mflags = flags; @@ -2276,11 +2276,11 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const bool sunken = mflags & ( Style_Down /*| Style_On*/ ); bool hover = bflags & (Style_MouseOver | Style_On ); - if ( !optionHandler->useToolButtonFrame())// || !(toolbutton->parentWidget() && ( ::qt_cast<QToolBar*>(toolbutton->parentWidget()) || toolbutton->parentWidget()->inherits("KonqFrameTabs")))) + if ( !optionHandler->useToolButtonFrame())// || !(toolbutton->parentWidget() && ( ::tqt_cast<TQToolBar*>(toolbutton->parentWidget()) || toolbutton->parentWidget()->inherits("KonqFrameTabs")))) { - if ((!(hover || sunken) || (toolbutton->usesTextLabel() && toolbutton->textPosition() == QToolButton::BelowIcon)) && toolbutton->parentWidget() && !::qt_cast<QToolBar*>(toolbutton->parent()) && toolbutton->parentWidget()->paletteBackgroundPixmap() && !toolbutton->parentWidget()->paletteBackgroundPixmap()->isNull()) + if ((!(hover || sunken) || (toolbutton->usesTextLabel() && toolbutton->textPosition() == TQToolButton::BelowIcon)) && toolbutton->parentWidget() && !::tqt_cast<TQToolBar*>(toolbutton->parent()) && toolbutton->parentWidget()->paletteBackgroundPixmap() && !toolbutton->parentWidget()->paletteBackgroundPixmap()->isNull()) { - QPixmap pixmap = *(toolbutton->parentWidget()->paletteBackgroundPixmap()); + TQPixmap pixmap = *(toolbutton->parentWidget()->paletteBackgroundPixmap()); if (hover || sunken) p->drawTiledPixmap( r.x(), button.bottom()+1, r.width(), p->fontMetrics().height(), pixmap, toolbutton->x(), toolbutton->y()+button.height() ); else @@ -2288,10 +2288,10 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } if (hover || sunken) { - const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<QWidget*>( widget ); + const_cast<LiquidStyle*>( this ) ->paintWidget = const_cast<TQWidget*>( widget ); if (optionHandler->toolbuttonStyle() != Brushed) drawCombo( p, cg, sunken ? cg.button().light( 110 ) : - (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : + (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, full ); else @@ -2306,7 +2306,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const myPosition pos = full; KToolBar *bar = NULL; - if (toolbutton2 && toolbutton2->parentWidget() && ::qt_cast<KToolBar*>(toolbutton2->parentWidget()) ) + if (toolbutton2 && toolbutton2->parentWidget() && ::tqt_cast<KToolBar*>(toolbutton2->parentWidget()) ) { //position calculation - would be nice if ktoolbarbutton provided this as flag bar = (KToolBar*)toolbutton2->parentWidget(); int buttonId = toolbutton2->id(); @@ -2328,7 +2328,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const pos = right : pos = center; } - else if (bar->orientation() == Qt::Horizontal) + else if (bar->orientation() == TQt::Horizontal) { if (buttonIndex == 0) { @@ -2380,15 +2380,15 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if (optionHandler->toolbuttonStyle() != Brushed) { - (bar && bar->orientation() == Qt::Vertical) ? - drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y() - 7, button.width(), (pos == full) ? button.height()+2 : (pos == center) ? button.height()+16 : button.height()+9, sunken, hover, false, center ) : - drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height()/*+2*/, sunken, hover, false, pos ); + (bar && bar->orientation() == TQt::Vertical) ? + drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y() - 7, button.width(), (pos == full) ? button.height()+2 : (pos == center) ? button.height()+16 : button.height()+9, sunken, hover, false, center ) : + drawCombo( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height()/*+2*/, sunken, hover, false, pos ); } else { - (bar && bar->orientation() == Qt::Vertical) ? - drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y()-4, button.width(), (pos == full) ? button.height() : (pos == center) ? button.height()+8 : button.height()+4, sunken, hover, false) : - drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != qApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, pos); + (bar && bar->orientation() == TQt::Vertical) ? + drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), (pos == full || pos == left) ? button.y() : button.y()-4, button.width(), (pos == full) ? button.height() : (pos == center) ? button.height()+8 : button.height()+4, sunken, hover, false) : + drawRectangularButton( p, cg, sunken ? cg.button().light( 110 ) : (hover || (cg.button() != tqApp->palette().active().button())) ? cg.button() : optionHandler->InactiveButtonColor(), button.x(), button.y(), button.width(), button.height(), sunken, hover, false, pos); } } } @@ -2402,7 +2402,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const #if 0 if ( toolbutton->hasFocus() && !toolbutton->focusProxy() ) { - QRect fr = toolbutton->rect(); + TQRect fr = toolbutton->rect(); fr.addCoords( 3, 3, -3, -3 ); drawPrimitive( PE_FocusRect, p, fr, cg ); } @@ -2412,12 +2412,12 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } case CC_ScrollBar: { - const_cast<LiquidStyle*>( this ) ->currentScrollBar = ( QScrollBar * ) widget; + const_cast<LiquidStyle*>( this ) ->currentScrollBar = ( TQScrollBar * ) widget; KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } case CC_SpinWidget: { - const QSpinWidget * sw = (const QSpinWidget *) widget; + const TQSpinWidget * sw = (const TQSpinWidget *) widget; SFlags flags; PrimitiveElement pe; @@ -2433,8 +2433,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const flags |= Style_Raised; pe = PE_SpinWidgetUp; - QRect re = sw->upRect(); - QColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled(); + TQRect re = sw->upRect(); + TQColorGroup ucg = sw->isUpEnabled() ? cg : sw->palette().disabled(); p->fillRect(re, ucg.base()); drawPrimitive(pe, p, re, ucg, flags); } @@ -2448,8 +2448,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const flags |= Style_Raised; pe = PE_SpinWidgetDown; - QRect re = sw->downRect(); - QColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled(); + TQRect re = sw->downRect(); + TQColorGroup dcg = sw->isDownEnabled() ? cg : sw->palette().disabled(); p->fillRect(re, dcg.base()); drawPrimitive(pe, p, re, dcg, flags); } @@ -2458,19 +2458,19 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const // SLIDER - KDE code for double buffering // ------------------------------------------------------------------- case CC_Slider: { - const QSlider* slider = (const QSlider*)widget; - QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt); - QRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt); + const TQSlider* slider = (const TQSlider*)widget; + TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove, opt); + TQRect handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle, opt); // Double-buffer slider for no flicker - QPixmap pix(widget->size()); - QPainter p2; + TQPixmap pix(widget->size()); + TQPainter p2; p2.begin(&pix); if ( slider->parentWidget() && (slider->parentWidget()->paletteBackgroundPixmap() && !slider->parentWidget()->paletteBackgroundPixmap()->isNull() )) { - QPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); - if (QWidget *topDaddy = slider->topLevelWidget()){ - QPoint zero = QPoint(0,0); + TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap()); + if (TQWidget *topDaddy = slider->topLevelWidget()){ + TQPoint zero = TQPoint(0,0); #if 0 zero = slider->mapTo(topDaddy, zero); int zxmpw = zero.x()%pixmap.width(); @@ -2520,7 +2520,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const // Draw the tickmarks if (controls & SC_SliderTickmarks) - QCommonStyle::drawComplexControl(control, &p2, widget, + TQCommonStyle::drawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -2531,35 +2531,35 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } p2.end(); - bitBlt((QWidget*)widget, r.x(), r.y(), &pix); + bitBlt((TQWidget*)widget, r.x(), r.y(), &pix); break; } #ifndef QT_NO_LISTVIEW case CC_ListView: { if ( controls & SC_ListView ) { - QCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); } if ( controls & ( SC_ListViewBranch | SC_ListViewExpand ) ) { if ( opt.isDefault() ) break; - QListViewItem *item = opt.listViewItem(); - QListViewItem *child = item->firstChild(); - QListView* v = item->listView(); + TQListViewItem *item = opt.listViewItem(); + TQListViewItem *child = item->firstChild(); + TQListView* v = item->listView(); bool drawDotlines = optionHandler->DrawDotlines(); - static QBitmap *verticalLine = 0, *horizontalLine = 0; - static QCleanupHandler<QBitmap> qlv_cleanup_bitmap; + static TQBitmap *verticalLine = 0, *horizontalLine = 0; + static TQCleanupHandler<TQBitmap> qlv_cleanup_bitmap; int dotoffset = 0; if (drawDotlines && (optionHandler->DotlineStyle() == Dots)){ if ( !verticalLine ) { // make 128*1 and 1*128 bitmaps that can be used for // drawing the right sort of lines. - verticalLine = new QBitmap( 1, 128, TRUE ); - horizontalLine = new QBitmap( 128, 1, TRUE ); - QPointArray a( 64 ); - QPainter p; + verticalLine = new TQBitmap( 1, 128, TRUE ); + horizontalLine = new TQBitmap( 128, 1, TRUE ); + TQPointArray a( 64 ); + TQPainter p; p.begin( verticalLine ); int i; for( i=0; i<64; i++ ) @@ -2567,7 +2567,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const p.setPen( optionHandler->DotlineColor() ); p.drawPoints( a ); p.end(); - QApplication::flushX(); + TQApplication::flushX(); verticalLine->setMask( *verticalLine ); p.begin( horizontalLine ); for( i=0; i<64; i++ ) @@ -2575,7 +2575,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const p.setPen( optionHandler->DotlineColor() ); p.drawPoints( a ); p.end(); - QApplication::flushX(); + TQApplication::flushX(); horizontalLine->setMask( *horizontalLine ); qlv_cleanup_bitmap.add( &verticalLine ); qlv_cleanup_bitmap.add( &horizontalLine ); @@ -2585,12 +2585,12 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const int y = r.y(); int c; - QPointArray dotlines; + TQPointArray dotlines; if ( drawDotlines && active == SC_All && controls == SC_ListViewExpand ) { c = 2; dotlines.resize( 2 ); - dotlines[ 0 ] = QPoint( r.right(), r.top() ); - dotlines[ 1 ] = QPoint( r.right(), r.bottom() ); + dotlines[ 0 ] = TQPoint( r.right(), r.top() ); + dotlines[ 1 ] = TQPoint( r.right(), r.bottom() ); } else { int linetop = 0, linebot = 0; @@ -2614,7 +2614,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const lh = child ? child->height() : 0; else lh = p->fontMetrics().height() + 2 * v->itemMargin(); - lh = QMAX( lh, QApplication::globalStrut().height() ); + lh = TQMAX( lh, TQApplication::globalStrut().height() ); if ( lh % 2 > 0 ) lh++; linebot = y + lh / 2; @@ -2629,7 +2629,7 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if ( !child->isOpen() ) p->drawLine( bx, linebot - 2, bx, linebot + 2 ); } else { // ultracool triangles ;-) - QPointArray a; + TQPointArray a; p->setPen( optionHandler->UseCustomExpanderColor() ? optionHandler->CustomExpanderColor() : cg.text() ); if ( child->isOpen() ) { a.setPoints( 3, bx - 4, linebot - 2, @@ -2648,17 +2648,17 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } // dotlinery if ( drawDotlines ) { - dotlines[ c++ ] = QPoint( bx, linetop ); - dotlines[ c++ ] = QPoint( bx, linebot - (/* optionHandler->plusMinus() ? 4 : */5 ) ); - dotlines[ c++ ] = QPoint( bx + 5, linebot ); - dotlines[ c++ ] = QPoint( r.width(), linebot ); + dotlines[ c++ ] = TQPoint( bx, linetop ); + dotlines[ c++ ] = TQPoint( bx, linebot - (/* optionHandler->plusMinus() ? 4 : */5 ) ); + dotlines[ c++ ] = TQPoint( bx + 5, linebot ); + dotlines[ c++ ] = TQPoint( r.width(), linebot ); linetop = linebot + 5; } } else { // just dotlinery if ( drawDotlines ) { - dotlines[ c++ ] = QPoint( bx + 2, linebot ); - dotlines[ c++ ] = QPoint( r.width(), linebot ); + dotlines[ c++ ] = TQPoint( bx + 2, linebot ); + dotlines[ c++ ] = TQPoint( r.width(), linebot ); } } @@ -2674,8 +2674,8 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const if ( drawDotlines ) { if ( linetop < linebot ) { - dotlines[ c++ ] = QPoint( bx, linetop ); - dotlines[ c++ ] = QPoint( bx, linebot ); + dotlines[ c++ ] = TQPoint( bx, linetop ); + dotlines[ c++ ] = TQPoint( bx, linebot ); } } } @@ -2761,14 +2761,14 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } if ( controls & SC_TitleBarLabel ) { - QRect ir = visualRect( querySubControlMetrics( CC_TitleBar, widget, SC_TitleBarLabel ), widget ); + TQRect ir = visualRect( querySubControlMetrics( CC_TitleBar, widget, SC_TitleBarLabel ), widget ); p->setPen( cg.text() ); p->drawText(ir.x()+2, ir.y(), ir.width()-2, ir.height(), AlignCenter | AlignVCenter | SingleLine, widget->caption() ); } - QRect ir; + TQRect ir; bool down = FALSE; - QPixmap pm; + TQPixmap pm; if ( controls & SC_TitleBarCloseButton ) { @@ -2848,16 +2848,16 @@ void LiquidStyle::drawComplexControl( ComplexControl control, QPainter *p, const } } -int LiquidStyle::styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const +int LiquidStyle::styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const { switch (sh) { - case QStyle::SH_GUIStyle: - // if (w && ::qt_cast<QMenuBar*>(w)) + case TQStyle::SH_GUIStyle: + // if (w && ::tqt_cast<TQMenuBar*>(w)) // return WindowsStyle; return MacStyle; - case QStyle::SH_TabBar_Alignment: - if (optionHandler->CenterTabs() && !QApplication::reverseLayout()) + case TQStyle::SH_TabBar_Alignment: + if (optionHandler->CenterTabs() && !TQApplication::reverseLayout()) return AlignHCenter; else return KStyle::styleHint(sh, w, opt, shr); @@ -2866,14 +2866,14 @@ int LiquidStyle::styleHint(StyleHint sh, const QWidget * w, const QStyleOption & } } -QRect LiquidStyle::subRect( SubRect r, const QWidget *widget ) const { +TQRect LiquidStyle::subRect( SubRect r, const TQWidget *widget ) const { if (r == SR_ComboBoxFocusRect){ return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ); } return ( KStyle::subRect( r, widget ) ); } -int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const +int LiquidStyle::pixelMetric( PixelMetric m, const TQWidget *widget ) const { switch ( m ) { @@ -2906,49 +2906,49 @@ int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const case PM_DefaultFrameWidth: { /* - if (widget && ::qt_cast<QFrame*>(widget) && ((QFrame*)widget)->frameShape() == QFrame::LineEditPanel) + if (widget && ::tqt_cast<TQFrame*>(widget) && ((TQFrame*)widget)->frameShape() == TQFrame::LineEditPanel) return 6;*/ - if (widget && widget->parentWidget() && ::qt_cast<QTabWidget*>(widget->parentWidget()) && widget->parentWidget()->parentWidget() && (widget->parentWidget()->parentWidget()->inherits("KonqMainWindow") || widget->parentWidget()->parentWidget()->inherits("KonqFrameContainer"))) //for the konqueror statusbar offset, thanks konqueror team... ... ... f***f***f***!!! + if (widget && widget->parentWidget() && ::tqt_cast<TQTabWidget*>(widget->parentWidget()) && widget->parentWidget()->parentWidget() && (widget->parentWidget()->parentWidget()->inherits("KonqMainWindow") || widget->parentWidget()->parentWidget()->inherits("KonqFrameContainer"))) //for the konqueror statusbar offset, thanks konqueror team... ... ... f***f***f***!!! return 0; return 2; } case PM_TabBarBaseOverlap: case PM_TabBarBaseHeight: { - if (!widget || !::qt_cast<QTabWidget*>(widget) || !widget->children()) + if (!widget || !::tqt_cast<TQTabWidget*>(widget) || !widget->children()) return 0; - QObjectListIt it( *widget->children() ); // iterate over the buttons - QObject *obj; - QTabBar *tabBar = 0L; + TQObjectListIt it( *widget->children() ); // iterate over the buttons + TQObject *obj; + TQTabBar *tabBar = 0L; while ( (obj = it.current()) != 0 ) { ++it; - if (::qt_cast<QTabBar*>(obj)) + if (::tqt_cast<TQTabBar*>(obj)) { - tabBar = (QTabBar*)obj; + tabBar = (TQTabBar*)obj; break; } } if (!tabBar || !tabBar->isVisible()) return 0; - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 12; if (m == PM_TabBarBaseOverlap) return 2; return 7; } case PM_TabBarTabHSpace: - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 18; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 18; return 24; case PM_TabBarTabVSpace: { - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 6; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 6; return 10; } case PM_TabBarTabShiftHorizontal: return 0; case PM_TabBarTabShiftVertical: - if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("QDialog"))) return 0; + if (optionHandler->TabStyle() == Chooser || (optionHandler->TabStyle() == Clever && widget && widget->topLevelWidget()->inherits("TQDialog"))) return 0; return 2; case PM_ButtonShiftHorizontal: return 0; @@ -2959,61 +2959,61 @@ int LiquidStyle::pixelMetric( PixelMetric m, const QWidget *widget ) const } } -QSize LiquidStyle::sizeFromContents( ContentsType contents, - const QWidget *widget, - const QSize &contentSize, - const QStyleOption& opt ) const { +TQSize LiquidStyle::sizeFromContents( ContentsType contents, + const TQWidget *widget, + const TQSize &contentSize, + const TQStyleOption& opt ) const { switch ( contents ) { case CT_PushButton: { // this is a little funky - we give values not based on pixelMetric // because we want a custom width/height and we can only give one // value in pixelMetric (used in sizeHint). Odd but works well - const QPushButton * button = ( const QPushButton* ) widget; + const TQPushButton * button = ( const TQPushButton* ) widget; int w = contentSize.width() + 26 > 80 ? contentSize.width() + 26 : 80; int h = contentSize.height() > 24 ? contentSize.height() : 25; if ( button->text().isEmpty() ) - return ( QSize( contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ), h ) ); + return ( TQSize( contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ), h ) ); - return ( QSize( w, h ) ); + return ( TQSize( w, h ) ); } case CT_ToolButton: { - if (widget->parentWidget() && ::qt_cast<QTabWidget*>(widget->parentWidget())){ - return QSize(contentSize.width() + 6, contentSize.height() + 5); + if (widget->parentWidget() && ::tqt_cast<TQTabWidget*>(widget->parentWidget())){ + return TQSize(contentSize.width() + 6, contentSize.height() + 5); } else{ int w = contentSize.width() + 6; int sh = contentSize.height() + 5; int sw = (int)(1.3*sh); if (w < sw) - return QSize(sw, sh); + return TQSize(sw, sh); else - return QSize(w, sh); + return TQSize(w, sh); } } case CT_Slider: { int h = contentSize.height() > 24 ? contentSize.height() : 24; - return ( QSize( contentSize.width(), h ) ); + return ( TQSize( contentSize.width(), h ) ); } case CT_ComboBox: { - // QSize sz = KStyle::sizeFromContents( contents, widget, contentSize, opt ); - // return ( QSize( sz.width()+3, sz.height() > 25 ? sz.height() : 25 ) ); - if ( ::qt_cast<const QComboBox *>(widget) && ((const QComboBox *)widget)->editable()) - return ( QSize( contentSize.width()+27, contentSize.height() + 4 > 22 ? contentSize.height() + 4 : 26 ) ); + // TQSize sz = KStyle::sizeFromContents( contents, widget, contentSize, opt ); + // return ( TQSize( sz.width()+3, sz.height() > 25 ? sz.height() : 25 ) ); + if ( ::tqt_cast<const TQComboBox *>(widget) && ((const TQComboBox *)widget)->editable()) + return ( TQSize( contentSize.width()+27, contentSize.height() + 4 > 22 ? contentSize.height() + 4 : 26 ) ); else - return ( QSize( contentSize.width()+27, contentSize.height() + 2 > 24 ? contentSize.height() + 2 : 24 ) ); + return ( TQSize( contentSize.width()+27, contentSize.height() + 2 > 24 ? contentSize.height() + 2 : 24 ) ); } case CT_PopupMenuItem: { if ( ! widget || opt.isDefault() ) break; - const QPopupMenu *popup = ( const QPopupMenu * ) widget; + const TQPopupMenu *popup = ( const TQPopupMenu * ) widget; bool checkable = popup->isCheckable(); - QMenuItem *mi = opt.menuItem(); + TQMenuItem *mi = opt.menuItem(); int maxpmw = opt.maxIconWidth(); int w = contentSize.width(); int h = contentSize.height(); @@ -3029,13 +3029,13 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, h = windowsSepHeight; } else { if ( mi->pixmap() ) - h = QMAX( h, mi->pixmap() ->height() + 2 * windowsItemFrame ); + h = TQMAX( h, mi->pixmap() ->height() + 2 * windowsItemFrame ); else if ( ! mi->text().isNull() ) - h = QMAX( h, popup->fontMetrics().height() + 2 * windowsItemVMargin + + h = TQMAX( h, popup->fontMetrics().height() + 2 * windowsItemVMargin + 2 * windowsItemFrame ); if ( mi->iconSet() != 0 ) - h = QMAX( h, mi->iconSet() ->pixmap( QIconSet::Small, - QIconSet::Normal ).height() + + h = TQMAX( h, mi->iconSet() ->pixmap( TQIconSet::Small, + TQIconSet::Normal ).height() + 2 * windowsItemFrame ); } if ( !mi->text().isNull() && mi->text().find( '\t' ) >= 0 ) @@ -3049,7 +3049,7 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, if ( checkable || maxpmw > 0 ) w += windowsCheckMarkHMargin; w += 20; - return ( QSize( w, h ) ); + return ( TQSize( w, h ) ); } default: break; @@ -3058,38 +3058,38 @@ QSize LiquidStyle::sizeFromContents( ContentsType contents, } -QPixmap LiquidStyle::stylePixmap( StylePixmap stylepixmap, - const QWidget* widget, - const QStyleOption& opt ) const { +TQPixmap LiquidStyle::stylePixmap( StylePixmap stylepixmap, + const TQWidget* widget, + const TQStyleOption& opt ) const { return KStyle::stylePixmap( stylepixmap, widget, opt ); } #include "eventfilter.cpp" -QRect LiquidStyle::querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt ) const +TQRect LiquidStyle::querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt ) const { if ( control == CC_ComboBox && subcontrol == SC_ComboBoxEditField ) - return QRect( 8, 3, widget->width() - 32, widget->height() - 7 ); + return TQRect( 8, 3, widget->width() - 32, widget->height() - 7 ); if (control == CC_TitleBar) { switch (subcontrol) { case SC_TitleBarSysMenu: - return QRect( widget->width() - 24, 1, 16, 16 ); + return TQRect( widget->width() - 24, 1, 16, 16 ); case SC_TitleBarMinButton: - return QRect( 26, 1, 16, 16 ); + return TQRect( 26, 1, 16, 16 ); case SC_TitleBarMaxButton: - return QRect( 47, 1, 16, 16 ); + return TQRect( 47, 1, 16, 16 ); case SC_TitleBarCloseButton: - return QRect( 5, 1, 16, 16 ); + return TQRect( 5, 1, 16, 16 ); case SC_TitleBarLabel: - return QRect( 68, 1, widget->width() - 107, 16 ); + return TQRect( 68, 1, widget->width() - 107, 16 ); case SC_TitleBarNormalButton: - return QRect( 26, 1, 16, 16 ); + return TQRect( 26, 1, 16, 16 ); case SC_TitleBarShadeButton: - return QRect( widget->width() - 29, 1, 24, 16 ); + return TQRect( widget->width() - 29, 1, 24, 16 ); case SC_TitleBarUnshadeButton: - return QRect( widget->width() - 29, 1, 24, 16 ); + return TQRect( widget->width() - 29, 1, 24, 16 ); default: return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } @@ -3098,18 +3098,18 @@ QRect LiquidStyle::querySubControlMetrics( ComplexControl control, const QWidget return ( KStyle::querySubControlMetrics( control, widget, subcontrol, opt ) ); } -QImage LiquidStyle::fetchImage( const char *name ){ +TQImage LiquidStyle::fetchImage( const char *name ){ return uic_findImage( name ); } -QColor LiquidStyle::mapFadeColor(QColor &color, int index) const +TQColor LiquidStyle::mapFadeColor(TQColor &color, int index) const { - QRgb **rgb = fadeColorMap.find(color.rgb()); + TQRgb **rgb = fadeColorMap.find(color.rgb()); if (rgb) - return QColor((*rgb)[index]); + return TQColor((*rgb)[index]); // no color map found, create one and return the queried value - rgb = new QRgb*; - *rgb = new QRgb[10]; + rgb = new TQRgb*; + *rgb = new TQRgb[10]; int iRed = optionHandler->InactiveButtonColor().red(); int iGreen = optionHandler->InactiveButtonColor().green(); int iBlue = optionHandler->InactiveButtonColor().blue(); @@ -3118,37 +3118,37 @@ QColor LiquidStyle::mapFadeColor(QColor &color, int index) const int cBlue = color.blue(); for (int i = 10; i < 20; i++) { - (*rgb)[i-10] = qRgb( iRed + (cRed-iRed)*(i)/20, iGreen + (cGreen-iGreen)*(i)/20, iBlue + (cBlue-iBlue)*(i)/20); + (*rgb)[i-10] = tqRgb( iRed + (cRed-iRed)*(i)/20, iGreen + (cGreen-iGreen)*(i)/20, iBlue + (cBlue-iBlue)*(i)/20); } LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); ptr->fadeColorMap.insert(color.rgb(), rgb); - return QColor((*rgb)[index]); + return TQColor((*rgb)[index]); } -QPixmap* LiquidStyle::processEmbedded( const char *label, const QColor &c, bool blend, const QColor *bg ) const { - QImage img( uic_findImage( label ) ); +TQPixmap* LiquidStyle::processEmbedded( const char *label, const TQColor &c, bool blend, const TQColor *bg ) const { + TQImage img( uic_findImage( label ) ); img.detach(); if ( img.isNull() ) { // shouldn't happen, been tested - qWarning( "Invalid embedded label %s", label ); + tqWarning( "Invalid embedded label %s", label ); return ( NULL ); } return ( adjustHSV( img, c, bg ) ); } -QPixmap* LiquidStyle::getPixmap( BitmapData item ) const +TQPixmap* LiquidStyle::getPixmap( BitmapData item ) const { if ( pixmaps[ item ] ) return ( pixmaps[ item ] ); - QColor bgColor( optionHandler->InactiveButtonColor() ); - QColor btnColor( isOOO ? optionHandler->CustomButtonColor() : qApp->palette().active().button() ); - QColor btnHoverColor( isOOO ? optionHandler->CustomButtonColor().light(120) : btnColor.light( 120 ) ); - QColor sbGrooveColor( optionHandler->useCustomColors() ? + TQColor bgColor( optionHandler->InactiveButtonColor() ); + TQColor btnColor( isOOO ? optionHandler->CustomButtonColor() : tqApp->palette().active().button() ); + TQColor btnHoverColor( isOOO ? optionHandler->CustomButtonColor().light(120) : btnColor.light( 120 ) ); + TQColor sbGrooveColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBGroove ) : bgColor ); - QColor sbSliderColor( optionHandler->useCustomColors() ? + TQColor sbSliderColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSlider ) : bgColor ); - QColor sbSliderHoverColor( optionHandler->useCustomColors() ? + TQColor sbSliderHoverColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSliderHover ) : isOOO?optionHandler->CustomButtonColor():btnColor ); - QColor sbSliderPressedColor( optionHandler->useCustomColors() ? + TQColor sbSliderPressedColor( optionHandler->useCustomColors() ? optionHandler->customColor( CustomSBSliderPressed ) : btnColor.dark(110) ); LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); switch ( item ) @@ -3352,11 +3352,11 @@ QPixmap* LiquidStyle::getPixmap( BitmapData item ) const { if (optionHandler->style() == Jaguar) { - ptr->pixmaps[ TitleBar ] = new QPixmap(32,22); + ptr->pixmaps[ TitleBar ] = new TQPixmap(32,22); ptr->pixmaps[ TitleBar ]->fill( optionHandler->titleColor(0) ); - QPainter p; + TQPainter p; p.begin( ptr->pixmaps[ TitleBar ] ); - p.setPen( QColor( + p.setPen( TQColor( (optionHandler->titleColor(0).red()+optionHandler->titleColor(1).red())/2, (optionHandler->titleColor(0).green()+optionHandler->titleColor(1).green())/2, (optionHandler->titleColor(0).blue()+optionHandler->titleColor(1).blue())/2 )); @@ -3371,7 +3371,7 @@ QPixmap* LiquidStyle::getPixmap( BitmapData item ) const p.end(); } else - ptr->pixmaps[ TitleBar ] = &KPixmapEffect::gradient (*((KPixmap*)(new QPixmap(32,22))), optionHandler->titleColor(0), optionHandler->titleColor(1), KPixmapEffect::VerticalGradient, 22); + ptr->pixmaps[ TitleBar ] = &KPixmapEffect::gradient (*((KPixmap*)(new TQPixmap(32,22))), optionHandler->titleColor(0), optionHandler->titleColor(1), KPixmapEffect::VerticalGradient, 22); break; } default: diff --git a/style/baghira.h b/style/baghira.h index 1336ac2..adbe60d 100644 --- a/style/baghira.h +++ b/style/baghira.h @@ -1,32 +1,32 @@ #ifndef __LIQUID_STYLE_H #define __LIQUID_STYLE_H -#include <qcstring.h> -#include <qdir.h> -#include <qintdict.h> -#include <qprogressbar.h> -#include <qtimer.h> -#include <qwmatrix.h> +#include <tqcstring.h> +#include <tqdir.h> +#include <tqintdict.h> +#include <tqprogressbar.h> +#include <tqtimer.h> +#include <tqwmatrix.h> #include <kpixmap.h> -#include <qwidget.h> +#include <tqwidget.h> #include <kstyle.h> // #define BITMAP_ITEMS 75 // Don't worry, they're demand loaded ;-) #define LIQUID_MENU_CHANGE 667 #define MOSFET_BUTTON_CHANGE 661 -class QColor; -class QHeader; -class QImage; -class QMenuBar; -class QPalette; -class QPoint; -class QPushButton; -class QRect; -class QScrollBar; -class QSize; -class QString; -class QTabBar; +class TQColor; +class TQHeader; +class TQImage; +class TQMenuBar; +class TQPalette; +class TQPoint; +class TQPushButton; +class TQRect; +class TQScrollBar; +class TQSize; +class TQString; +class TQTabBar; class LiquidStyle; enum BitmapData{RadioOn = 0, RadioOff, RadioOnHover, RadioOffHover, RadioOnPressed, RadioOffPressed, @@ -80,32 +80,32 @@ class ButtonTile for ( int i = 0;i < 9;++i ) if ( pixmaps[ i ] ) delete pixmaps[ i ]; } - QPixmap* pixmap( Tile pos ) + TQPixmap* pixmap( Tile pos ) { return ( pixmaps[ ( int ) pos ] ); } - void setPixmap( Tile pos, QPixmap *pix ) + void setPixmap( Tile pos, TQPixmap *pix ) { pixmaps[ ( int ) pos ] = pix; } protected: - QPixmap *pixmaps[ 9 ]; + TQPixmap *pixmaps[ 9 ]; }; -class OptionHandler : public QObject +class OptionHandler : public TQObject { Q_OBJECT public: - OptionHandler( QObject *parent ); + OptionHandler( TQObject *parent ); void reloadSettings(); inline static bool useShadowText() { return ( shadowText ); } - const QColor& textColor(); - const QColor& bgColor(); - const QColor& buttonColor(); + const TQColor& textColor(); + const TQColor& bgColor(); + const TQColor& buttonColor(); static int custCols[8]; inline void reset() @@ -123,17 +123,17 @@ public: return (drawMenuStripe_); } - inline static QColor menuStripeColor() + inline static TQColor menuStripeColor() { return menuStripeColor_; } - inline static QColor textColorHigh() + inline static TQColor textColorHigh() { return fgColorHigh; } - inline static QColor menuColorHigh() + inline static TQColor menuColorHigh() { return colorHigh; } @@ -167,7 +167,7 @@ public: { return ( customWidgetColor ); } - inline static const QColor& customColor( int idx ) + inline static const TQColor& customColor( int idx ) { return ( customColors[ idx ] ); } @@ -224,19 +224,19 @@ public: { return (useCustomExpanderColor); } - inline static QColor CustomExpanderColor() + inline static TQColor CustomExpanderColor() { return (expanderColor); } - inline static QColor DotlineColor() + inline static TQColor DotlineColor() { return (dotlineColor); } - inline QColor InactiveButtonColor() + inline TQColor InactiveButtonColor() { switch (inactiveButtonColor) { - case 0 : return (QColor(232,232,232)); + case 0 : return (TQColor(232,232,232)); case 1 : return (bgColor()); case 2 : return (buttonColor()); case 3 : return (customInactiveButtonColor); @@ -310,12 +310,12 @@ public: return scrollerActive; } - inline static QColor Color() + inline static TQColor Color() { return color; } - inline static QColor Color2() + inline static TQColor Color2() { return color2; } @@ -330,7 +330,7 @@ public: return tabStyle_; } - inline static QColor & BrushTint() + inline static TQColor & BrushTint() { return brushTint; } @@ -348,7 +348,7 @@ public: { return animateProgress; } - inline static QColor CustomButtonColor() + inline static TQColor CustomButtonColor() { return customButtonColor; } @@ -358,28 +358,28 @@ public: return animateButton; } - inline static QColor aDecoColor1() + inline static TQColor aDecoColor1() { return aDecoColor1_; } - inline static QColor aDecoColor2() + inline static TQColor aDecoColor2() { return aDecoColor2_; } - inline static QColor titleColor( int i ) + inline static TQColor titleColor( int i ) { return titleColor_[i]; } - inline static QColor titleButtonColor( int i ) + inline static TQColor titleButtonColor( int i ) { return titleButtonColor_[i]; } - QMenuBar *currentMenu; - QPixmap *indicatedMenuItemPix; - QRect *indicatedMenuItemRect; - QPixmap *lastIndicatedMenuItemPix; - QRect *lastIndicatedMenuItemRect; + TQMenuBar *currentMenu; + TQPixmap *indicatedMenuItemPix; + TQRect *indicatedMenuItemRect; + TQPixmap *lastIndicatedMenuItemPix; + TQRect *lastIndicatedMenuItemRect; bool mouseOverMenu; WId lastIndicatedMenuItemID; static unsigned long wmDesign; @@ -388,12 +388,12 @@ public: public slots: inline void warningSlot() { - qWarning("widget destroyed"); + tqWarning("widget destroyed"); } protected: - static QColor titleColor_[2]; - static QColor titleButtonColor_[3]; + static TQColor titleColor_[2]; + static TQColor titleButtonColor_[3]; // menu static int menuBackground; @@ -402,19 +402,19 @@ protected: static bool animateButton; static bool shadowText; static bool drawMenuStripe_; - static QColor menuStripeColor_; + static TQColor menuStripeColor_; static bool glossyMenus_; //color - static QColor customButtonColor; + static TQColor customButtonColor; //widgets static bool customWidgetColor; - static QColor customColors[ 10 ]; + static TQColor customColors[ 10 ]; //menu static bool useCustomMenuColor; - static QColor color, color2, colorHigh, fgColor, fgColorHigh; + static TQColor color, color2, colorHigh, fgColor, fgColorHigh; //incativeButton static int inactiveButtonColor; - static QColor customInactiveButtonColor; + static TQColor customInactiveButtonColor; //Design //stipples @@ -427,7 +427,7 @@ protected: //istviews; static bool drawDotlines, useCustomExpanderColor; static int expanderStyle; - static QColor expanderColor, dotlineColor; + static TQColor expanderColor, dotlineColor; static int dotlineStyle; //slider static bool squeezesbslider; @@ -450,31 +450,31 @@ protected: static bool drawProgressLabel; static tabStyle tabStyle_; - QString colorStr, fgColorStr/*, panelColorStr*/; - static QColor brushTint; - static QColor aDecoColor1_; - static QColor aDecoColor2_; + TQString colorStr, fgColorStr/*, panelColorStr*/; + static TQColor brushTint; + static TQColor aDecoColor1_; + static TQColor aDecoColor2_; static bool tintBrush; static bool animateSlider; static bool animateProgress; }; -class EventKiller : public QObject +class EventKiller : public TQObject { Q_OBJECT public: - bool eventFilter( QObject *, QEvent *) + bool eventFilter( TQObject *, TQEvent *) { return TRUE; } }; -class BMShower : public QObject +class BMShower : public TQObject { Q_OBJECT public: - BMShower(QObject *parent); - bool eventFilter( QObject *object, QEvent *event ); + BMShower(TQObject *parent); + bool eventFilter( TQObject *object, TQEvent *event ); }; class ButtonFadeInfo @@ -499,96 +499,96 @@ public: virtual ~LiquidStyle(); bool isPlain() const; - virtual void polish( QWidget *w ); -// virtual void polishPopupMenu( QPopupMenu *w ); - virtual void unPolish( QWidget *w ); - virtual void polish( QPalette &p ); - virtual void unPolish( QApplication *a ); - int styleHint(StyleHint sh, const QWidget * w, const QStyleOption & opt, QStyleHintReturn * shr) const; - void drawKStylePrimitive( KStylePrimitive kpe, QPainter* p, const QWidget* widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawPrimitive( PrimitiveElement pe, QPainter* p, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; - void drawControl( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, const QStyleOption& = QStyleOption::Default ) const; -// void drawControlMask( ControlElement element, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const QStyleOption& = QStyleOption::Default ) const; -// void drawComplexControlMask( ComplexControl control, QPainter *p, const QWidget *widget, const QRect &r, const QStyleOption& = QStyleOption::Default ) const; - - int pixelMetric( PixelMetric m, const QWidget *widget = 0 ) const; - - QSize sizeFromContents( ContentsType contents, const QWidget *widget, const QSize &contentSize, const QStyleOption& opt ) const; - QRect subRect( SubRect r, const QWidget *widget ) const; - QRect querySubControlMetrics( ComplexControl control, const QWidget *widget, SubControl subcontrol, const QStyleOption &opt = QStyleOption::Default ) const; - // Fix Qt3's wacky image positions - QPixmap stylePixmap( StylePixmap stylepixmap, const QWidget *widget = 0, const QStyleOption& = QStyleOption::Default ) const; - bool eventFilter( QObject *object, QEvent *event ); + virtual void polish( TQWidget *w ); +// virtual void polishPopupMenu( TQPopupMenu *w ); + virtual void unPolish( TQWidget *w ); + virtual void polish( TQPalette &p ); + virtual void unPolish( TQApplication *a ); + int styleHint(StyleHint sh, const TQWidget * w, const TQStyleOption & opt, TQStyleHintReturn * shr) const; + void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawPrimitive( PrimitiveElement pe, TQPainter* p, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; + void drawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + void drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags = Style_Default, SCFlags controls = SC_All, SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; +// void drawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; + + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; + + TQSize sizeFromContents( ContentsType contents, const TQWidget *widget, const TQSize &contentSize, const TQStyleOption& opt ) const; + TQRect subRect( SubRect r, const TQWidget *widget ) const; + TQRect querySubControlMetrics( ComplexControl control, const TQWidget *widget, SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const; + // Fix TQt3's wacky image positions + TQPixmap stylePixmap( StylePixmap stylepixmap, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; + bool eventFilter( TQObject *object, TQEvent *event ); private slots: void updateProgressPos(); void updateSliderPos(); - void progressBarDestroyed(QObject*); + void progressBarDestroyed(TQObject*); void fakeMouse(); protected: - void clearImage( QImage &img ) const; - ButtonTile* createButtonTile( const QColor &c, const QColor &bgColor, QImage *buttonImage, QImage *shadowImage, QImage *glowImage, QIntDict <ButtonTile>*buttonDict, QIntDict<ButtonTile>*shadowDict, QIntDict<ButtonTile>*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; - ButtonTile* createRoundFrameTile(QImage &img, const QColor &color, const QColor *bg, const QColor &baseColor ) const; - QPixmap* createSliderEnd( const QColor &c, const QColor &bgColor, bool top/*, bool vertical*/ ) const; - ButtonTile* separateTiles( QPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; + void clearImage( TQImage &img ) const; + ButtonTile* createButtonTile( const TQColor &c, const TQColor &bgColor, TQImage *buttonImage, TQImage *shadowImage, TQImage *glowImage, TQIntDict <ButtonTile>*buttonDict, TQIntDict<ButtonTile>*shadowDict, TQIntDict<ButtonTile>*glowDict, int w, int h, int xOff, int yOff, int centerW, int centerH, int shadowH, int glowWH, bool sunken) const; + ButtonTile* createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const; + TQPixmap* createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top/*, bool vertical*/ ) const; + ButtonTile* separateTiles( TQPixmap *pix, int xO, int yO, int w, int h, int sh, bool sunken) const; - QPixmap* getPixmap( BitmapData item ) const; - QPixmap* adjustHSV( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - QImage* adjustHSVImage( QImage &img, const QColor &c, const QColor *bg = NULL ) const; - void adjustHSV( QPixmap &pix, const QColor &c ) const; - QImage* tintBrush( const QImage &img, const QColor &c ) const; - QPixmap* processEmbedded( const char *label, const QColor &c, bool blend = false, const QColor *bg = NULL ) const; - void drawRoundButton( QPainter *p, const QColorGroup &cg, const QColor &c, /*const QColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; - void drawRectangularButton( QPainter *p, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; - void drawCombo( QPainter *painter, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; - void drawEditFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; - void drawRoundFrame( QPainter *p, const QRect &r, const QColorGroup &cg, bool focused, QPoint offset ) const; - void drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const; - bool isHTMLWidget( const QWidget *w ) const; + TQPixmap* getPixmap( BitmapData item ) const; + TQPixmap* adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + TQImage* adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg = NULL ) const; + void adjustHSV( TQPixmap &pix, const TQColor &c ) const; + TQImage* tintBrush( const TQImage &img, const TQColor &c ) const; + TQPixmap* processEmbedded( const char *label, const TQColor &c, bool blend = false, const TQColor *bg = NULL ) const; + void drawRoundButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, /*const TQColor &bg,*/ int x, int y, int w, int h, bool pushedDown = false, bool hover = false, int bgX = -1, int bgY = -1) const; + void drawRectangularButton( TQPainter *p, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken = false, bool hover = false, bool isCombo = false, int position = full, bool isHtml = false) const; + void drawCombo( TQPainter *painter, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position = full, bool isHTML = false ) const; + void drawEditFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool isHTML = false, bool focused = false, bool inverse = false/*, bool round = false*/ ) const; + void drawRoundFrame( TQPainter *p, const TQRect &r, const TQColorGroup &cg, bool focused, TQPoint offset ) const; + void drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const; + bool isHTMLWidget( const TQWidget *w ) const; private: LiquidStyle( const LiquidStyle & ); LiquidStyle& operator=( const LiquidStyle & ); int getBrightness(unsigned int rgb) const; - QImage fetchImage( const char *name ); - QColor mapFadeColor(QColor &color, int index) const; - void fadeIn(QPushButton *button); - void fadeOut(QPushButton *button); - QColor brushedMetalColor(QColor &c) const; - QColor originalBgColor; + TQImage fetchImage( const char *name ); + TQColor mapFadeColor(TQColor &color, int index) const; + void fadeIn(TQPushButton *button); + void fadeOut(TQPushButton *button); + TQColor brushedMetalColor(TQColor &c) const; + TQColor originalBgColor; - QBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; - QImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; - QPixmap *btnBlendPix, *menuPix, *groupShadow ; - QPixmap plainBrush, gradBrush; - QBrush pagerBrush, pagerHoverBrush; - - QPixmap *pixmaps[ BITMAP_ITEMS ]; - QPixmap sbBuffer; - QScrollBar *currentScrollBar; - QWMatrix lMatrix; - QWMatrix rMatrix; - QWMatrix iMatrix; - QWMatrix mMatrix; - QWMatrix m2Matrix; + TQBitmap *sbLeft, *sbRight, *sbUp, *sbDown, *checkmark; + TQImage *btnBorderImg, *btnShadowImg, *slider_top, *slider_btm, *slider_top_shd, *slider_btm_shd, *rectbutton, *combo, *comboShadow, *buttonGlow, *roundFrame; + TQPixmap *btnBlendPix, *menuPix, *groupShadow ; + TQPixmap plainBrush, gradBrush; + TQBrush pagerBrush, pagerHoverBrush; + + TQPixmap *pixmaps[ BITMAP_ITEMS ]; + TQPixmap sbBuffer; + TQScrollBar *currentScrollBar; + TQWMatrix lMatrix; + TQWMatrix rMatrix; + TQWMatrix iMatrix; + TQWMatrix mMatrix; + TQWMatrix m2Matrix; bool isKicker, isOOO, isHTMLButton, initialPaletteLoaded, inExitPolish; - QHeader *currentHeader; - QTabBar *currentTabBar; + TQHeader *currentHeader; + TQTabBar *currentTabBar; int headerHoverID; int headerSortID; - QPoint btnOffset; - QPoint cursorPos_; - QWidget *currentTaskContainer; + TQPoint btnOffset; + TQPoint cursorPos_; + TQWidget *currentTaskContainer; KPixmap activeToolbarPix; bool isTaskContainer, taskContainerHover; - QPalette polishedPalette, tooltipPalette; + TQPalette polishedPalette, tooltipPalette; unsigned int qtrcModificationTime; int progAnimShift; @@ -599,29 +599,29 @@ private: OptionHandler *optionHandler; - QIntDict<ButtonTile>btnDict; - QIntDict<ButtonFadeInfo>bfi; - QIntDict<QRgb*>fadeColorMap; - QIntDict<ButtonTile>btnShadowedDict; - QIntDict<ButtonTile>buttonGlowDict; - QIntDict<ButtonTile>comboDict; - QIntDict<ButtonTile>comboShadowedDict; - QIntDict<ButtonTile>tabDict; - QIntDict<ButtonTile>inverseTabDict; - QIntDict<ButtonTile>rectBtnDict; - QIntDict<ButtonTile>progress2Dict; - QMap<QWidget*, int> progAnimWidgets; - - QPixmap *tmpBtnPix; + TQIntDict<ButtonTile>btnDict; + TQIntDict<ButtonFadeInfo>bfi; + TQIntDict<TQRgb*>fadeColorMap; + TQIntDict<ButtonTile>btnShadowedDict; + TQIntDict<ButtonTile>buttonGlowDict; + TQIntDict<ButtonTile>comboDict; + TQIntDict<ButtonTile>comboShadowedDict; + TQIntDict<ButtonTile>tabDict; + TQIntDict<ButtonTile>inverseTabDict; + TQIntDict<ButtonTile>rectBtnDict; + TQIntDict<ButtonTile>progress2Dict; + TQMap<TQWidget*, int> progAnimWidgets; + + TQPixmap *tmpBtnPix; ButtonTile *inactiveRoundFrame; ButtonTile *activeRoundFrame; - QWidget *highlightWidget; - QScrollBar *activeScroller; + TQWidget *highlightWidget; + TQScrollBar *activeScroller; EventKiller *eventKiller; BMShower *bmShower; - static QPixmap popupBack; - QWidget *paintWidget; + static TQPixmap popupBack; + TQWidget *paintWidget; }; #endif diff --git a/style/eventfilter.cpp b/style/eventfilter.cpp index ada0475..ba09ff6 100644 --- a/style/eventfilter.cpp +++ b/style/eventfilter.cpp @@ -1,45 +1,45 @@ -#include <qcursor.h> +#include <tqcursor.h> #include <kpixmapeffect.h> #include <X11/keysym.h> #include <X11/extensions/XTest.h> #include <fixx11h.h> -bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) +bool LiquidStyle::eventFilter( TQObject *obj, TQEvent *ev ) { -// qWarning("%s, %s <- %s, %s: %d", obj->className(), obj->name(), obj->parent() ? obj->parent()->className() : "none", obj->parent()?obj->parent()->name():"none",ev->type()); +// tqWarning("%s, %s <- %s, %s: %d", obj->className(), obj->name(), obj->parent() ? obj->parent()->className() : "none", obj->parent()?obj->parent()->name():"none",ev->type()); switch (ev->type()) { - case QEvent::None: - case QEvent::Timer: + case TQEvent::None: + case TQEvent::Timer: { // first check if this is one of our fading pushbuttons - return elsewise - if (!(optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj))) + if (!(optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj))) return false; - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; - if (!bfi_ || ((QTimerEvent*)ev)->timerId() != bfi_->timerId) + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; + if (!bfi_ || ((TQTimerEvent*)ev)->timerId() != bfi_->timerId) return false; // ok, this is one of our fading buttons asking for repaint - ((QPushButton*)obj)->repaint(false); + ((TQPushButton*)obj)->repaint(false); int index = bfi_->fadeIn?bfi_->index + 1:bfi_->index - 1; // handle border cases if (index < 0) // fade-out run has finished, either stop fading stuff, or start fade-in { bfi_->fadeIn=true; - if (((QPushButton*)obj)->isDefault()) + if (((TQPushButton*)obj)->isDefault()) { bfi_->index=0; } else { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->timerId=0; - ((QPushButton*)obj)->repaint(false); // must be to clean out button + ((TQPushButton*)obj)->repaint(false); // must be to clean out button } } else if (index > 9) // fade-in run has finished, either stop fading stuff, or start fade-out { - if (((QPushButton*)obj)->isDefault()) + if (((TQPushButton*)obj)->isDefault()) { bfi_->fadeIn=false; bfi_->index=9; @@ -47,20 +47,20 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) else { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->timerId=0; } } else bfi_->index = index; } - case QEvent::MouseMove: - if (::qt_cast<QTabBar*>(obj)) + case TQEvent::MouseMove: + if (::tqt_cast<TQTabBar*>(obj)) { - QTabBar *tb = (QTabBar*)obj; - QRect tmpRect; + TQTabBar *tb = (TQTabBar*)obj; + TQRect tmpRect; bool done = false; - QMouseEvent *me = ( QMouseEvent*)ev; + TQMouseEvent *me = ( TQMouseEvent*)ev; int oldTab = hoveredTabIndex; if (hoveredTabIndex == -1) { @@ -107,12 +107,12 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast<QHeader*>(obj) ) + else if ( ::tqt_cast<TQHeader*>(obj) ) { - QHeader *hw = (QHeader*)obj; - QMouseEvent * me = ( QMouseEvent * ) ev; + TQHeader *hw = (TQHeader*)obj; + TQMouseEvent * me = ( TQMouseEvent * ) ev; int oldHeader = headerHoverID; - headerHoverID = hw->orientation() == Qt::Horizontal ? hw->sectionAt( me->x() + hw->offset() ) : hw->sectionAt( me->y() + hw->offset() ); + headerHoverID = hw->orientation() == TQt::Horizontal ? hw->sectionAt( me->x() + hw->offset() ) : hw->sectionAt( me->y() + hw->offset() ); if ( oldHeader != headerHoverID ) { // reset old header @@ -126,14 +126,14 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } return false; - case QEvent::Paint: - if ( ::qt_cast<QToolButton*>(obj) ) + case TQEvent::Paint: + if ( ::tqt_cast<TQToolButton*>(obj) ) { - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (!obj->inherits( "TaskContainer" )) { - if (btn->backgroundOrigin() != QWidget::WindowOrigin) - btn->setBackgroundOrigin( QWidget::WindowOrigin ); + if (btn->backgroundOrigin() != TQWidget::WindowOrigin) + btn->setBackgroundOrigin( TQWidget::WindowOrigin ); } else { @@ -145,48 +145,48 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if (::qt_cast<QMenuBar*>(obj)) + else if (::tqt_cast<TQMenuBar*>(obj)) { - QWidget *w = (QWidget *)obj; - if(w->backgroundMode() != Qt::PaletteBackground) + TQWidget *w = (TQWidget *)obj; + if(w->backgroundMode() != TQt::PaletteBackground) { w->setBackgroundMode(PaletteBackground); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); } return false; } - else if ( ::qt_cast<QHeader*>(obj) ) + else if ( ::tqt_cast<TQHeader*>(obj) ) { - QHeader *hw = (QHeader*)obj; - if (hw->parentWidget() && ::qt_cast<QListView*>(hw->parentWidget())) - headerSortID = ((QListView*)hw->parentWidget())->sortColumn(); + TQHeader *hw = (TQHeader*)obj; + if (hw->parentWidget() && ::tqt_cast<TQListView*>(hw->parentWidget())) + headerSortID = ((TQListView*)hw->parentWidget())->sortColumn(); return false; } - else if ( obj->inherits( "QDockWindow" ) ) + else if ( obj->inherits( "TQDockWindow" ) ) { if (KStyle::eventFilter( obj, ev )) return true; - QWidget * w = ( QWidget * ) obj; - if ( w->backgroundMode() != Qt::PaletteBackground ) + TQWidget * w = ( TQWidget * ) obj; + if ( w->backgroundMode() != TQt::PaletteBackground ) { - w->setBackgroundMode( Qt::PaletteBackground ); - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundMode( TQt::PaletteBackground ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); } return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); - bool isRadio = obj->inherits( "QRadioButton" ); + TQButton * btn = ( TQButton * ) obj; + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); btn->erase(); - QPainter p; + TQPainter p; p.begin( btn ); - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; SFlags flags = Style_Default; @@ -198,44 +198,44 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); x = sz.width() + 6; y = 0; if ( btn->hasFocus() ) { - QColor tmp( btn->colorGroup().background().dark( 130 ) ); - drawItem( &p, QRect( sz.width() + 6 + 2, 1, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); - drawItem( &p, QRect( sz.width() + 6 + 3, 2, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + TQColor tmp( btn->colorGroup().background().dark( 130 ) ); + drawItem( &p, TQRect( sz.width() + 6 + 2, 1, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); + drawItem( &p, TQRect( sz.width() + 6 + 3, 2, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text(), -1, &tmp ); } - drawItem( &p, QRect( sz.width() + 6 + 1, 0, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text() ); + drawItem( &p, TQRect( sz.width() + 6 + 1, 0, btn->width() - ( sz.width() + 6 + 1 ), btn->height() ), AlignLeft | AlignVCenter | ShowPrefix, btn->colorGroup(), btn->isEnabled(), btn->pixmap(), btn->text() ); p.end(); return true; } - else if (obj->inherits("KColorGrid") && !(((QWidget*)obj)->width() && ((QWidget*)obj)->height())) + else if (obj->inherits("KColorGrid") && !(((TQWidget*)obj)->width() && ((TQWidget*)obj)->height())) return true; return false; - case QEvent::KeyPress: - case QEvent::KeyRelease: + case TQEvent::KeyPress: + case TQEvent::KeyRelease: return false; - case QEvent::Wheel: - if ( ::qt_cast<QScrollView*>(obj) ) + case TQEvent::Wheel: + if ( ::tqt_cast<TQScrollView*>(obj) ) { optionHandler->setScrollerActive(); return false; } return false; - case QEvent::Enter: - if ( ::qt_cast<QToolButton*>(obj) ) + case TQEvent::Enter: + if ( ::tqt_cast<TQToolButton*>(obj) ) { bool isTask = obj->inherits( "TaskContainer" ); - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (isTask) { currentTaskContainer = btn; @@ -249,28 +249,28 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } } - else if ( ::qt_cast<QPushButton*>(obj) || ::qt_cast<QComboBox*>(obj) || obj->inherits( "QSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) + else if ( ::tqt_cast<TQPushButton*>(obj) || ::tqt_cast<TQComboBox*>(obj) || obj->inherits( "TQSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) { - QWidget * btn = ( QWidget * ) obj; + TQWidget * btn = ( TQWidget * ) obj; if ( btn->isEnabled() ) { highlightWidget = btn; btn->repaint( false ); - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) - fadeIn((QPushButton*)obj); + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) + fadeIn((TQPushButton*)obj); } return false; } - else if (::qt_cast<KToolBar*>(obj)) + else if (::tqt_cast<KToolBar*>(obj)) { - QObjectList *handlerList = obj->queryList( "QDockWindowHandle" ); + TQObjectList *handlerList = obj->queryList( "TQDockWindowHandle" ); for (uint i= 0; i < handlerList->count(); i++) - ((QWidget*)(handlerList->at(i)))->repaint(false); + ((TQWidget*)(handlerList->at(i)))->repaint(false); return false; } - if ( ::qt_cast<QScrollBar*>(obj) ) + if ( ::tqt_cast<TQScrollBar*>(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; if ( !sb->draggingSlider() ) { if ( sb->isEnabled() ) @@ -282,10 +282,10 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast<QScrollView*>(obj) ) + else if ( ::tqt_cast<TQScrollView*>(obj) ) { - QScrollView *sv = ( QScrollView * ) obj; - if (sv->vScrollBarMode() == QScrollView::AlwaysOff && sv->hScrollBarMode() == QScrollView::AlwaysOff) + TQScrollView *sv = ( TQScrollView * ) obj; + if (sv->vScrollBarMode() == TQScrollView::AlwaysOff && sv->hScrollBarMode() == TQScrollView::AlwaysOff) return false; optionHandler->setScrollerActive(); if (!(highlightWidget == sv->verticalScrollBar())) @@ -294,38 +294,38 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) sv->horizontalScrollBar()->repaint(false); return false; } - else if ( ::qt_cast<QHeader*>(obj) ) + else if ( ::tqt_cast<TQHeader*>(obj) ) { - currentHeader = (QHeader*)obj; + currentHeader = (TQHeader*)obj; headerHoverID = -1; return false; } - else if (::qt_cast<QTabBar*>(obj)) + else if (::tqt_cast<TQTabBar*>(obj)) { - currentTabBar = (QTabBar*)obj; + currentTabBar = (TQTabBar*)obj; hoveredTabIndex = -1; return false; } else if ( obj->inherits( "KateView" ) || obj->inherits( "TEWidget") || obj->inherits("CHexViewWidget")) { - QObjectList *scrollerList = obj->queryList( "QScrollBar" ); + TQObjectList *scrollerList = obj->queryList( "TQScrollBar" ); optionHandler->setScrollerActive(); for (uint i= 0; i < scrollerList->count(); i++) - ((QWidget*)(scrollerList->at(i)))->repaint(false); + ((TQWidget*)(scrollerList->at(i)))->repaint(false); return false; } else if (obj->inherits("KDockWidgetAbstractHeaderDrag")) { - ((QWidget *)obj)->repaint(); + ((TQWidget *)obj)->repaint(); return false; } else if (obj->inherits( "KAnimWidget" )) { return true; } - else if ( obj->inherits( "QLineEdit" ) && obj->parent() && ::qt_cast<QComboBox*>(obj->parent())) + else if ( obj->inherits( "TQLineEdit" ) && obj->parent() && ::tqt_cast<TQComboBox*>(obj->parent())) { - QWidget * btn = ( QWidget * ) obj->parent(); + TQWidget * btn = ( TQWidget * ) obj->parent(); if ( btn->isEnabled() ) { highlightWidget = btn; @@ -333,22 +333,22 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; + TQButton * btn = ( TQButton * ) obj; if (btn->isEnabled()) { - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); - bool isRadio = obj->inherits( "QRadioButton" ); + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); highlightWidget = btn; - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; - QPainter p; + TQPainter p; p.begin( btn ); SFlags flags = Style_Default; if ( btn->isEnabled() ) @@ -359,23 +359,23 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); p.end(); } return false; } return false; - case QEvent::Leave: - if ( ::qt_cast<QToolButton*>(obj) ) + case TQEvent::Leave: + if ( ::tqt_cast<TQToolButton*>(obj) ) { - QToolButton * btn = ( QToolButton * ) obj; + TQToolButton * btn = ( TQToolButton * ) obj; if (obj->inherits( "TaskContainer" )) { currentTaskContainer = NULL; @@ -389,29 +389,29 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) return false; } } - else if ( ::qt_cast<QPushButton*>(obj) || ::qt_cast<QComboBox*>(obj) || obj->inherits( "QSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) + else if ( ::tqt_cast<TQPushButton*>(obj) || ::tqt_cast<TQComboBox*>(obj) || obj->inherits( "TQSplitterHandle" ) || obj->inherits( "AppletHandleDrag" ) ) { - QWidget * btn = ( QWidget * ) obj; + TQWidget * btn = ( TQWidget * ) obj; if ( btn == highlightWidget ) { highlightWidget = NULL; - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) - fadeOut((QPushButton*)obj); + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) + fadeOut((TQPushButton*)obj); else btn->repaint( false ); } return false; } - else if (::qt_cast<KToolBar*>(obj)) + else if (::tqt_cast<KToolBar*>(obj)) { - QObjectList *handlerList = obj->queryList( "QDockWindowHandle" ); + TQObjectList *handlerList = obj->queryList( "TQDockWindowHandle" ); for (uint i= 0; i < handlerList->count(); i++) - ((QWidget*)(handlerList->at(i)))->repaint(false); + ((TQWidget*)(handlerList->at(i)))->repaint(false); return false; } - if ( ::qt_cast<QScrollBar*>(obj) ) + if ( ::tqt_cast<TQScrollBar*>(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; if ( sb == highlightWidget && !sb->draggingSlider() ) { activeScroller = NULL; @@ -420,12 +420,12 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast<QScrollView*>(obj) ) + else if ( ::tqt_cast<TQScrollView*>(obj) ) { - QScrollView *sv = (QScrollView*)obj; -// if (sv->clipRegion().boundingRect().contains(sv->mapFromGlobal(QCursor::pos()))) + TQScrollView *sv = (TQScrollView*)obj; +// if (sv->clipRegion().boundingRect().contains(sv->mapFromGlobal(TQCursor::pos()))) // return false; // mouse is still in the scrollview - if (sv->vScrollBarMode() == QScrollView::AlwaysOff && sv->hScrollBarMode() == QScrollView::AlwaysOff) + if (sv->vScrollBarMode() == TQScrollView::AlwaysOff && sv->hScrollBarMode() == TQScrollView::AlwaysOff) return false; // no sliders available - don't mess up things optionHandler->setScrollerInactive(); if (!(highlightWidget == sv->verticalScrollBar())) @@ -434,22 +434,22 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) sv->horizontalScrollBar()->repaint(false); return false; } - else if ( ::qt_cast<QHeader*>(obj) ) + else if ( ::tqt_cast<TQHeader*>(obj) ) { - QHeader *hw = (QHeader*)obj; + TQHeader *hw = (TQHeader*)obj; currentHeader = NULL; if ( headerHoverID != -1 ) hw->repaint( hw->sectionPos( headerHoverID )-hw->offset(), 0, hw->sectionSize( headerHoverID ), hw->height(), false ); headerHoverID = -1; return false; } - else if (::qt_cast<QTabBar*>(obj)) + else if (::tqt_cast<TQTabBar*>(obj)) { - QTabBar *tb = (QTabBar*)obj; + TQTabBar *tb = (TQTabBar*)obj; currentTabBar = NULL; if ( hoveredTabIndex != -1 ) { - QTab *tmpTab = tb->tabAt(hoveredTabIndex); + TQTab *tmpTab = tb->tabAt(hoveredTabIndex); if (tmpTab) tb->repaint( tmpTab->rect(), false ); } hoveredTabIndex = -1; @@ -457,43 +457,43 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else if ( obj->inherits( "KateView" ) || obj->inherits( "TEWidget") || obj->inherits("CHexViewWidget")) { - QObjectList *scrollerList = obj->queryList( "QScrollBar" ); + TQObjectList *scrollerList = obj->queryList( "TQScrollBar" ); optionHandler->setScrollerInactive(); for (uint i= 0; i < scrollerList->count(); i++) - ((QWidget*)(scrollerList->at(i)))->repaint(false); + ((TQWidget*)(scrollerList->at(i)))->repaint(false); return false; } else if (obj->inherits("KDockWidgetAbstractHeaderDrag")) { - ((QWidget *)obj)->repaint(); + ((TQWidget *)obj)->repaint(); return false; } else if (obj->inherits( "KAnimWidget" )){ return true; } - else if ( obj->inherits( "QLineEdit" ) && obj->parent() && ::qt_cast<QComboBox*>(obj->parent())) { - QWidget *btn = (QWidget*)obj->parent(); + else if ( obj->inherits( "TQLineEdit" ) && obj->parent() && ::tqt_cast<TQComboBox*>(obj->parent())) { + TQWidget *btn = (TQWidget*)obj->parent(); if ( btn == highlightWidget ) highlightWidget = NULL; btn->repaint( false ); return false; } - else if ( obj->inherits( "QRadioButton" ) || obj->inherits( "QCheckBox" ) ) + else if ( obj->inherits( "TQRadioButton" ) || obj->inherits( "TQCheckBox" ) ) { - QButton * btn = ( QButton * ) obj; + TQButton * btn = ( TQButton * ) obj; if (btn == highlightWidget) { - bool isRadio = obj->inherits( "QRadioButton" ); - bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "QStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); + bool isRadio = obj->inherits( "TQRadioButton" ); + bool isStatusChild = btn->parent() && ( btn->parent() ->inherits( "TQStatusBar" ) || btn->parent() ->inherits( "KonqFrameStatusBar" ) ); highlightWidget = NULL; - QFontMetrics fm = btn->fontMetrics(); - QSize lsz = fm.size( ShowPrefix, btn->text() ); - QSize sz = isRadio ? - QSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : - QSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); + TQFontMetrics fm = btn->fontMetrics(); + TQSize lsz = fm.size( ShowPrefix, btn->text() ); + TQSize sz = isRadio ? + TQSize( pixelMetric( PM_ExclusiveIndicatorWidth ), pixelMetric( PM_ExclusiveIndicatorHeight ) ) : + TQSize( pixelMetric( PM_IndicatorWidth ), pixelMetric( PM_IndicatorHeight ) ); int x = 0; int y = isStatusChild ? 0 : ( btn->height() - lsz.height() + fm.height() - sz.height() ) / 2; - QPainter p; + TQPainter p; p.begin( btn ); SFlags flags = Style_Default; if ( btn->isEnabled() ) @@ -504,53 +504,53 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) flags |= Style_Down; if ( highlightWidget == btn ) flags |= Style_MouseOver; - if ( btn->state() == QButton::On ) + if ( btn->state() == TQButton::On ) flags |= Style_On; - else if ( btn->state() == QButton::Off ) + else if ( btn->state() == TQButton::Off ) flags |= Style_Off; if ( isRadio ) - drawControl( CE_RadioButton, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_RadioButton, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); else - drawControl( CE_CheckBox, &p, btn, QRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); + drawControl( CE_CheckBox, &p, btn, TQRect( x, y, sz.width(), sz.height() ), btn->colorGroup(), flags ); p.end(); } return false; } return false; - case QEvent::MouseButtonPress: -// qWarning("class: %s, name: %s",obj->className(), obj->name()); - if ( optionHandler->style() > Panther && ::qt_cast<QToolBar*>(obj)) + case TQEvent::MouseButtonPress: +// tqWarning("class: %s, name: %s",obj->className(), obj->name()); + if ( optionHandler->style() > Panther && ::tqt_cast<TQToolBar*>(obj)) { - QMouseEvent *mev = (QMouseEvent *) ev; - if (mev->button() != Qt::LeftButton) + TQMouseEvent *mev = (TQMouseEvent *) ev; + if (mev->button() != TQt::LeftButton) return false; mouseButtonPressed_ = true; cursorPos_ = mev->globalPos(); - QTimer::singleShot(50,this,SLOT(fakeMouse())); + TQTimer::singleShot(50,this,SLOT(fakeMouse())); return true; // fire this event } - if ( ::qt_cast<QScrollBar*>(obj) && ((QMouseEvent*)ev)->button() != Qt::RightButton) + if ( ::tqt_cast<TQScrollBar*>(obj) && ((TQMouseEvent*)ev)->button() != TQt::RightButton) { - QScrollBar * sb = ( QScrollBar * ) obj; + TQScrollBar * sb = ( TQScrollBar * ) obj; activeScroller = NULL; sb->repaint( false ); return false; } else if (obj->inherits( "KAnimWidget" )) { - ((QFrame *)obj)->setFrameStyle(QFrame::StyledPanel | QFrame::Sunken); + ((TQFrame *)obj)->setFrameStyle(TQFrame::StyledPanel | TQFrame::Sunken); return false; } return false; - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: if ( mouseButtonPressed_ ) { mouseButtonPressed_= false; } - if ( ::qt_cast<QScrollBar*>(obj) ) + if ( ::tqt_cast<TQScrollBar*>(obj) ) { - QScrollBar * sb = ( QScrollBar * ) obj; - QMouseEvent * me = ( QMouseEvent * ) ev; + TQScrollBar * sb = ( TQScrollBar * ) obj; + TQMouseEvent * me = ( TQMouseEvent * ) ev; if ( sb == highlightWidget) { if ( sb->rect().contains( me->pos() ) ) @@ -570,61 +570,61 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } return false; } - else if ( ::qt_cast<QHeader*>(obj) && obj->parent() && ::qt_cast<QListView*>(obj->parent())) + else if ( ::tqt_cast<TQHeader*>(obj) && obj->parent() && ::tqt_cast<TQListView*>(obj->parent())) { - QMouseEvent * me = ( QMouseEvent * ) ev; - headerSortID = ((QHeader*)obj)->sectionAt( me->x() + ((QHeader*)obj)->offset()); + TQMouseEvent * me = ( TQMouseEvent * ) ev; + headerSortID = ((TQHeader*)obj)->sectionAt( me->x() + ((TQHeader*)obj)->offset()); return false; } else if (obj->inherits( "KAnimWidget" )){ - ((QFrame *)obj)->setFrameShape(QFrame::NoFrame); + ((TQFrame *)obj)->setFrameShape(TQFrame::NoFrame); return false; } return false; - case QEvent::FocusIn: - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) + case TQEvent::FocusIn: + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) { - fadeIn((QPushButton*)obj); + fadeIn((TQPushButton*)obj); return false; } - if ( obj->inherits( "QLineEdit" ) ) + if ( obj->inherits( "TQLineEdit" ) ) { - QObject *daddy = obj->parent(); - if ( daddy && daddy->inherits( "QSpinWidget" )) - ((QWidget*)daddy)->repaint(false); + TQObject *daddy = obj->parent(); + if ( daddy && daddy->inherits( "TQSpinWidget" )) + ((TQWidget*)daddy)->repaint(false); else - ((QWidget*)obj)->repaint(false); + ((TQWidget*)obj)->repaint(false); return false; } return false; - case QEvent::FocusOut: - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) + case TQEvent::FocusOut: + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) { - fadeOut((QPushButton*)obj); + fadeOut((TQPushButton*)obj); return false; } - if ( obj->inherits( "QLineEdit" ) ) + if ( obj->inherits( "TQLineEdit" ) ) { - if ( obj->parent() && obj->parent()->inherits( "QSpinWidget" )) - ((QWidget*)obj->parent())->repaint(false); + if ( obj->parent() && obj->parent()->inherits( "TQSpinWidget" )) + ((TQWidget*)obj->parent())->repaint(false); else - ((QWidget*)obj)->repaint(false); + ((TQWidget*)obj)->repaint(false); return false; } return false; - case QEvent::Move: - if ( !(::qt_cast<QToolBar*>(obj) || obj->inherits( "KActiveLabel" ))) + case TQEvent::Move: + if ( !(::tqt_cast<TQToolBar*>(obj) || obj->inherits( "KActiveLabel" ))) return false; - case QEvent::Show: - if (optionHandler->style() == Tiger && ::qt_cast<QToolBar*>(obj)) + case TQEvent::Show: + if (optionHandler->style() == Tiger && ::tqt_cast<TQToolBar*>(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - activeToolbarPix = QPixmap(32,tb->height()); + activeToolbarPix = TQPixmap(32,tb->height()); KPixmapEffect::gradient(activeToolbarPix, optionHandler->aDecoColor1(), optionHandler->aDecoColor2(), KPixmapEffect::VerticalGradient, 0); - QPainter painter(&activeToolbarPix); + TQPainter painter(&activeToolbarPix); painter.setPen( optionHandler->aDecoColor2().dark(130) ); painter.drawLine ( 0, tb->height()-1, 31, tb->height()-1 ); painter.end(); @@ -636,64 +636,64 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->setPalette( pal ); } tb->removeEventFilter(eventKiller); } else { - QPalette pal( tb->palette() ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); tb->removeEventFilter(eventKiller); } } - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) { - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; if (bfi_) return false; bfi_ = new ButtonFadeInfo(); - bfi.insert(((QPushButton*)obj)->winId(),bfi_); - if (((QPushButton*)obj)->isDefault()) - fadeIn((QPushButton*)obj); + bfi.insert(((TQPushButton*)obj)->winId(),bfi_); + if (((TQPushButton*)obj)->isDefault()) + fadeIn((TQPushButton*)obj); return false; } - if (::qt_cast<QProgressBar*>(obj)) + if (::tqt_cast<TQProgressBar*>(obj)) { - progAnimWidgets[(QWidget*)obj] = 0; + progAnimWidgets[(TQWidget*)obj] = 0; return false; } if ( !qstrcmp(obj->name(), "kde toolbar widget") ) { - QWidget* lb = static_cast<QWidget*>(obj); - if (lb->backgroundMode() == Qt::PaletteButton) - lb->setBackgroundMode(Qt::PaletteBackground); + TQWidget* lb = static_cast<TQWidget*>(obj); + if (lb->backgroundMode() == TQt::PaletteButton) + lb->setBackgroundMode(TQt::PaletteBackground); lb->removeEventFilter(this); return false; } else if ( !obj->inherits( "KActiveLabel" )) return false; - case QEvent::Resize:{ - QResizeEvent* rev = (QResizeEvent*) ev; - if (::qt_cast<QPopupMenu*>(obj) && optionHandler->MenuBackground() == Gradient) + case TQEvent::Resize:{ + TQResizeEvent* rev = (TQResizeEvent*) ev; + if (::tqt_cast<TQPopupMenu*>(obj) && optionHandler->MenuBackground() == Gradient) { - KPixmap tmpPix = QPixmap(rev->size().width(),32); - ((QWidget *)obj)->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(), KPixmapEffect::HorizontalGradient, 100, 100)); + KPixmap tmpPix = TQPixmap(rev->size().width(),32); + ((TQWidget *)obj)->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(), KPixmapEffect::HorizontalGradient, 100, 100)); } - else if (optionHandler->style() == Tiger && ::qt_cast<QToolBar*>(obj) && rev->size().height() != rev->oldSize().height()) + else if (optionHandler->style() == Tiger && ::tqt_cast<TQToolBar*>(obj) && rev->size().height() != rev->oldSize().height()) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - activeToolbarPix = QPixmap(32,rev->size().height()); + activeToolbarPix = TQPixmap(32,rev->size().height()); KPixmapEffect::gradient(activeToolbarPix, optionHandler->aDecoColor1(), optionHandler->aDecoColor2(), KPixmapEffect::VerticalGradient, 0); - QPainter painter(&activeToolbarPix); + TQPainter painter(&activeToolbarPix); painter.setPen( optionHandler->aDecoColor2().dark(130) ); painter.drawLine ( 0, rev->size().height()-1, 31, rev->size().height()-1 ); painter.end(); @@ -705,54 +705,54 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } else { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->setPalette( pal ); } tb->removeEventFilter(eventKiller); } else { - QPalette pal( tb->palette() ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); tb->removeEventFilter(eventKiller); } } /*hmhmhmm... this may break qgroupbox children?!?*/ - else if (::qt_cast<QGroupBox*>(obj)) + else if (::tqt_cast<TQGroupBox*>(obj)) { - QGroupBox* gb = (QGroupBox*)(obj); + TQGroupBox* gb = (TQGroupBox*)(obj); if(gb->title().isEmpty()) return false; - QResizeEvent * e = (QResizeEvent*)ev; + TQResizeEvent * e = (TQResizeEvent*)ev; int fm = gb->fontMetrics().height()+(gb->isCheckable()?4:1); - gb->setFrameRect(QRect(gb->rect().x(), gb->rect().y()+fm, e->size().width(), e->size().height()-fm/*-gb->frameWidth()*/)); + gb->setFrameRect(TQRect(gb->rect().x(), gb->rect().y()+fm, e->size().width(), e->size().height()-fm/*-gb->frameWidth()*/)); if(gb->layout()) - gb->layout()->setGeometry(QRect(gb->rect().x(), gb->rect().y(), e->size().width(), e->size().height())); + gb->layout()->setGeometry(TQRect(gb->rect().x(), gb->rect().y(), e->size().width(), e->size().height())); return true; } else if ( obj->inherits( "KActiveLabel" )) { - QWidget * w = ( QWidget * ) obj; - QPalette pal( w->palette() ); - QPixmap *tile = pal.brush( QPalette::Active, QColorGroup::Background ).pixmap(); + TQWidget * w = ( TQWidget * ) obj; + TQPalette pal( w->palette() ); + TQPixmap *tile = pal.brush( TQPalette::Active, TQColorGroup::Background ).pixmap(); if ( tile ) { - QSize sz( ev->type() == QEvent::Resize ? rev->size() : w->size() ); - QPixmap pix( sz.width(), sz.height() ); - QPainter p; + TQSize sz( ev->type() == TQEvent::Resize ? rev->size() : w->size() ); + TQPixmap pix( sz.width(), sz.height() ); + TQPainter p; if (optionHandler->style() == Brushed) { p.begin( &pix ); // calc brush offsets - QWidget *window = w->topLevelWidget(); + TQWidget *window = w->topLevelWidget(); int leftWidth; int rightWidth; if (window) { - QPoint zero = w->mapTo(window, QPoint(0,0)); + TQPoint zero = w->mapTo(window, TQPoint(0,0)); leftWidth = (window->width()-1024)/2 - zero.x(); rightWidth = pix.width() - (1024 + leftWidth); if (leftWidth > 0) @@ -774,27 +774,27 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) else p.drawTiledPixmap(0, 0, pix.width(), sz.height(), gradBrush, (1024-pix.width())/2, 0); p.end(); - QBrush brush( pal.active().background(), pix ); - pal.setBrush( QColorGroup::Base, brush ); + TQBrush brush( pal.active().background(), pix ); + pal.setBrush( TQColorGroup::Base, brush ); w->setPalette( pal ); } else { p.begin(w); - p.drawTiledPixmap(QRect(0,0,sz.width(),sz.height()), *tile, w->backgroundOffset()); + p.drawTiledPixmap(TQRect(0,0,sz.width(),sz.height()), *tile, w->backgroundOffset()); } } return false; } - else if ((optionHandler->style() == Brushed) && obj->isWidgetType() && ((QWidget*)obj)->isTopLevel() && - !(::qt_cast<QPopupMenu*>(obj) || ::qt_cast<QMenuBar*>(obj) || ((QWidget*)obj)->isDesktop () || ::qt_cast<QListBox*>(obj) || - obj->inherits("QTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ) && (ev->type() == QEvent::Show || + else if ((optionHandler->style() == Brushed) && obj->isWidgetType() && ((TQWidget*)obj)->isTopLevel() && + !(::tqt_cast<TQPopupMenu*>(obj) || ::tqt_cast<TQMenuBar*>(obj) || ((TQWidget*)obj)->isDesktop () || ::tqt_cast<TQListBox*>(obj) || + obj->inherits("TQTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ) && (ev->type() == TQEvent::Show || rev->size().width() != rev->oldSize().width())) { - QWidget* widget = (QWidget*)obj; + TQWidget* widget = (TQWidget*)obj; // create new brushpix - QPixmap tmpBrushPix(ev->type() == QEvent::Show?widget->width():rev->size().width(), plainBrush.height()); - QPainter lightMe(&tmpBrushPix); + TQPixmap tmpBrushPix(ev->type() == TQEvent::Show?widget->width():rev->size().width(), plainBrush.height()); + TQPainter lightMe(&tmpBrushPix); // calc brush offsets int tmpWidth; if ((tmpWidth = tmpBrushPix.width()) > 1024) @@ -809,30 +809,30 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) lightMe.drawPixmap(0, 0, gradBrush, (1024-tmpWidth)/2, 0, tmpWidth); lightMe.end(); //update palette - QPalette pal( qApp->palette()); - QBrush brush( pal.active().background(), tmpBrushPix ); - pal.setBrush ( QColorGroup::Background, brush ); + TQPalette pal( tqApp->palette()); + TQBrush brush( pal.active().background(), tmpBrushPix ); + pal.setBrush ( TQColorGroup::Background, brush ); //reset apps palette - qApp->installEventFilter(eventKiller); // pssst... don't let anyone know... - qApp->setPalette(pal); - pal = QPalette(widget->palette()); - pal.setBrush ( QColorGroup::Background, brush ); + tqApp->installEventFilter(eventKiller); // pssst... don't let anyone know... + tqApp->setPalette(pal); + pal = TQPalette(widget->palette()); + pal.setBrush ( TQColorGroup::Background, brush ); widget->installEventFilter(eventKiller); // pssst... don't let anyone know... widget->setPalette(pal); widget->removeEventFilter(eventKiller); // ...that we just replaced the palette - QObjectList *kids = widget->queryList("QWidget"); //TODO: implement a faster version, depending on ::qt_cast<QWidget*>() + TQObjectList *kids = widget->queryList("TQWidget"); //TODO: implement a faster version, depending on ::tqt_cast<TQWidget*>() for (uint i= 0; i < kids->count(); i++) { - QWidget *kid = (QWidget*)kids->at(i); + TQWidget *kid = (TQWidget*)kids->at(i); if (kid && kid->paletteBackgroundPixmap() && !(kid->isTopLevel() || kid->inherits( "KonqIconViewWidget" ) || kid->inherits( "khtml") || kid->inherits( "KActiveLabel") || qstrcmp( kid->name(), "_B_ALI_HEADER" ) == 0 || (kid->parentWidget() && kid->parentWidget()->inherits("Thumbnail") || kid->parentWidget()->inherits("MarkListItem")) )) { //we can loose those kids anytime - especially if the user plays on konqueror... - if (::qt_cast<KToolBarButton*>(kid)) + if (::tqt_cast<KToolBarButton*>(kid)) kid->setErasePixmap(tmpBrushPix); else { - pal = QPalette(kid->palette()); - pal.setBrush ( QColorGroup::Background, brush ); + pal = TQPalette(kid->palette()); + pal.setBrush ( TQColorGroup::Background, brush ); kid->installEventFilter(eventKiller); // pssst... don't let anyone know... kid->setPalette(pal); kid->removeEventFilter(eventKiller); // ...that we just replaced the palette @@ -840,60 +840,60 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } } delete kids; - qApp->removeEventFilter(eventKiller); // ...that we just replaced the palette + tqApp->removeEventFilter(eventKiller); // ...that we just replaced the palette return false; } return false; } - case QEvent::Hide: - if (optionHandler->AnimateButton() && ::qt_cast<QPushButton*>(obj)) + case TQEvent::Hide: + if (optionHandler->AnimateButton() && ::tqt_cast<TQPushButton*>(obj)) { - ButtonFadeInfo *bfi_ = bfi[((QPushButton*)obj)->winId()]; + ButtonFadeInfo *bfi_ = bfi[((TQPushButton*)obj)->winId()]; if (bfi_) { obj->killTimer(bfi_->timerId); - // qWarning("%u: stopped (%d)", ((QPushButton*)obj)->winId(), bfi_->timerId); + // tqWarning("%u: stopped (%d)", ((TQPushButton*)obj)->winId(), bfi_->timerId); bfi_->index=0; bfi_->timerId=0; } } - case QEvent::ApplicationPaletteChange: - if ( obj->inherits( "QTipLabel" ) ) + case TQEvent::ApplicationPaletteChange: + if ( obj->inherits( "TQTipLabel" ) ) { - ( ( QWidget* ) obj ) ->setPalette( tooltipPalette ); + ( ( TQWidget* ) obj ) ->setPalette( tooltipPalette ); return true; } return false; - case QEvent::PaletteChange: - if (obj->inherits("QStatusBar")) + case TQEvent::PaletteChange: + if (obj->inherits("TQStatusBar")) { obj->installEventFilter(eventKiller); - ((QWidget*)obj)->setPalette(qApp->palette()); + ((TQWidget*)obj)->setPalette(tqApp->palette()); obj->removeEventFilter(eventKiller); return true; } - if ( obj->inherits( "QTipLabel" ) ) + if ( obj->inherits( "TQTipLabel" ) ) { - ( ( QWidget* ) obj ) ->setPalette( tooltipPalette ); + ( ( TQWidget* ) obj ) ->setPalette( tooltipPalette ); return true; } if (obj->inherits("KCalcButton")) { - QWidget *w = (QWidget*)obj; - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background)); + TQWidget *w = (TQWidget*)obj; + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background)); w->installEventFilter(eventKiller); w->setPalette( pal ); w->removeEventFilter(eventKiller); - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); return true; } return false; - case QEvent::WindowActivate: - if (optionHandler->style() == Tiger && ::qt_cast<QToolBar*>(obj)) + case TQEvent::WindowActivate: + if (optionHandler->style() == Tiger && ::tqt_cast<TQToolBar*>(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { tb->installEventFilter(eventKiller); @@ -903,16 +903,16 @@ bool LiquidStyle::eventFilter( QObject *obj, QEvent *ev ) } } return false; - case QEvent::WindowDeactivate: - if (optionHandler->style() == Tiger && ::qt_cast<QToolBar*>(obj)) + case TQEvent::WindowDeactivate: + if (optionHandler->style() == Tiger && ::tqt_cast<TQToolBar*>(obj)) { - QToolBar *tb = (QToolBar*)obj; - QPoint pt = tb->mapTo(tb->topLevelWidget(), QPoint(0,0)); + TQToolBar *tb = (TQToolBar*)obj; + TQPoint pt = tb->mapTo(tb->topLevelWidget(), TQPoint(0,0)); if (pt.y() == 0) { - QPalette pal( tb->palette() ); - pal.setColor( QColorGroup::Background, qApp->palette().color(QPalette::Active, QColorGroup::Background) ); - pal.setBrush ( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background) ); + TQPalette pal( tb->palette() ); + pal.setColor( TQColorGroup::Background, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background) ); + pal.setBrush ( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background) ); tb->installEventFilter(eventKiller); tb->setPalette( pal ); obj->removeEventFilter(eventKiller); @@ -928,16 +928,16 @@ void LiquidStyle::fakeMouse() { if (mouseButtonPressed_) // delayed mousepress for move event { - QCursor::setPos ( cursorPos_ ); - XTestFakeButtonEvent(qt_xdisplay(),1, false, 0); - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Alt_L), true, 0); - XTestFakeButtonEvent(qt_xdisplay(),1, true, 0); - XTestFakeKeyEvent(qt_xdisplay(),XKeysymToKeycode(qt_xdisplay(), XK_Alt_L), false, 0); - XFlush(qt_xdisplay()); + TQCursor::setPos ( cursorPos_ ); + XTestFakeButtonEvent(tqt_xdisplay(),1, false, 0); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Alt_L), true, 0); + XTestFakeButtonEvent(tqt_xdisplay(),1, true, 0); + XTestFakeKeyEvent(tqt_xdisplay(),XKeysymToKeycode(tqt_xdisplay(), XK_Alt_L), false, 0); + XFlush(tqt_xdisplay()); } } -void LiquidStyle::fadeIn(QPushButton *button) +void LiquidStyle::fadeIn(TQPushButton *button) { ButtonFadeInfo *bfi_ = bfi[button->winId()]; if (!bfi_) @@ -950,11 +950,11 @@ void LiquidStyle::fadeIn(QPushButton *button) { bfi_->index = 0; bfi_->timerId = button->startTimer(button->isDefault()?100:50); - // qWarning("%u: started (%d)", button->winId(), bfi_->timerId); + // tqWarning("%u: started (%d)", button->winId(), bfi_->timerId); } } -void LiquidStyle::fadeOut(QPushButton *button) +void LiquidStyle::fadeOut(TQPushButton *button) { ButtonFadeInfo *bfi_ = bfi[button->winId()]; if (!bfi_) @@ -967,21 +967,21 @@ void LiquidStyle::fadeOut(QPushButton *button) { bfi_->index = 9; bfi_->timerId = button->startTimer(50); - // qWarning("%u: started (%d)", button->winId(), bfi_->timerId); + // tqWarning("%u: started (%d)", button->winId(), bfi_->timerId); } } -BMShower::BMShower(QObject *parent) : QObject(parent) +BMShower::BMShower(TQObject *parent) : TQObject(parent) { } -bool BMShower::eventFilter( QObject *obj, QEvent *ev ) +bool BMShower::eventFilter( TQObject *obj, TQEvent *ev ) { - if (ev->type() == QEvent::Show && (obj->isWidgetType() && ((QWidget*)obj)->isTopLevel() && - !(::qt_cast<QPopupMenu*>(obj) || ::qt_cast<QMenuBar*>(obj) || ((QWidget*)obj)->isDesktop () || ::qt_cast<QListBox*>(obj) || - obj->inherits("QTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ))) + if (ev->type() == TQEvent::Show && (obj->isWidgetType() && ((TQWidget*)obj)->isTopLevel() && + !(::tqt_cast<TQPopupMenu*>(obj) || ::tqt_cast<TQMenuBar*>(obj) || ((TQWidget*)obj)->isDesktop () || ::tqt_cast<TQListBox*>(obj) || + obj->inherits("TQTipLabel") || obj->inherits("AlphaWidget") || obj->inherits("ScrollWidget") ))) { - QResizeEvent* rev = new QResizeEvent(((QWidget*)obj)->size(), QSize(0,0)); + TQResizeEvent* rev = new TQResizeEvent(((TQWidget*)obj)->size(), TQSize(0,0)); parent()->eventFilter( obj, rev ); obj->removeEventFilter(this); delete rev; diff --git a/style/optionHandler.cpp b/style/optionHandler.cpp index d96b700..2ab110a 100644 --- a/style/optionHandler.cpp +++ b/style/optionHandler.cpp @@ -1,17 +1,17 @@ #include "baghira.h" -#include <qapplication.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qevent.h> -#include <qimage.h> -#include <qobject.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qpopupmenu.h> -#include <qrect.h> -#include <qsettings.h> -#include <qsize.h> -#include <qstring.h> +#include <tqapplication.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqevent.h> +#include <tqimage.h> +#include <tqobject.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqpopupmenu.h> +#include <tqrect.h> +#include <tqsettings.h> +#include <tqsize.h> +#include <tqstring.h> // #include <kconfig.h> #include <kpixmapeffect.h> #include <stdio.h> @@ -24,42 +24,42 @@ x > u ? u :\ x -OptionHandler::OptionHandler( QObject *parent ) : QObject( parent ) { +OptionHandler::OptionHandler( TQObject *parent ) : TQObject( parent ) { scrollerActive = false; groupShadowButton = false; reloadSettings(); } -const QColor& OptionHandler::textColor() { - return ( useCustomMenuColor ? fgColor : qApp->palette().active().text() ); +const TQColor& OptionHandler::textColor() { + return ( useCustomMenuColor ? fgColor : tqApp->palette().active().text() ); } -const QColor& OptionHandler::bgColor() { - return qApp->palette().active().background(); +const TQColor& OptionHandler::bgColor() { + return tqApp->palette().active().background(); } -const QColor& OptionHandler::buttonColor() { +const TQColor& OptionHandler::buttonColor() { LiquidStyle * style = ( LiquidStyle* ) parent(); /*if (style->isKicker) return style->origPanelBrush.color(); else */if (style->isOOO) return CustomButtonColor(); - else return qApp->palette().active().button(); + else return tqApp->palette().active().button(); } void OptionHandler::reloadSettings() { // gather options... - QSettings config; + TQSettings config; config.beginGroup("/baghira/Style"); //we need that first to make sure we use some proper settings ;) - customButtonColor = QColor(config.readNumEntry("Design_ButtonColor",(int)qApp->palette().active().button().rgb())); + customButtonColor = TQColor(config.readNumEntry("Design_ButtonColor",(int)tqApp->palette().active().button().rgb())); // design handling: // first try file: - QString tmpString; + TQString tmpString; FILE *file = NULL; wmDesign = 5; for (int i = 0; i < 8; i++) custCols[i] = -1; - if (qstrcmp( qApp->argv() [ 0 ], "ksplash" ) == 0) + if (qstrcmp( tqApp->argv() [ 0 ], "ksplash" ) == 0) { style_ = Panther; _toolbuttonStyle = Panther; @@ -72,17 +72,17 @@ void OptionHandler::reloadSettings() { { // first try for a tmp file from bab starter int tmpFile = 0; - tmpString = QDir::homeDirPath() + "/.baghira/.bab/" + qApp->argv() [ 0 ]; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/" + tqApp->argv() [ 0 ]; file = fopen(tmpString.latin1(), "r"); if( file == NULL ) { tmpFile = 1; - tmpString = QDir::homeDirPath() + "/.baghira/" + qApp->argv() [ 0 ]; + tmpString = TQDir::homeDirPath() + "/.baghira/" + tqApp->argv() [ 0 ]; file = fopen(tmpString.latin1(), "r"); if( file == NULL ) { tmpFile = 2; - tmpString = QDir::homeDirPath() + "/.baghira/.bab/.style"; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.style"; file = fopen(tmpString.latin1(), "r"); } } @@ -110,7 +110,7 @@ void OptionHandler::reloadSettings() { remove(tmpString.latin1()); // remove TEMPORARY file else if (tmpFile == 2) { - tmpString = QDir::homeDirPath() + "/.baghira/.bab/.deco"; + tmpString = TQDir::homeDirPath() + "/.baghira/.bab/.deco"; if ((file = fopen(tmpString.latin1(), "r")) != NULL) { fscanf(file,"%u\n%u\n",&i3, &wmDesign); @@ -148,23 +148,23 @@ void OptionHandler::reloadSettings() { useCustomMenuColor = (menuColorStyle == 2); shadowText = config.readBoolEntry( "Menu_ShadowText", false); if (useCustomMenuColor){ - color = QColor( config.readNumEntry( "Menu_Color1", 0 ) ); - color2 = QColor( config.readNumEntry( "Menu_Color2", 0 ) ); - colorHigh = QColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) ); - fgColor = QColor( config.readNumEntry( "Menu_TextColor", 0 ) ); - fgColorHigh = QColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) ); + color = TQColor( config.readNumEntry( "Menu_Color1", 0 ) ); + color2 = TQColor( config.readNumEntry( "Menu_Color2", 0 ) ); + colorHigh = TQColor( config.readNumEntry( "Menu_ColorHighlight", 0 ) ); + fgColor = TQColor( config.readNumEntry( "Menu_TextColor", 0 ) ); + fgColorHigh = TQColor( config.readNumEntry( "Menu_TextColorHighlight", 0 ) ); } else if (menuColorButton){ color = customButtonColor; color2 = customButtonColor.dark(130); } else { - color = qApp->palette().active().background(); - color2 = qApp->palette().active().background().dark(130); + color = tqApp->palette().active().background(); + color2 = tqApp->palette().active().background().dark(130); } drawMenuStripe_ = config.readBoolEntry("Menu_DrawMenuStripe", false); if (drawMenuStripe_) - menuStripeColor_ = QColor(config.readNumEntry("Menu_StripeColor"),(int)Qt::white.rgb()); + menuStripeColor_ = TQColor(config.readNumEntry("Menu_StripeColor"),(int)TQt::white.rgb()); // color stuff // widgets customWidgetColor = config.readBoolEntry( "Colors_UseCustomColors", false); @@ -181,7 +181,7 @@ void OptionHandler::reloadSettings() { customColors[ CustomSBGroove ].setRgb( config.readNumEntry( "Colors_SliderGroove", ( int ) bgColor().rgb() ) ); } if (inactiveButtonColor == Custom) - customInactiveButtonColor = QColor( config.readNumEntry( "Design_InactiveButtonColor", (int) bgColor().rgb())); + customInactiveButtonColor = TQColor( config.readNumEntry( "Design_InactiveButtonColor", (int) bgColor().rgb())); contrast += config.readNumEntry( "Design_StippleContrast", 3); bevelHighlights_ = config.readBoolEntry( "Design_BevelAsHighlight", true); //shadows @@ -191,11 +191,11 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha expanderStyle = config.readNumEntry( "Special_ExpanderStyle", Apple); useCustomExpanderColor = config.readBoolEntry( "Special_CustomExpanderColor", false); if (useCustomExpanderColor) - expanderColor = QColor( config.readNumEntry( "Special_ExpanderColor", (int) qApp->palette().active().text().rgb())); + expanderColor = TQColor( config.readNumEntry( "Special_ExpanderColor", (int) tqApp->palette().active().text().rgb())); drawDotlines = config.readBoolEntry( "Special_DrawTreeLines", true); if (drawDotlines){ dotlineStyle = config.readNumEntry( "Special_TreelineStyle", Line); - dotlineColor = QColor( config.readNumEntry( "Special_TreelineColor", (int) qApp->palette().active().mid().rgb())); + dotlineColor = TQColor( config.readNumEntry( "Special_TreelineColor", (int) tqApp->palette().active().mid().rgb())); } //slider squeezesbslider = config.readBoolEntry( "Special_SqueezeSlider", false ); @@ -218,24 +218,24 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha config.endGroup(); config.beginGroup("/baghira/Deco"); - titleButtonColor_[0] = QColor((unsigned int)config.readNumEntry( "CloseButtonColor", QColor(200,85,70).rgb())); - titleButtonColor_[1] = QColor((unsigned int)config.readNumEntry( "MinButtonColor", QColor(230,155,40).rgb())); - titleButtonColor_[2] = QColor((unsigned int)config.readNumEntry( "MaxButtonColor", QColor(121,180,54).rgb())); + titleButtonColor_[0] = TQColor((unsigned int)config.readNumEntry( "CloseButtonColor", TQColor(200,85,70).rgb())); + titleButtonColor_[1] = TQColor((unsigned int)config.readNumEntry( "MinButtonColor", TQColor(230,155,40).rgb())); + titleButtonColor_[2] = TQColor((unsigned int)config.readNumEntry( "MaxButtonColor", TQColor(121,180,54).rgb())); if (style_ == Jaguar) { - titleColor_[0] = QColor((unsigned int)config.readNumEntry( "inactiveColor1_1", QColor(204,214,230).rgb())); - titleColor_[1] = QColor((unsigned int)config.readNumEntry( "inactiveColor2_1", QColor(194,196,211).rgb())); + titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "inactiveColor1_1", TQColor(204,214,230).rgb())); + titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "inactiveColor2_1", TQColor(194,196,211).rgb())); } else if (style_ != Brushed) { - titleColor_[0] = QColor((unsigned int)config.readNumEntry( "activeColor1_2", QColor(238,238,238).rgb())); - titleColor_[1] = QColor((unsigned int)config.readNumEntry( "activeColor2_2", QColor(205,202,205).rgb())); + titleColor_[0] = TQColor((unsigned int)config.readNumEntry( "activeColor1_2", TQColor(238,238,238).rgb())); + titleColor_[1] = TQColor((unsigned int)config.readNumEntry( "activeColor2_2", TQColor(205,202,205).rgb())); } if (style_ == Tiger) { int r,g,b; - aDecoColor1_ = QColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) QColor(205,202,205).rgb())); - aDecoColor2_ = QColor((unsigned int)config.readNumEntry( "activeColor1_4", (unsigned int) QColor(238,238,238).rgb())); + aDecoColor1_ = TQColor((unsigned int)config.readNumEntry( "activeColor2_4", (unsigned int) TQColor(205,202,205).rgb())); + aDecoColor2_ = TQColor((unsigned int)config.readNumEntry( "activeColor1_4", (unsigned int) TQColor(238,238,238).rgb())); r = (int)CLAMP(aDecoColor1_.red() * pow((double)aDecoColor1_.red() / (double)aDecoColor2_.red(),2.0),0,255); g = (int)CLAMP(aDecoColor1_.green() * pow((double)aDecoColor1_.green() / (double)aDecoColor2_.green(),2.0),0,255); b = (int)CLAMP(aDecoColor1_.blue() * pow((double)aDecoColor1_.blue() / (double)aDecoColor2_.blue(),2.0),0,255); @@ -243,8 +243,8 @@ groupboxshadow = (style_ == Brushed) ? false : config.readBoolEntry( "Design_Sha } else { - aDecoColor1_ = Qt::black; - aDecoColor2_ = Qt::black; + aDecoColor1_ = TQt::black; + aDecoColor2_ = TQt::black; } config.endGroup(); // Option gathered diff --git a/style/polish.cpp b/style/polish.cpp index f845d2b..2f4bbeb 100644 --- a/style/polish.cpp +++ b/style/polish.cpp @@ -1,35 +1,35 @@ -//#include <qdir.h> +//#include <tqdir.h> #include "baghira.h" #include <sys/types.h> #include <sys/stat.h> #include <unistd.h> -#include <qapplication.h> -#include <qbrush.h> -#include <qcolor.h> -#include <qcombobox.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qframe.h> -#include <qfile.h> -#include <qheader.h> -#include <qgroupbox.h> -//#include <qiconview.h> -#include <qlabel.h> -#include <qlayout.h> -#include <qlistbox.h> +#include <tqapplication.h> +#include <tqbrush.h> +#include <tqcolor.h> +#include <tqcombobox.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqframe.h> +#include <tqfile.h> +#include <tqheader.h> +#include <tqgroupbox.h> +//#include <tqiconview.h> +#include <tqlabel.h> +#include <tqlayout.h> +#include <tqlistbox.h> #include <klistview.h> #include <kmenubar.h> -#include <qpalette.h> -#include <qpainter.h> -#include <qpopupmenu.h> -#include <qpushbutton.h> -#include <qscrollbar.h> -#include <qscrollview.h> -#include <qsizepolicy.h> -#include <qslider.h> -#include <qtabbar.h> -#include <qtoolbar.h> -#include <qtoolbutton.h> +#include <tqpalette.h> +#include <tqpainter.h> +#include <tqpopupmenu.h> +#include <tqpushbutton.h> +#include <tqscrollbar.h> +#include <tqscrollview.h> +#include <tqsizepolicy.h> +#include <tqslider.h> +#include <tqtabbar.h> +#include <tqtoolbar.h> +#include <tqtoolbutton.h> #include <kdeversion.h> #include <kpixmapeffect.h> #include <kglobalsettings.h> @@ -49,7 +49,7 @@ x #endif -void LiquidStyle::polish( QPalette &pal ) +void LiquidStyle::polish( TQPalette &pal ) { if ( inExitPolish ) return ; @@ -67,12 +67,12 @@ void LiquidStyle::polish( QPalette &pal ) btnDict.clear(); btnShadowedDict.clear(); // reset brushes - pagerHoverBrush = QBrush(); - pagerBrush = QBrush(); + pagerHoverBrush = TQBrush(); + pagerBrush = TQBrush(); bool newPalette = false; struct stat buffer; - if ( stat( QFile::encodeName( QDir::homeDirPath() + "/.qt/qtrc" ), &buffer ) == 0 ) + if ( stat( TQFile::encodeName( TQDir::homeDirPath() + "/.qt/qtrc" ), &buffer ) == 0 ) { unsigned int lastModTime = ( unsigned int ) buffer.st_mtime; if ( lastModTime > qtrcModificationTime ) @@ -91,57 +91,57 @@ void LiquidStyle::polish( QPalette &pal ) return ; } - originalBgColor = pal.color(QPalette::Active, QColorGroup::Background); + originalBgColor = pal.color(TQPalette::Active, TQColorGroup::Background); if (optionHandler->style() == Brushed) - pal.setColor(QColorGroup::Background, brushedMetalColor(optionHandler->BrushTint())); + pal.setColor(TQColorGroup::Background, brushedMetalColor(optionHandler->BrushTint())); if (isOOO) - pal.setColor( QColorGroup::Button, pal.active().background() ); + pal.setColor( TQColorGroup::Button, pal.active().background() ); else if (optionHandler->custCols[0] != -1) { - pal.setColor(QColorGroup::Background, QColor(optionHandler->custCols[0])); - pal.setColor(QColorGroup::Button, QColor(optionHandler->custCols[1])); - pal.setColor(QColorGroup::Base, QColor(optionHandler->custCols[2])); - pal.setColor(QPalette::Active, QColorGroup::Text, QColor(optionHandler->custCols[3])); - pal.setColor(QPalette::Active, QColorGroup::Foreground, QColor(optionHandler->custCols[3])); - pal.setColor(QColorGroup::Highlight, QColor(optionHandler->custCols[4])); - pal.setColor(QPalette::Active, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); - pal.setColor(QPalette::Active, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); - pal.setColor(QColorGroup::Mid, QColor((qRed(optionHandler->custCols[2])+qRed(optionHandler->custCols[3]))/2,(qGreen(optionHandler->custCols[2])+qGreen(optionHandler->custCols[3]))/2,(qBlue(optionHandler->custCols[2])+qBlue(optionHandler->custCols[3]))/2)); + pal.setColor(TQColorGroup::Background, TQColor(optionHandler->custCols[0])); + pal.setColor(TQColorGroup::Button, TQColor(optionHandler->custCols[1])); + pal.setColor(TQColorGroup::Base, TQColor(optionHandler->custCols[2])); + pal.setColor(TQPalette::Active, TQColorGroup::Text, TQColor(optionHandler->custCols[3])); + pal.setColor(TQPalette::Active, TQColorGroup::Foreground, TQColor(optionHandler->custCols[3])); + pal.setColor(TQColorGroup::Highlight, TQColor(optionHandler->custCols[4])); + pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5])); + pal.setColor(TQPalette::Active, TQColorGroup::ButtonText, TQColor(optionHandler->custCols[6])); + pal.setColor(TQColorGroup::Mid, TQColor((tqRed(optionHandler->custCols[2])+tqRed(optionHandler->custCols[3]))/2,(tqGreen(optionHandler->custCols[2])+tqGreen(optionHandler->custCols[3]))/2,(tqBlue(optionHandler->custCols[2])+tqBlue(optionHandler->custCols[3]))/2)); - pal.setColor(QPalette::Inactive, QColorGroup::Text, QColor(optionHandler->custCols[3])); - pal.setColor(QPalette::Inactive, QColorGroup::HighlightedText, QColor(optionHandler->custCols[5])); - pal.setColor(QPalette::Inactive, QColorGroup::ButtonText, QColor(optionHandler->custCols[6])); + pal.setColor(TQPalette::Inactive, TQColorGroup::Text, TQColor(optionHandler->custCols[3])); + pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor(optionHandler->custCols[5])); + pal.setColor(TQPalette::Inactive, TQColorGroup::ButtonText, TQColor(optionHandler->custCols[6])); } else - pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor() ); + pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor() ); #if 0 if ( isKicker ) { - origPanelBrush = pal.brush( QPalette::Active, QColorGroup::Background ); + origPanelBrush = pal.brush( TQPalette::Active, TQColorGroup::Background ); origPanelPalette = pal; - QColor c( pal.active().background() ); + TQColor c( pal.active().background() ); if ( optionHandler->usePanelCustomColor() && optionHandler->panelCustomColor().isValid() ) c = optionHandler->panelCustomColor(); kickerColor = c; - pal.setColor( QColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) ); - pal.setColor( QColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) ); - pal.setColor( QColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) ); - pal.setColor( QColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) ); - pal.setColor( QColorGroup::Button, optionHandler->CustomButtonColor()); + pal.setColor( TQColorGroup::Mid, optionHandler->CustomButtonColor().dark( 110 ) ); + pal.setColor( TQColorGroup::Dark, optionHandler->CustomButtonColor().dark( 130 ) ); + pal.setColor( TQColorGroup::Midlight, optionHandler->CustomButtonColor().light( 110 ) ); + pal.setColor( TQColorGroup::Light, optionHandler->CustomButtonColor().light( 115 ) ); + pal.setColor( TQColorGroup::Button, optionHandler->CustomButtonColor()); if (optionHandler->style() == Brushed) { - QBrush brush( c, gradBrush ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, gradBrush ); + pal.setBrush( TQColorGroup::Background, brush ); } else if ( optionHandler->usePanelStipple() ) { - QPixmap stipple( 64, 64 ); + TQPixmap stipple( 64, 64 ); stipple.fill( c.rgb() ); - QPainter p( &stipple ); + TQPainter p( &stipple ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/4) ) ); for ( int i = 1; i < 64; i += 4 ) { @@ -152,25 +152,25 @@ void LiquidStyle::polish( QPalette &pal ) for ( int i = 2; i < 63; i += 4 ) p.drawLine( 0, i, 63, i ); p.end(); - QBrush brush( c, stipple ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, stipple ); + pal.setBrush( TQColorGroup::Background, brush ); } else - pal.setBrush( QColorGroup::Background, c ); + pal.setBrush( TQColorGroup::Background, c ); } #endif /*else*/ if (optionHandler->style() == Brushed) { - QColor c( pal.active().background() ); - QBrush brush( c, gradBrush ); - pal.setBrush( QColorGroup::Background, brush ); + TQColor c( pal.active().background() ); + TQBrush brush( c, gradBrush ); + pal.setBrush( TQColorGroup::Background, brush ); } else if ( !isPlain() ) { - QColor c( pal.active().background() ); - QPixmap stipple( 64, 64 ); + TQColor c( pal.active().background() ); + TQPixmap stipple( 64, 64 ); stipple.fill( c.rgb() ); - QPainter p; + TQPainter p; p.begin( &stipple ); p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); for ( i = 1; i < 64; i += 4 ) @@ -182,41 +182,41 @@ void LiquidStyle::polish( QPalette &pal ) for ( i = 2; i < 63; i += 4 ) p.drawLine( 0, i, 63, i ); p.end(); - QBrush brush( c, stipple ); - pal.setBrush( QColorGroup::Background, brush ); + TQBrush brush( c, stipple ); + pal.setBrush( TQColorGroup::Background, brush ); } if (optionHandler->bevelHighlights()) { - QColor c(pal.active().highlight()); - QColor c2(c.light(140)); - QPixmap pix2 = QPixmap(48,48); - QPainter coolPainter(&pix2); - KPixmap pix = QPixmap(48,24); + TQColor c(pal.active().highlight()); + TQColor c2(c.light(140)); + TQPixmap pix2 = TQPixmap(48,48); + TQPainter coolPainter(&pix2); + KPixmap pix = TQPixmap(48,24); KPixmapEffect::gradient(pix,c,c2,KPixmapEffect::VerticalGradient,0); coolPainter.drawPixmap(0,0,pix); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); coolPainter.drawPixmap(0,24,pix); - QBrush brush(c, pix2); - pal.setBrush(QColorGroup::Highlight, brush); + TQBrush brush(c, pix2); + pal.setBrush(TQColorGroup::Highlight, brush); } polishedPalette = pal; optionHandler->reset(); } -void LiquidStyle::unPolish( QApplication *app ) +void LiquidStyle::unPolish( TQApplication *app ) { popupBack.resize(0,0); - QPalette pal( app->palette() ); + TQPalette pal( app->palette() ); inExitPolish = true; if ( !isPlain() ) { // reset any stipples - if ( pal.brush( QPalette::Active, QColorGroup::Background ).pixmap() ) - pal.setBrush( QColorGroup::Background, pal.active().background() ); - if ( pal.brush( QPalette::Active, QColorGroup::Button ).pixmap() ) - pal.setBrush( QColorGroup::Button, pal.active().button() ); + if ( pal.brush( TQPalette::Active, TQColorGroup::Background ).pixmap() ) + pal.setBrush( TQColorGroup::Background, pal.active().background() ); + if ( pal.brush( TQPalette::Active, TQColorGroup::Button ).pixmap() ) + pal.setBrush( TQColorGroup::Button, pal.active().button() ); // app->blockSignals( TRUE ); app->setPalette( pal ); // app->blockSignals( FALSE ); @@ -225,14 +225,14 @@ void LiquidStyle::unPolish( QApplication *app ) inExitPolish = false; } -Atom baghira_deco_design = XInternAtom(qt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); +Atom baghira_deco_design = XInternAtom(tqt_xdisplay(), "BAGHIRA_DECO_DESIGN", False); -void LiquidStyle::polish( QWidget *w ) +void LiquidStyle::polish( TQWidget *w ) { // bool testWidget = w->inherits("Splash"); // int testInt = 0; -// if (w->sizePolicy().horData() == QSizePolicy::Minimum || w->sizePolicy().horData() == QSizePolicy::MinimumExpanding) -// qWarning("%s, \"%s\"",w->className(), w->name()); +// if (w->sizePolicy().horData() == TQSizePolicy::Minimum || w->sizePolicy().horData() == TQSizePolicy::MinimumExpanding) +// tqWarning("%s, \"%s\"",w->className(), w->name()); // w->installEventFilter(this); bool tmpBool = false; @@ -244,12 +244,12 @@ void LiquidStyle::polish( QWidget *w ) if (w->isTopLevel()) { - if ( ::qt_cast<QPopupMenu*>(w)) // popup menu designs + if ( ::tqt_cast<TQPopupMenu*>(w)) // popup menu designs { switch (optionHandler->MenuBackground()) { case Plain: - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); if (optionHandler->UseCustomMenuColor()) w->setPaletteBackgroundColor(optionHandler->Color()); else if (optionHandler->MenuColorButton()) @@ -259,24 +259,24 @@ void LiquidStyle::polish( QWidget *w ) break; case Stipples: { - QColor c; + TQColor c; if (optionHandler->UseCustomMenuColor()) - c = QColor( optionHandler->Color() ); + c = TQColor( optionHandler->Color() ); else if (optionHandler->MenuColorButton()) - c = QColor( optionHandler->buttonColor() ); + c = TQColor( optionHandler->buttonColor() ); else - c = QColor( originalBgColor ); + c = TQColor( originalBgColor ); if (popupBack.isNull()) { - popupBack = QPixmap(64,64); - QPixmap *stipple = &popupBack; + popupBack = TQPixmap(64,64); + TQPixmap *stipple = &popupBack; stipple->fill( c.rgb() ); - QPainter p; + TQPainter p; p.begin( stipple ); if (optionHandler->UseCustomMenuColor()) { - QColor c2 = QColor( optionHandler->Color2() ); - p.setPen(QColor((3*c.red()+c2.red())/4, + TQColor c2 = TQColor( optionHandler->Color2() ); + p.setPen(TQColor((3*c.red()+c2.red())/4, (3*c.green()+c2.green())/4, (3*c.blue()+c2.blue())/4)); for ( int i = 1; i < 64; i += 4 ) @@ -306,24 +306,24 @@ void LiquidStyle::polish( QWidget *w ) } p.end(); } - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); break; } case Gradient: { - w->setBackgroundMode( QWidget::PaletteBackground ); - KPixmap tmpPix = QPixmap(w->width(), 32); + w->setBackgroundMode( TQWidget::PaletteBackground ); + KPixmap tmpPix = TQPixmap(w->width(), 32); w->setPaletteBackgroundPixmap(KPixmapEffect::unbalancedGradient(tmpPix, optionHandler->Color(), optionHandler->Color2(),KPixmapEffect::HorizontalGradient, 100, 100, 16)); w->installEventFilter( this ); break; } default: - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); break; } //set popup menu opacity for them as they bypass the windowmanager unsigned long opacity = optionHandler->MenuOpacity()/100.0*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); goto kstpolish; } else @@ -334,14 +334,14 @@ void LiquidStyle::polish( QWidget *w ) Atom actual; int format, result; unsigned long n, left; - result = XGetWindowProperty(qt_xdisplay(), w->winId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); + result = XGetWindowProperty(tqt_xdisplay(), w->winId(), baghira_deco_design, 0L, 1L, False, XA_CARDINAL, &actual, &format, &n, &left, &data); if (result != Success || data == None) // not found set design { int tmp = optionHandler->wmDesign != Tiger ? optionHandler->wmDesign : Panther; - XChangeProperty(qt_xdisplay(), w->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(tmp), 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(tmp), 1L); } } - if ((optionHandler->style() == Brushed) && !( ::qt_cast<QPopupMenu*>(w) || ::qt_cast<QMenuBar*>(w) || w->isDesktop() || ::qt_cast<QListBox*>(w) || w->inherits("QTipLabel") || w->inherits("AlphaWidget") || w->inherits("ScrollWidget") || w->inherits("PlayerWidget"))) + if ((optionHandler->style() == Brushed) && !( ::tqt_cast<TQPopupMenu*>(w) || ::tqt_cast<TQMenuBar*>(w) || w->isDesktop() || ::tqt_cast<TQListBox*>(w) || w->inherits("TQTipLabel") || w->inherits("AlphaWidget") || w->inherits("ScrollWidget") || w->inherits("PlayerWidget"))) // install resize event filter, allowing us to update the b/m gradient on horizontal resizes. some widgets must be excluded though { if (!isKicker) @@ -353,8 +353,8 @@ void LiquidStyle::polish( QWidget *w ) if (w->inherits("KURLBar")/*ListBox*/) { - w->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); -// ((QListBox*)w)->viewport()->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Base)); + w->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base)); +// ((TQListBox*)w)->viewport()->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Base)); goto kstpolish; } @@ -379,138 +379,138 @@ void LiquidStyle::polish( QWidget *w ) if (qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) w->installEventFilter( this ); - if (::qt_cast<QButton*>(w)) + if (::tqt_cast<TQButton*>(w)) { - w->setBackgroundOrigin(QWidget::WindowOrigin); - if (::qt_cast<QPushButton*>(w)) + w->setBackgroundOrigin(TQWidget::WindowOrigin); + if (::tqt_cast<TQPushButton*>(w)) { if (w->inherits("KKeyButton")) { - w->setBackgroundMode( QWidget::PaletteBackground); - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().active().background() ); + w->setBackgroundMode( TQWidget::PaletteBackground); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().active().background() ); w->setPalette( pal ); } else if (w->inherits("KCalcButton")) { - w->setBackgroundMode( QWidget::PaletteBackground); - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, qApp->palette().brush(QPalette::Active, QColorGroup::Background)); + w->setBackgroundMode( TQWidget::PaletteBackground); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, tqApp->palette().brush(TQPalette::Active, TQColorGroup::Background)); w->setPalette( pal ); } else #if !KDE_IS_VERSION(3,4,3) if (!(w->parent() && w->parent()->inherits("MiniBar"))) #endif - w->setBackgroundMode( QWidget::NoBackground); + w->setBackgroundMode( TQWidget::NoBackground); w->installEventFilter( this ); goto kstpolish; } - else if (w->inherits( "QRadioButton" ) || w->inherits( "QCheckBox" )) + else if (w->inherits( "TQRadioButton" ) || w->inherits( "TQCheckBox" )) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } } - if ( ::qt_cast<QToolBar*>(w)) + if ( ::tqt_cast<TQToolBar*>(w)) { if (optionHandler->useToolButtonFrame() && w->inherits("KToolBar")) - ((QToolBar*)w)->boxLayout()->setSpacing( 0 ); - ((QToolBar*)w)->setMargin( 4 ); + ((TQToolBar*)w)->boxLayout()->setSpacing( 0 ); + ((TQToolBar*)w)->setMargin( 4 ); w->setBackgroundMode(PaletteBackground); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); if (optionHandler->style() > Panther) { w->installEventFilter( this ); if (optionHandler->wmDesign == Tiger) { - XChangeProperty(qt_xdisplay(), w->topLevelWidget()->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(optionHandler->wmDesign), 1L); + XChangeProperty(tqt_xdisplay(), w->topLevelWidget()->winId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &(optionHandler->wmDesign), 1L); } } goto kstpolish ; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (tmpBool = ::qt_cast<QToolButton*>(w) || w->inherits( "QToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) ) + if (tmpBool = ::tqt_cast<TQToolButton*>(w) || w->inherits( "TQToolBarSeparator" ) || w->inherits( "KToolBarSeparator" ) ) { - if (tmpBool && w->parentWidget() && ::qt_cast<QToolBar*>(w->parentWidget()) ) + if (tmpBool && w->parentWidget() && ::tqt_cast<TQToolBar*>(w->parentWidget()) ) { - w->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + w->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); } - w->setBackgroundMode( QWidget::PaletteBackground ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundMode( TQWidget::PaletteBackground ); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } - if (::qt_cast<QComboBox*>(w)) + if (::tqt_cast<TQComboBox*>(w)) { w->setBackgroundMode(NoBackground); w->installEventFilter( this ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); goto kstpolish; } if (w->inherits("TaskBar")) { - w->setBackgroundOrigin(QWidget::WidgetOrigin); + w->setBackgroundOrigin(TQWidget::WidgetOrigin); goto kstpolish; } - if (w->inherits("QSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){ + if (w->inherits("TQSpinWidget") || w->inherits("KDockWidgetAbstractHeaderDrag")){ w->installEventFilter( this ); goto kstpolish; } - if ( !isPlain () && (w->inherits( "KonqIconViewWidget" ) || w->inherits( "khtml")/* || w->inherits( "QtVisionView")*/)) + if ( !isPlain () && (w->inherits( "KonqIconViewWidget" ) || w->inherits( "khtml")/* || w->inherits( "TQtVisionView")*/)) { // if you want custom backgrounds in konqueror, you have to reset pixmap, since Konq animation can't handle it // original liquid did this on khtml, too (at speed loss) so we'll see, if we get errors from this... - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Background, pal.active().background() ); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Background, pal.active().background() ); w->setPalette( pal ); } - if (::qt_cast<QSlider*>(w)) + if (::tqt_cast<TQSlider*>(w)) { //avoid flicker - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish; } - if ((::qt_cast<QScrollView*>(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda"))) + if ((::tqt_cast<TQScrollView*>(w) || w->inherits("KateView") || w->inherits("TEWidget") || w->inherits("CHexViewWidget")) && !(w->isA("KOAgenda"))) { - if (::qt_cast<KListView*>(w) && optionHandler->custCols[7] != -1 && ((KListView*)w)->alternateBackground() == KGlobalSettings::alternateBackgroundColor()) + if (::tqt_cast<KListView*>(w) && optionHandler->custCols[7] != -1 && ((KListView*)w)->alternateBackground() == KGlobalSettings::alternateBackgroundColor()) { - ((KListView*)w)->setAlternateBackground(QColor(optionHandler->custCols[7])); + ((KListView*)w)->setAlternateBackground(TQColor(optionHandler->custCols[7])); } #if _FORCE_SCROLLBARS_ - if (::qt_cast<QScrollView*>(w) && !w->inherits( "KActiveLabel" )) + if (::tqt_cast<TQScrollView*>(w) && !w->inherits( "KActiveLabel" )) { - ((QScrollView*)w)->setVScrollBarMode(QScrollView::AlwaysOn); + ((TQScrollView*)w)->setVScrollBarMode(TQScrollView::AlwaysOn); } #endif - if (::qt_cast<QListBox*>(w) && w->isTopLevel()) + if (::tqt_cast<TQListBox*>(w) && w->isTopLevel()) //set opacity for them as they bypass the windowmanager { uint opacity = 0.8*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); } #if 0 // doesn't work properly - best would be to have the items drawn via style() - int height = ((QListBox*)w)->itemHeight(); + int height = ((TQListBox*)w)->itemHeight(); if (height > 0) { - QPalette pal = w->palette(); - QColor c(pal.active().highlight()); - QColor c2(c.light(140)); - KPixmap pix = QPixmap(48,height); + TQPalette pal = w->palette(); + TQColor c(pal.active().highlight()); + TQColor c2(c.light(140)); + KPixmap pix = TQPixmap(48,height); KPixmapEffect::gradient(pix,c2,c,KPixmapEffect::VerticalGradient,0); - QBrush brush(c, pix); - pal.setBrush(QColorGroup::Highlight, brush); + TQBrush brush(c, pix); + pal.setBrush(TQColorGroup::Highlight, brush); w->setPalette(pal); } #endif @@ -520,20 +520,20 @@ void LiquidStyle::polish( QWidget *w ) goto kstpolish; } - if (w->inherits("QStatusBar")) + if (w->inherits("TQStatusBar")) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); if ( qstrcmp( w->name(), "KonquerorFrameStatusBar" ) == 0 ) - // konqueror resets the statusbars background to Qt::White as soon as you open a new tab - our eventfilter will block this + // konqueror resets the statusbars background to TQt::White as soon as you open a new tab - our eventfilter will block this { w->installEventFilter( this ); } goto kstpolish; } - if (w->inherits( "QLineEdit" ) || w->inherits("QSplitterHandle") || w->isA( "AppletHandleDrag" ) || w->inherits( "KMiniPagerButton" )) + if (w->inherits( "TQLineEdit" ) || w->inherits("TQSplitterHandle") || w->isA( "AppletHandleDrag" ) || w->inherits( "KMiniPagerButton" )) { - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish; } @@ -545,10 +545,10 @@ void LiquidStyle::polish( QWidget *w ) } if (w->inherits( "KickerTip" )) - // kickers new tooltip uses backgroundColor() instead of paletteBackgroundColor() - causing Qt::black + // kickers new tooltip uses backgroundColor() instead of paletteBackgroundColor() - causing TQt::black { - w->setPaletteBackgroundColor(qApp->palette().color(QPalette::Active, QColorGroup::Button)); - w->setBackgroundMode( QWidget::NoBackground ); + w->setPaletteBackgroundColor(tqApp->palette().color(TQPalette::Active, TQColorGroup::Button)); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish; } @@ -556,7 +556,7 @@ void LiquidStyle::polish( QWidget *w ) { if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); goto kstpolish ; } @@ -564,22 +564,22 @@ void LiquidStyle::polish( QWidget *w ) goto kstpolish ; if ( !isKicker&& !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" )) { - if ( w->backgroundMode() == QWidget::PaletteBackground || w->backgroundMode() == QWidget::PaletteButton ) + if ( w->backgroundMode() == TQWidget::PaletteBackground || w->backgroundMode() == TQWidget::PaletteButton ) { - w->setBackgroundOrigin( QWidget::WindowOrigin ); + w->setBackgroundOrigin( TQWidget::WindowOrigin ); } } } - if ( ::qt_cast<QPushButton*>(w) || ::qt_cast<QComboBox*>(w)) goto kstpolish; - if ( ::qt_cast<QMenuBar*>(w)) + if ( ::tqt_cast<TQPushButton*>(w) || ::tqt_cast<TQComboBox*>(w)) goto kstpolish; + if ( ::tqt_cast<TQMenuBar*>(w)) { // if (optionHandler->SupportAppleBar() && w->isTopLevel()){ -// // QPalette pal(w->palette()); -// qWarning("resetting erase pixmap"); -// QColor c( w->palette().active().background() ); -// QPixmap stipple( 64, 64 ); +// // TQPalette pal(w->palette()); +// tqWarning("resetting erase pixmap"); +// TQColor c( w->palette().active().background() ); +// TQPixmap stipple( 64, 64 ); // stipple.fill( c.rgb() ); -// QPainter p; +// TQPainter p; // p.begin( &stipple ); // p.setPen( c.dark( 100 + (int)(optionHandler->stippleContrast()/2) ) ); // for (int i = 1; i < 64; i += 4 ) { @@ -591,23 +591,23 @@ void LiquidStyle::polish( QWidget *w ) // p.drawLine( 0, i, 63, i ); // } // p.end(); -// // QBrush brush( c, stipple ); -// // pal.setBrush( QColorGroup::Background, brush ); +// // TQBrush brush( c, stipple ); +// // pal.setBrush( TQColorGroup::Background, brush ); // // w->setPalette( pal ); // w->setErasePixmap(stipple); // } - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); if (optionHandler->UseCustomMenuColor()) { - QPalette pal( w->palette() ); - pal.setBrush( QColorGroup::Highlight, optionHandler->menuColorHigh() ); - pal.setBrush( QColorGroup::HighlightedText, optionHandler->textColorHigh() ); + TQPalette pal( w->palette() ); + pal.setBrush( TQColorGroup::Highlight, optionHandler->menuColorHigh() ); + pal.setBrush( TQColorGroup::HighlightedText, optionHandler->textColorHigh() ); w->setPalette( pal ); } - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); #if 0 - if (!::qt_cast<KMenuBar*>(w)) + if (!::tqt_cast<KMenuBar*>(w)) { bool bold = w->font().bold(); bool italic = w->font().italic(); @@ -615,142 +615,142 @@ void LiquidStyle::polish( QWidget *w ) bool overline = w->font().overline(); w->setFont(KGlobalSettings::menuFont()); if (bold) - (const_cast<QFont*>(&w->font()))->setBold(true); + (const_cast<TQFont*>(&w->font()))->setBold(true); if (italic) - (const_cast<QFont*>(&w->font()))->setItalic(true); + (const_cast<TQFont*>(&w->font()))->setItalic(true); if (underline) - (const_cast<QFont*>(&w->font()))->setUnderline(true); + (const_cast<TQFont*>(&w->font()))->setUnderline(true); if (overline) - (const_cast<QFont*>(&w->font()))->setOverline(true); + (const_cast<TQFont*>(&w->font()))->setOverline(true); } #endif goto kstpolish ; } - if (::qt_cast<QFrame*>(w)) + if (::tqt_cast<TQFrame*>(w)) { - w->setBackgroundOrigin(QWidget::WindowOrigin); - if ( ::qt_cast<QLabel*>(w)) + w->setBackgroundOrigin(TQWidget::WindowOrigin); + if ( ::tqt_cast<TQLabel*>(w)) { if (w->parentWidget() && w->parentWidget()->inherits("Kontact::Splash")) goto kstpolish; - else if ( !isPlain() && !(w->inherits( "QTipLabel" ) || w->inherits( "KSystemTray" ))) + else if ( !isPlain() && !(w->inherits( "TQTipLabel" ) || w->inherits( "KSystemTray" ))) { - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); } - else if ( w->inherits( "QTipLabel" ) ) + else if ( w->inherits( "TQTipLabel" ) ) { w->setPalette( tooltipPalette ); - w->setBackgroundOrigin(QWidget::WidgetOrigin); + w->setBackgroundOrigin(TQWidget::WidgetOrigin); w->installEventFilter( this ); } } if (qstrcmp( w->name(), "backdrop" ) == 0) //kscd { - ((QFrame *)w)->setFrameShape(QFrame::LineEditPanel); - ((QFrame *)w)->setFrameShadow(QFrame::Sunken); + ((TQFrame *)w)->setFrameShape(TQFrame::LineEditPanel); + ((TQFrame *)w)->setFrameShadow(TQFrame::Sunken); goto kstpolish; } if (w->inherits( "KWinInternal::TabBox" )) { uint opacity = 0.8*OPAQUE; - XChangeProperty(qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); + XChangeProperty(tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False), XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &opacity, 1L); goto kstpolish; } else if (w->inherits( "KAnimWidget" )) { - ((QFrame *)w)->setFrameShape(QFrame::NoFrame); + ((TQFrame *)w)->setFrameShape(TQFrame::NoFrame); w->installEventFilter( this ); // the widget resets it's frameshape on mouseevents - looks crap! goto kstpolish ; } - else if (((QFrame *)w)->frameShape() >= QFrame::Box && ((QFrame *)w)->frameShape() <= QFrame::WinPanel){ - ((QFrame *)w)->setFrameShape(QFrame::StyledPanel); + else if (((TQFrame *)w)->frameShape() >= TQFrame::Box && ((TQFrame *)w)->frameShape() <= TQFrame::WinPanel){ + ((TQFrame *)w)->setFrameShape(TQFrame::StyledPanel); goto kstpolish ; } } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if ( w->parentWidget() && ( ( ::qt_cast<QListBox*>(w) && ::qt_cast<QPushButton*>(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) { - QListBox* listbox = (QListBox*) w; + if ( w->parentWidget() && ( ( ::tqt_cast<TQListBox*>(w) && ::tqt_cast<TQPushButton*>(w->parentWidget())) || w->inherits( "KCompletionBox" ) ) ) { + TQListBox* listbox = (TQListBox*) w; listbox->setBackgroundMode( NoBackground ); w->installEventFilter( this ); goto kstpolish; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (::qt_cast<QHeader*>(w)){ -// if (::qt_cast<QListView*>(w->parentWidget())) -// headerSortID = ((QListView*)w->parentWidget())->sortColumn(); -// if (w->parentWidget()) qWarning(w->parentWidget()->className()); + if (::tqt_cast<TQHeader*>(w)){ +// if (::tqt_cast<TQListView*>(w->parentWidget())) +// headerSortID = ((TQListView*)w->parentWidget())->sortColumn(); +// if (w->parentWidget()) tqWarning(w->parentWidget()->className()); w->setBackgroundMode( NoBackground ); w->installEventFilter( this ); goto kstpolish; } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (::qt_cast<QTabBar*>(w)){ -// qWarning("installing tab event"); + if (::tqt_cast<TQTabBar*>(w)){ +// tqWarning("installing tab event"); w->setMouseTracking( true ); w->installEventFilter( this ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); goto kstpolish; } - if (::qt_cast<QGroupBox*>(w) && ((QGroupBox*)w)->frameShape() == QFrame::GroupBoxPanel && !((QGroupBox*)w)->isFlat()) + if (::tqt_cast<TQGroupBox*>(w) && ((TQGroupBox*)w)->frameShape() == TQFrame::GroupBoxPanel && !((TQGroupBox*)w)->isFlat()) { if ( optionHandler->drawGroupBoxShadow() ) { w->setPaletteBackgroundPixmap ( *groupShadow ); - if (((QGroupBox*)w)->isCheckable()) + if (((TQGroupBox*)w)->isCheckable()) { - QWidget *cb = (QWidget*)w->child("qt_groupbox_checkbox",0,false); - cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : qApp->palette()); - QFont font( cb->font() ); + TQWidget *cb = (TQWidget*)w->child("qt_groupbox_checkbox",0,false); + cb->setPalette(w->parentWidget() ? w->parentWidget()->palette() : tqApp->palette()); + TQFont font( cb->font() ); font.setBold( true ); cb->setFont( font ); } } - w->setBackgroundOrigin(QWidget::WindowOrigin); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter(this); } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); - if (w->inherits("QProgressBar")) + if (w->inherits("TQProgressBar")) { w->setBackgroundMode( NoBackground ); w->installEventFilter(this); - connect(w, SIGNAL(destroyed(QObject*)), this, SLOT(progressBarDestroyed(QObject*))); + connect(w, SIGNAL(destroyed(TQObject*)), this, SLOT(progressBarDestroyed(TQObject*))); goto kstpolish; } - if ( w->inherits( "QDockWindow" ) ) { - w->setBackgroundMode( QWidget::PaletteBackground ); - w->setBackgroundOrigin(QWidget::WindowOrigin); + if ( w->inherits( "TQDockWindow" ) ) { + w->setBackgroundMode( TQWidget::PaletteBackground ); + w->setBackgroundOrigin(TQWidget::WindowOrigin); w->installEventFilter( this ); goto kstpolish ; } - if ( ::qt_cast<QScrollBar*>(w)) { - QCursor tmpCursor(Qt::PointingHandCursor); + if ( ::tqt_cast<TQScrollBar*>(w)) { + TQCursor tmpCursor(TQt::PointingHandCursor); w->setCursor(tmpCursor); w->installEventFilter( this ); - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); goto kstpolish ; } if ( w->inherits( "KdetvView")) { - w->setBackgroundMode( QWidget::NoBackground ); + w->setBackgroundMode( TQWidget::NoBackground ); } - //if (testWidget) qWarning("testwidget stage %d",testInt++); + //if (testWidget) tqWarning("testwidget stage %d",testInt++); kstpolish: KStyle::polish( w ); // nothing of all above? do default kde stuff } -void LiquidStyle::unPolish( QWidget *w ) { +void LiquidStyle::unPolish( TQWidget *w ) { bool isViewport; bool isViewportChild; @@ -763,20 +763,20 @@ void LiquidStyle::unPolish( QWidget *w ) { goto kstunpolish; } - if ( w->inherits("QToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + if ( w->inherits("TQToolBar") || qstrcmp( w->name(), "kde toolbar widget" ) == 0 ) { + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); // w->unsetPalette(); goto kstunpolish; } - if ( w->inherits( "QPopupMenu" ) ) { + if ( w->inherits( "TQPopupMenu" ) ) { w->unsetPalette(); - w->setBackgroundMode( QWidget::PaletteButton ); + w->setBackgroundMode( TQWidget::PaletteButton ); w->removeEventFilter( this ); - XDeleteProperty (qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False)); + XDeleteProperty (tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False)); goto kstunpolish; } - if (::qt_cast<QListBox*>(w) && w->isTopLevel()){ - XDeleteProperty (qt_xdisplay(), w->winId(), XInternAtom(qt_xdisplay(), OPACITY, False)); + if (::tqt_cast<TQListBox*>(w) && w->isTopLevel()){ + XDeleteProperty (tqt_xdisplay(), w->winId(), XInternAtom(tqt_xdisplay(), OPACITY, False)); goto kstunpolish; } if ( !isPlain () && w->inherits( "KonqIconViewWidget" ) || @@ -789,11 +789,11 @@ void LiquidStyle::unPolish( QWidget *w ) { goto kstunpolish; } - if (w->isA( "QViewportWidget" ) || w->inherits( "QClipperWidget" ) ) + if (w->isA( "TQViewportWidget" ) || w->inherits( "TQClipperWidget" ) ) goto kstunpolish; if ( !isPlain() ) { - if ( w->inherits( "KActiveLabel" ) || w->inherits( "QTipLabel" ) ) { + if ( w->inherits( "KActiveLabel" ) || w->inherits( "TQTipLabel" ) ) { w->unsetPalette(); goto kstunpolish; } @@ -803,18 +803,18 @@ void LiquidStyle::unPolish( QWidget *w ) { return; }*/ } - else if ( w->inherits( "QMenuBar" ) ) { - w->setBackgroundMode( QWidget::PaletteButton ); + else if ( w->inherits( "TQMenuBar" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; - }else if ( w->inherits( "QDockWindow" ) ) { - w->setBackgroundMode( QWidget::PaletteButton ); + }else if ( w->inherits( "TQDockWindow" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; - } else if ( w->inherits( "QComboBox" ) || w->inherits( "QPushButton" ) ) { - if (w->inherits( "QPushButton" )) + } else if ( w->inherits( "TQComboBox" ) || w->inherits( "TQPushButton" ) ) { + if (w->inherits( "TQPushButton" )) { ButtonFadeInfo *bfi_ = bfi[w->winId()]; if (bfi_){ @@ -824,20 +824,20 @@ void LiquidStyle::unPolish( QWidget *w ) { bfi.remove(w->winId()); } } - w->setBackgroundMode( QWidget::PaletteButton ); - } else if ( w->inherits( "QScrollBar" ) ) { + w->setBackgroundMode( TQWidget::PaletteButton ); + } else if ( w->inherits( "TQScrollBar" ) ) { // if (!w->isEnabled()) w->setEnabled(true); - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); goto kstunpolish; - } else if ( w->inherits( "QHeader" ) ) { + } else if ( w->inherits( "TQHeader" ) ) { w->setMouseTracking( false ); } - if ( w->inherits( "QToolButton" ) ) { + if ( w->inherits( "TQToolButton" ) ) { // w->unsetPalette(); - w->setBackgroundMode( QWidget::PaletteButton ); + w->setBackgroundMode( TQWidget::PaletteButton ); if ( !isPlain() ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } @@ -848,9 +848,9 @@ void LiquidStyle::unPolish( QWidget *w ) { ( qstrcmp( w->parent() ->name(), "qt_clipped_viewport" ) == 0 ) ); if ( isViewportChild ) { - if ( w->inherits( "QRadioButton" ) || w->inherits( "QComboBox" ) || w->inherits( "QPushButton" ) ) { + if ( w->inherits( "TQRadioButton" ) || w->inherits( "TQComboBox" ) || w->inherits( "TQPushButton" ) ) { if ( isHTMLWidget( w ) ) { - w->setBackgroundMode( QWidget::PaletteBackground ); + w->setBackgroundMode( TQWidget::PaletteBackground ); goto kstunpolish; } } @@ -858,10 +858,10 @@ void LiquidStyle::unPolish( QWidget *w ) { if ( !isPlain() ) { if ( !isViewport && w->parent() && qstrcmp( w->parent() ->name(), "proxyview" ) == 0 ) { - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } - if ( w->ownPalette() && !w->inherits( "QButton" ) && !w->inherits( "QComboBox" ) ) + if ( w->ownPalette() && !w->inherits( "TQButton" ) && !w->inherits( "TQComboBox" ) ) goto kstunpolish; if ( w->inherits( "PanelButtonBase" ) ) goto kstunpolish; @@ -869,8 +869,8 @@ void LiquidStyle::unPolish( QWidget *w ) { if ( !isViewport && !isViewportChild && !w->testWFlags( WType_Popup ) && !w->inherits( "KDesktop" ) && !w->inherits( "PasswordDlg" ) ) { - if ( w->backgroundOrigin() == QWidget::WindowOrigin ) - w->setBackgroundOrigin( QWidget::WidgetOrigin ); + if ( w->backgroundOrigin() == TQWidget::WindowOrigin ) + w->setBackgroundOrigin( TQWidget::WidgetOrigin ); goto kstunpolish; } } diff --git a/style/utils.cpp b/style/utils.cpp index dd24986..31ef75a 100644 --- a/style/utils.cpp +++ b/style/utils.cpp @@ -1,14 +1,14 @@ #include "baghira.h" -#include <qbitmap.h> -#include <qimage.h> -#include <qcolor.h> -#include <qpalette.h> -#include <qrect.h> -#include <qpoint.h> -#include <qapplication.h> -#include <qpainter.h> -#include <qpen.h> +#include <tqbitmap.h> +#include <tqimage.h> +#include <tqcolor.h> +#include <tqpalette.h> +#include <tqrect.h> +#include <tqpoint.h> +#include <tqapplication.h> +#include <tqpainter.h> +#include <tqpen.h> //#include <kwordwrap.h> @@ -33,7 +33,7 @@ A1 = CLAMP(A1 + A2,0,255); #define DELTA_COLOR(D,R,G,B) \ - delta = (255 - qRed(D))/2; \ + delta = (255 - tqRed(D))/2; \ destR = R - delta; \ destG = G - delta; \ destB = B - delta; @@ -83,42 +83,42 @@ if ( B < 0 ) B = 0; else if ( B > 255 ) B = 255; #ifndef PRINTDEVICE -#define PRINTDEVICE(_p_) qWarning("device is %s", (_p_->device()->devType() == QInternal::Widget) ?\ -"Widget": (_p_->device()->devType() == QInternal::Pixmap) ?\ -"Pixmap": (_p_->device()->devType() == QInternal::Printer) ?\ -"Printer": (_p_->device()->devType() == QInternal::Picture) ?\ -"Picture": (_p_->device()->devType() == QInternal::UndefinedDevice) ?\ +#define PRINTDEVICE(_p_) tqWarning("device is %s", (_p_->device()->devType() == TQInternal::Widget) ?\ +"Widget": (_p_->device()->devType() == TQInternal::Pixmap) ?\ +"Pixmap": (_p_->device()->devType() == TQInternal::Printer) ?\ +"Printer": (_p_->device()->devType() == TQInternal::Picture) ?\ +"Picture": (_p_->device()->devType() == TQInternal::UndefinedDevice) ?\ "UndefinedDevice": "fuckdevice!" ); #endif int LiquidStyle::getBrightness(unsigned int rgb) const { - int red = qRed( rgb ); - int green = qGreen( rgb ); - int blue = qBlue( rgb ); + int red = tqRed( rgb ); + int green = tqGreen( rgb ); + int blue = tqBlue( rgb ); int V = red; if (green > V) V = green; if (blue > V) V = blue; return V; } -QPixmap* LiquidStyle::adjustHSV( QImage &img, const QColor &c, const QColor *bg ) const +TQPixmap* LiquidStyle::adjustHSV( TQImage &img, const TQColor &c, const TQColor *bg ) const { - QImage * tmp = adjustHSVImage( img, c, bg ); + TQImage * tmp = adjustHSVImage( img, c, bg ); - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( *tmp ); delete tmp; return ( pix ); } -ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, const QColor *bg, const QColor &baseColor ) const +ButtonTile* LiquidStyle::createRoundFrameTile(TQImage &img, const TQColor &color, const TQColor *bg, const TQColor &baseColor ) const { - QColor bgColor( bg ? *bg : qApp->palette().active().background() ); + TQColor bgColor( bg ? *bg : tqApp->palette().active().background() ); if ( img.depth() != 32 ) img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -143,14 +143,14 @@ ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (alpha) { if (optionHandler->IcyButtons()) { - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); SATURATION_COLOR(red, green, blue); } else @@ -177,22 +177,22 @@ ButtonTile* LiquidStyle::createRoundFrameTile(QImage &img, const QColor &color, #endif // force back to valid colorspace ! COLOR_SPACE(destR, destG, destB); - destData[ current ] = qRgba( destR, destG, destB, alpha ); + destData[ current ] = tqRgba( destR, destG, destB, alpha ); } - QPixmap destPix; + TQPixmap destPix; destPix = *dest; ButtonTile *ret = separateTiles( &destPix, 11, 10, 6, 1, 0, false); delete dest; return ret; } -QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor *bg ) const +TQImage* LiquidStyle::adjustHSVImage( TQImage &img, const TQColor &c, const TQColor *bg ) const { - QColor bgColor( bg ? *bg : qApp->palette().active().background() ); + TQColor bgColor( bg ? *bg : tqApp->palette().active().background() ); if ( img.depth() != 32 ) img = img.convertDepth( 32 ); - QImage *dest = new QImage( img.width(), img.height(), 32, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); @@ -222,12 +222,12 @@ QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor // float srcPercent, destPercent; for ( current = 0 ; current < total ; ++current ) { - alpha = qAlpha( data[ current ] ); + alpha = tqAlpha( data[ current ] ); if (optionHandler->IcyButtons()) { - red = qRed( data[ current ] ); - green = qGreen( data[ current ] ); - blue = qBlue( data[ current ] ); + red = tqRed( data[ current ] ); + green = tqGreen( data[ current ] ); + blue = tqBlue( data[ current ] ); SATURATION_COLOR2(sq, red, green, blue); } else @@ -237,16 +237,16 @@ QImage* LiquidStyle::adjustHSVImage( QImage &img, const QColor &c, const QColor } // 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* LiquidStyle::tintBrush( const QImage &img, const QColor &c ) const +TQImage* LiquidStyle::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, 0 ); + TQImage *dest = new TQImage( img.width(), img.height(), 32, 0 ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -262,19 +262,19 @@ QImage* LiquidStyle::tintBrush( const QImage &img, const QColor &c ) const // 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 ); } -QColor LiquidStyle::brushedMetalColor(QColor &c) const +TQColor LiquidStyle::brushedMetalColor(TQColor &c) const { if (optionHandler->TintBrush()) { @@ -284,21 +284,21 @@ QColor LiquidStyle::brushedMetalColor(QColor &c) const int destR, destG, destB, grey, iGrey, delta; SATURATION_COLOR(180, 180, 180); COLOR_SPACE(destR, destG, destB); - return QColor(destR, destG, destB); + return TQColor(destR, destG, destB); } else - return QColor (180,180,180); + return TQColor (180,180,180); } -void LiquidStyle::clearImage( QImage &img ) const +void LiquidStyle::clearImage( TQImage &img ) const { int x, y; int w = img.width(); int h = img.height(); - unsigned int pixel = qRgba( 0, 0, 0, 0 ); + unsigned int pixel = tqRgba( 0, 0, 0, 0 ); unsigned int *data; for ( y = 0 ; y < h ; ++y ) @@ -306,10 +306,10 @@ void LiquidStyle::clearImage( QImage &img ) const // img.fill( pixel ); } -void LiquidStyle::adjustHSV( QPixmap &pix, const QColor &c ) const +void LiquidStyle::adjustHSV( TQPixmap &pix, const TQColor &c ) const { - QImage img = pix.convertToImage(); - QPixmap *result = adjustHSV( img, c); + TQImage img = pix.convertToImage(); + TQPixmap *result = adjustHSV( img, c); pix = *result; delete result; } @@ -320,17 +320,17 @@ w, h are width and height of the whole button. xOff (yOff) is the distance of the central fraction from left (upper) button side. centerW (centerH) is the width (height) of the central button fraction. shadowH is the height of the buttons shadow*/ -ButtonTile* LiquidStyle::createButtonTile( const QColor &c, - const QColor &bgColor, - QImage *buttonImage, - QImage *shadowImage, - QImage *glowImage, - QIntDict<ButtonTile>*buttonDict, - QIntDict<ButtonTile>*shadowDict, - QIntDict<ButtonTile>*glowDict, - int w, int h, int xOff, int yOff, - int centerW, int centerH, - int shadowH, int glowWH, +ButtonTile* LiquidStyle::createButtonTile( const TQColor &c, + const TQColor &bgColor, + TQImage *buttonImage, + TQImage *shadowImage, + TQImage *glowImage, + TQIntDict<ButtonTile>*buttonDict, + TQIntDict<ButtonTile>*shadowDict, + TQIntDict<ButtonTile>*glowDict, + int w, int h, int xOff, int yOff, + int centerW, int centerH, + int shadowH, int glowWH, bool sunken) const { int x, y, delta; @@ -360,7 +360,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, int shadowOverhead; shadowH > glowWH ? shadowOverhead = shadowH - glowWH : shadowOverhead = 0; - QImage img( w + 2*glowWH, h + 2*glowWH + shadowOverhead, 32, 0 ); + TQImage img( w + 2*glowWH, h + 2*glowWH + shadowOverhead, 32, 0 ); img.setAlphaBuffer( !isPlain() || optionHandler->drawGroupBoxShadow() ? true : false); clearImage( img ); @@ -388,15 +388,15 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, if (optionHandler->buttonStyle() == Jaguar) // has brighter shadows... { for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { - destData[ x + glowWH ] = qRgba( qRed(data[ x ]), qGreen(data[ x ]), qBlue(data[ x ]), alpha >> 1 ); + destData[ x + glowWH ] = tqRgba( tqRed(data[ x ]), tqGreen(data[ x ]), tqBlue(data[ x ]), alpha >> 1 ); } } else { for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { destData[ x + glowWH ] = data[x]; } @@ -409,11 +409,11 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, data = ( unsigned int * ) glowImage->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y ); for ( x = 0 ; x < w + 2*glowWH ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { DELTA_COLOR(data[ x ], srcR, srcG, srcB); COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } @@ -423,15 +423,15 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, data = ( unsigned int * ) buttonImage->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y + glowWH ); for ( x = 0 ; x < w ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) + if ((alpha = tqAlpha( data[ x ] ))) { if (!rect || (y > 1 && y < h-2 && x > 0 && x < w-1) ) { if (optionHandler->IcyButtons()) { - red = qRed( data[ x ] ); - green = qGreen( data[ x ] ); - blue = qBlue( data[ x ] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x ] ); + blue = tqBlue( data[ x ] ); SATURATION_COLOR2(sq, red, green, blue); } else @@ -441,24 +441,24 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, } else { - red = qRed( data[ x ] ); - green = qGreen( data[ x ] ); - blue = qBlue( data[ x ] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x ] ); + blue = tqBlue( data[ x ] ); TINT_WHITE(55, red, green, blue); } if (alpha != 255) { - if ( qAlpha( destData[ x + glowWH ] ) ) + if ( tqAlpha( destData[ x + glowWH ] ) ) { - ALPHA_COLOR2(alpha, qAlpha( destData[ x + glowWH ] ), qRed( destData[ x + glowWH ]), qGreen( destData[ x + glowWH ]), qBlue( destData[ x + glowWH ])); + ALPHA_COLOR2(alpha, tqAlpha( destData[ x + glowWH ] ), tqRed( destData[ x + glowWH ]), tqGreen( destData[ x + glowWH ]), tqBlue( destData[ x + glowWH ])); } } COLOR_SPACE(destR, destG, destB); - destData[ x + glowWH ] = qRgba( destR, destG, destB, alpha ); + destData[ x + glowWH ] = tqRgba( destR, destG, destB, alpha ); } } - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( img ); tile = separateTiles( pix, xOff+glowWH, yOff+glowWH, centerW, centerH, shadowH, sunken); @@ -473,7 +473,7 @@ ButtonTile* LiquidStyle::createButtonTile( const QColor &c, return ( tile ); } -QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, bool top) const +TQPixmap* LiquidStyle::createSliderEnd( const TQColor &c, const TQColor &bgColor, bool top) const { int x, y, delta; @@ -490,7 +490,7 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b unsigned int *data, *destData; - QImage img( 13, 9, 32, 0 ); + TQImage img( 13, 9, 32, 0 ); img.setAlphaBuffer( true ); // we need this always, as the slider groove is nevernever plain! clearImage( img ); @@ -500,10 +500,10 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b top ? data = ( unsigned int * ) slider_top_shd->scanLine( y ) : data = ( unsigned int * ) slider_btm_shd->scanLine( y ); destData = ( unsigned int * ) img.scanLine( y ); for ( x = 0; x < 13; ++x ) - if ((alpha = qAlpha( data[ x ] ))) { + if ((alpha = tqAlpha( data[ x ] ))) { DELTA_COLOR(data[ x ], bgColor.red(), bgColor.green(), bgColor.blue()); COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } // then the button and overlay @@ -524,26 +524,26 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b top ? data = ( unsigned int * ) slider_top->scanLine( y ) : data = ( unsigned int * ) slider_btm->scanLine( y ); destData = ( unsigned int * ) img.scanLine( top ? y + 2 : y ); for ( x = 0 ; x < 13 ; ++x ) - if ((alpha = qAlpha( data[ x ] ))) { + if ((alpha = tqAlpha( data[ x ] ))) { if (optionHandler->IcyButtons()) { - red = qRed( data[ x ] ); - green = qGreen( data[ x] ); - blue = qBlue( data[ x] ); + red = tqRed( data[ x ] ); + green = tqGreen( data[ x] ); + blue = tqBlue( data[ x] ); SATURATION_COLOR2(sq, red, green, blue); } else { - DELTA_COLOR(data[ x ], srcR, srcG, srcB); + DELTA_COLOR(data[ x ], srcR, srcG, srcB); } if (alpha != 255) { - if ( qAlpha( destData[ x ] ) ) { - ALPHA_COLOR2(alpha, qAlpha( destData[ x ]), qRed( destData[ x ]), qGreen( destData[ x ]), qBlue( destData[ x ])); + if ( tqAlpha( destData[ x ] ) ) { + ALPHA_COLOR2(alpha, tqAlpha( destData[ x ]), tqRed( destData[ x ]), tqGreen( destData[ x ]), tqBlue( destData[ x ])); } } COLOR_SPACE(destR, destG, destB); - destData[ x ] = qRgba( destR, destG, destB, alpha ); + destData[ x ] = tqRgba( destR, destG, destB, alpha ); } } - QPixmap *pix = new QPixmap; + TQPixmap *pix = new TQPixmap; pix->convertFromImage( img ); return ( pix ); } @@ -560,12 +560,12 @@ QPixmap* LiquidStyle::createSliderEnd( const QColor &c, const QColor &bgColor, b // ------------------------------------- // Overload of mosfet's original function, takes 6 more parameters to use the funktion on variable bitmaps (mosfet's function does only work for very special bitmaps) // by giving position and dimension of the central tile + the shadow height (panther doesn't seem to have a right shadow-offset) -ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, - int xO, int yO, int w, int h, +ButtonTile* LiquidStyle::separateTiles( TQPixmap *pix, + int xO, int yO, int w, int h, int, bool sunken) const { ButtonTile * tile = new ButtonTile(); - QPixmap *tmp; + TQPixmap *tmp; int w1 = xO; int w2 = w; @@ -583,72 +583,72 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, if ( !sunken ) { // Top tiles - tmp = new QPixmap( w1, h1 ); + tmp = new TQPixmap( w1, h1 ); // bitBlt(...,x,y,width,height) copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h1 ); tile->setPixmap( TileTopLeft, tmp ); - tmp = new QPixmap( w2, h1 ); + tmp = new TQPixmap( w2, h1 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h1 ); tile->setPixmap( TileTop, tmp ); - tmp = new QPixmap( w3, h1 ); + tmp = new TQPixmap( w3, h1 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h1 ); tile->setPixmap( TileTopRight, tmp ); // Middle tiles - tmp = new QPixmap( w1, h2 ); + tmp = new TQPixmap( w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2, w1, h2 ); tile->setPixmap( TileLeft, tmp ); - tmp = new QPixmap( w2, h2 ); + tmp = new TQPixmap( w2, h2 ); copyBlt( tmp, 0, 0, pix, xO2, yO2, w2, h2 ); tile->setPixmap( TileMiddle, tmp ); - tmp = new QPixmap( w3, h2 ); + tmp = new TQPixmap( w3, h2 ); copyBlt( tmp, 0, 0, pix, xO3, yO2, w3, h2 ); tile->setPixmap( TileRight, tmp ); // Bottom tiles - tmp = new QPixmap( w1, h3 ); + tmp = new TQPixmap( w1, h3 ); copyBlt( tmp, 0, 0, pix, xO1, yO3, w1, h3 ); tile->setPixmap( TileBtmLeft, tmp ); - tmp = new QPixmap( w2, h3 ); + tmp = new TQPixmap( w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO3, w2, h3 ); tile->setPixmap( TileBtm, tmp ); - tmp = new QPixmap( w3, h3 ); + tmp = new TQPixmap( w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO3, w3, h3 ); tile->setPixmap( TileBtmRight, tmp ); } else { // Top tiles - tmp = new QPixmap( w1, h3 ); + tmp = new TQPixmap( w1, h3 ); // bitBlt(...,x,y,width,height) copyBlt( tmp, 0, 0, pix, xO1, yO1, w1, h3 ); tile->setPixmap( TileTopLeft, tmp ); - tmp = new QPixmap( w2, h3 ); + tmp = new TQPixmap( w2, h3 ); copyBlt( tmp, 0, 0, pix, xO2, yO1, w2, h3 ); tile->setPixmap( TileTop, tmp ); - tmp = new QPixmap( w3, h3 ); + tmp = new TQPixmap( w3, h3 ); copyBlt( tmp, 0, 0, pix, xO3, yO1, w3, h3 ); tile->setPixmap( TileTopRight, tmp ); // Middle tiles - tmp = new QPixmap( w1, h2 ); + tmp = new TQPixmap( w1, h2 ); copyBlt( tmp, 0, 0, pix, xO1, yO2 + h3 - h1, w1, h2 ); tile->setPixmap( TileLeft, tmp ); - tmp = new QPixmap( w2, h2 ); + tmp = new TQPixmap( w2, h2 ); copyBlt( tmp, 0, 0, pix, xO2, yO2 + h3 - h1, w2, h2 ); tile->setPixmap( TileMiddle, tmp ); - tmp = new QPixmap( w3, h2 ); + tmp = new TQPixmap( w3, h2 ); copyBlt( tmp, 0, 0, pix, xO3, yO2 + h3 - h1, w3, h2 ); tile->setPixmap( TileRight, tmp ); // Bottom tiles - tmp = new QPixmap( w1, h1 ); + tmp = new TQPixmap( w1, h1 ); copyBlt( tmp, 0, 0, pix, xO1, yO3 + h3 - h1, w1, h1 ); tile->setPixmap( TileBtmLeft, tmp ); - tmp = new QPixmap( w2, h1 ); + tmp = new TQPixmap( w2, h1 ); copyBlt( tmp, 0, 0, pix, xO2, yO3 + h3 - h1, w2, h1 ); tile->setPixmap( TileBtm, tmp ); - tmp = new QPixmap( w3, h1 ); + tmp = new TQPixmap( w3, h1 ); copyBlt( tmp, 0, 0, pix, xO3, yO3 + h3 - h1, w3, h1 ); tile->setPixmap( TileBtmRight, tmp ); } @@ -664,64 +664,64 @@ ButtonTile* LiquidStyle::separateTiles( QPixmap *pix, #define _LRWIDTH_ (_LOFF_ + _ROFF_) #define _TBHEIGHT_ (_TOFF_ + _BOFF_) -void LiquidStyle::drawRoundButton( QPainter *painter, const QColorGroup &cg, const QColor &c, int x, int y, int w, int h, bool pushedDown, bool hover, int bgX, int bgY ) const +void LiquidStyle::drawRoundButton( TQPainter *painter, const TQColorGroup &cg, const TQColor &c, int x, int y, int w, int h, bool pushedDown, bool hover, int bgX, int bgY ) const { - QColor myC =(isOOO && (hover || pushedDown))?optionHandler->CustomButtonColor():c; + TQColor myC =(isOOO && (hover || pushedDown))?optionHandler->CustomButtonColor():c; LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); ButtonTile *tile = pushedDown ? btnDict.find( myC.rgb() ) : btnShadowedDict.find( myC.rgb() ); if ( !tile ) { - tile = createButtonTile( myC, qApp->palette().color(QPalette::Active, QColorGroup::Background), ptr->btnBorderImg, ptr->btnShadowImg, ptr->buttonGlow, &(ptr->btnDict), &(ptr->btnShadowedDict), &(ptr->buttonGlowDict), 37, 21, 10, 11, 17, 1, 2, 2, pushedDown); + tile = createButtonTile( myC, tqApp->palette().color(TQPalette::Active, TQColorGroup::Background), ptr->btnBorderImg, ptr->btnShadowImg, ptr->buttonGlow, &(ptr->btnDict), &(ptr->btnShadowedDict), &(ptr->buttonGlowDict), 37, 21, 10, 11, 17, 1, 2, 2, pushedDown); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTMLButton) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); if (!isPlain()) { - QPixmap *stipple; + TQPixmap *stipple; if (paintWidget && paintWidget->parentWidget()) { - stipple = const_cast<QPixmap*>(paintWidget->parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background).pixmap()); + stipple = const_cast<TQPixmap*>(paintWidget->parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background).pixmap()); if (!stipple || stipple->isNull()) - p->fillRect(0,0,w,h, paintWidget->parentWidget()->palette().brush(QPalette::Active, QColorGroup::Background) ); + p->fillRect(0,0,w,h, paintWidget->parentWidget()->palette().brush(TQPalette::Active, TQColorGroup::Background) ); else p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ); } else { - stipple = cg.brush( QColorGroup::Background ).pixmap(); + stipple = cg.brush( TQColorGroup::Background ).pixmap(); stipple ? p->drawTiledPixmap( 0, 0, w, h, *stipple, bgX, bgY ) : - p->fillRect(0,0,w,h, cg.brush( QColorGroup::Background )); + p->fillRect(0,0,w,h, cg.brush( TQColorGroup::Background )); } } else - p->fillRect(0,0,w,h, cg.brush( QColorGroup::Background )); + p->fillRect(0,0,w,h, cg.brush( TQColorGroup::Background )); } else { p = painter; } -// QPainter p(tmpBtnPix); +// TQPainter p(tmpBtnPix); // tiled fills if ( w > _LRWIDTH_ ) @@ -753,16 +753,16 @@ void LiquidStyle::drawRoundButton( QPainter *painter, const QColorGroup &cg, con } -void LiquidStyle::drawRectangularButton( QPainter *painter, - const QColorGroup &cg, const QColor &c, - int x, int y, int w, int h, +void LiquidStyle::drawRectangularButton( TQPainter *painter, + const TQColorGroup &cg, const TQColor &c, + int x, int y, int w, int h, bool sunken, bool hover, bool isCombo, int position, bool isHTML) const { #define _HEIGHT_ ptr->rectbutton->height() #define _WIDTH_ ptr->rectbutton->width() LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); - QColor tmpColor; + TQColor tmpColor; tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : c; int xOffset, width; @@ -770,11 +770,11 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, ButtonTile *tile = rectBtnDict.find( tmpColor.rgb() ); if ( !tile ) - tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict<ButtonTile>*)0L, (QIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); + tile = createButtonTile( tmpColor, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict<ButtonTile>*)0L, (TQIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -802,23 +802,23 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, break; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTML) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); if (position != center && paintWidget && paintWidget->parentWidget()) { if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) - p->drawTiledPixmap(QRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((QWidget *)this->paintWidget)->backgroundOffset()); + p->drawTiledPixmap(TQRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((TQWidget *)this->paintWidget)->backgroundOffset()); else p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); } @@ -831,7 +831,7 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, } int tileH = 0; - QPixmap tmpPix(_LOFF_, 1); + TQPixmap tmpPix(_LOFF_, 1); if (position == left || position == full) { @@ -946,10 +946,10 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, // second part of combos if needed tile = rectBtnDict.find( c.rgb() ); if ( !tile ) - tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((QImage*)0L), ((QImage*)0L), &(ptr->rectBtnDict), (QIntDict<ButtonTile>*)0L, (QIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); + tile = createButtonTile( c, cg.background(), ptr->rectbutton, ((TQImage*)0L), ((TQImage*)0L), &(ptr->rectBtnDict), (TQIntDict<ButtonTile>*)0L, (TQIntDict<ButtonTile>*)0L, 33, 25, 10, 5, 13, 15, 0, 0, sunken); if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -1038,31 +1038,31 @@ void LiquidStyle::drawRectangularButton( QPainter *painter, } -void LiquidStyle::drawCombo( QPainter *painter, - const QColorGroup &cg, - const QColor &c, - int x, int y, int w, int h, - bool sunken, bool hover, bool isCombo, +void LiquidStyle::drawCombo( TQPainter *painter, + const TQColorGroup &cg, + const TQColor &c, + int x, int y, int w, int h, + bool sunken, bool hover, bool isCombo, int position, bool isHTML ) const { LiquidStyle *ptr = const_cast<LiquidStyle*>( this ); - QColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c; - QColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC; + TQColor myC =(isOOO && isCombo)?optionHandler->CustomButtonColor():c; + TQColor tmpColor = isCombo && !(hover || sunken) ? optionHandler->InactiveButtonColor() : myC; ButtonTile *tile = sunken ? comboDict.find( tmpColor.rgb() ) : comboShadowedDict.find( tmpColor.rgb() ); if ( !tile ) { if (optionHandler->buttonStyle() == Milk && sunken) - tile = createButtonTile( tmpColor, cg.background(), ptr->btnBorderImg, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, true); + tile = createButtonTile( tmpColor, cg.background(), ptr->btnBorderImg, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, true); else - tile = createButtonTile( tmpColor, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); + tile = createButtonTile( tmpColor, cg.background(), ptr->combo, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } @@ -1092,23 +1092,23 @@ void LiquidStyle::drawCombo( QPainter *painter, break; } - QPainter *p; - QPen oldPen = painter->pen(); + TQPainter *p; + TQPen oldPen = painter->pen(); if (!isHTML) { if ( !tmpBtnPix ) - ptr->tmpBtnPix = new QPixmap( w, h ); + ptr->tmpBtnPix = new TQPixmap( w, h ); else if ( w > tmpBtnPix->width() || h > tmpBtnPix->height() ) { // make temp pixmap size == largest button ptr->tmpBtnPix->resize(w,h); } - p = new QPainter(tmpBtnPix); + p = new TQPainter(tmpBtnPix); #if 0 - QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); + TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap(); if ( !stipple ) // button may have custom colorgroup - stipple = qApp->palette().active().brush( QColorGroup::Background ).pixmap(); + stipple = tqApp->palette().active().brush( TQColorGroup::Background ).pixmap(); if ( stipple ) p->drawTiledPixmap( 0, 0, w, h, *stipple); else @@ -1117,7 +1117,7 @@ void LiquidStyle::drawCombo( QPainter *painter, if (position != center && paintWidget && paintWidget->parentWidget()) { if (this->paintWidget->parentWidget()->paletteBackgroundPixmap ()) - p->drawTiledPixmap(QRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((QWidget *)this->paintWidget)->backgroundOffset()); + p->drawTiledPixmap(TQRect(0, 0, w, h), *this->paintWidget->parentWidget()->paletteBackgroundPixmap(), ((TQWidget *)this->paintWidget)->backgroundOffset()); else p->fillRect( 0, 0, w, h, this->paintWidget->parentWidget()->paletteBackgroundColor()); } @@ -1173,11 +1173,11 @@ void LiquidStyle::drawCombo( QPainter *painter, tile = comboShadowedDict.find( myC.rgb() ); if ( !tile ) { - tile = createButtonTile( myC, cg.background(), ptr->combo, ptr->comboShadow, ((QImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (QIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); + tile = createButtonTile( myC, cg.background(), ptr->combo, ptr->comboShadow, ((TQImage*)0L), &(ptr->comboDict), &(ptr->comboShadowedDict), (TQIntDict<ButtonTile>*)0L, 44, 21, 7, 9, 30, 1, 2, 0, sunken); } if ( !tile ) { - qWarning( "Button tile is NULL!" ); + tqWarning( "Button tile is NULL!" ); return ; } if ( w > _LRWIDTH_ ) @@ -1242,15 +1242,15 @@ void LiquidStyle::drawCombo( QPainter *painter, p->setPen(oldPen); } -void LiquidStyle::drawRoundFrame( QPainter *p, const QRect &r, - const QColorGroup &cg, bool focused, QPoint offset ) const +void LiquidStyle::drawRoundFrame( TQPainter *p, const TQRect &r, + const TQColorGroup &cg, bool focused, TQPoint offset ) const { ButtonTile *tile = focused ? activeRoundFrame : inactiveRoundFrame; if (!tile) tile = createRoundFrameTile(*roundFrame, focused ? cg.button() : optionHandler->InactiveButtonColor(), &cg.background(), cg.base() ); // first: fill background (tiled) // outer - QPixmap *stipple = cg.brush( QColorGroup::Background ).pixmap(); + TQPixmap *stipple = cg.brush( TQColorGroup::Background ).pixmap(); if (stipple) { p->drawTiledPixmap( r.x(),r.y(), 7, 8, *stipple, offset.x(), offset.y()); @@ -1290,17 +1290,17 @@ void LiquidStyle::drawRoundFrame( QPainter *p, const QRect &r, } } -void LiquidStyle::drawEditFrame( QPainter *p, const QRect &r, - const QColorGroup &cg, bool isHTML, bool focused, bool inverse ) const +void LiquidStyle::drawEditFrame( TQPainter *p, const TQRect &r, + const TQColorGroup &cg, bool isHTML, bool focused, bool inverse ) const { - QColor fill( cg.background().dark( 105 ) ); - QColor tmp(0,0,0); - QColor light1( 0, 0, 0 ); - QColor light2( 0, 0, 0 ); + TQColor fill( cg.background().dark( 105 ) ); + TQColor tmp(0,0,0); + TQColor light1( 0, 0, 0 ); + TQColor light2( 0, 0, 0 ); - QColor dark1( 0, 0, 0 ); - QColor dark2( 0, 0, 0 ); - QColor dark3( 0, 0, 0 ); + TQColor dark1( 0, 0, 0 ); + TQColor dark2( 0, 0, 0 ); + TQColor dark3( 0, 0, 0 ); if ( !focused ) { @@ -1390,12 +1390,12 @@ void LiquidStyle::drawEditFrame( QPainter *p, const QRect &r, p->drawLine( right - 1, y + 2, right - 1, bottom - 2 ); } -bool LiquidStyle::isHTMLWidget( const QWidget *widget ) const +bool LiquidStyle::isHTMLWidget( const TQWidget *widget ) const { - const QObject * w = widget->parent(); + const TQObject * w = widget->parent(); if ( w ) { - if ( !w->inherits( "QClipperWidget" ) ) + if ( !w->inherits( "TQClipperWidget" ) ) return ( false ); w = w->parent(); if ( w ) @@ -1408,9 +1408,9 @@ bool LiquidStyle::isHTMLWidget( const QWidget *widget ) const return ( false ); } -void LiquidStyle::drawHTMLCBBorder( const QPixmap &pix, const QColor &c ) const +void LiquidStyle::drawHTMLCBBorder( const TQPixmap &pix, const TQColor &c ) const { - QPainter p; + TQPainter p; p.begin( &pix ); p.setPen( c.dark( 200 ) ); p.drawRect( 0, 0, 16, 16 ); |