diff options
author | Mavridis Philippe <[email protected]> | 2024-03-10 19:57:12 +0200 |
---|---|---|
committer | Mavridis Philippe <[email protected]> | 2024-03-10 20:04:10 +0200 |
commit | 8dbc6179f8b3bd630e3edc6d1e2a01becf5e065b (patch) | |
tree | bcb2aed9636358b58e0202e941d372da808c6442 | |
parent | db5c38267db65110beb4ad895a1fe38b42d8001f (diff) | |
download | tde-style-polyester-8dbc6179f8b3bd630e3edc6d1e2a01becf5e065b.tar.gz tde-style-polyester-8dbc6179f8b3bd630e3edc6d1e2a01becf5e065b.zip |
Port to TDE
Signed-off-by: Mavridis Philippe <[email protected]>
-rw-r--r-- | Doxyfile | 2 | ||||
-rw-r--r-- | README | 2 | ||||
-rw-r--r-- | client/config/configdialog.cc | 2 | ||||
-rwxr-xr-x | client/config/polyesterconfig.cc | 18 | ||||
-rwxr-xr-x | client/config/polyesterconfig.h | 10 | ||||
-rwxr-xr-x | client/polyester.cc | 14 | ||||
-rwxr-xr-x | client/polyester.desktop | 2 | ||||
-rwxr-xr-x | client/shadow.cpp | 2 | ||||
-rwxr-xr-x | client/shadow.h | 2 | ||||
-rw-r--r-- | polyester.kdevses | 2 | ||||
-rw-r--r-- | polyester.tdevelop (renamed from polyester.kdevelop) | 8 | ||||
-rwxr-xr-x | style/config/polyesterconf.cpp | 8 | ||||
-rwxr-xr-x | style/polyester.cpp | 116 | ||||
-rwxr-xr-x | style/polyester.h | 20 |
14 files changed, 104 insertions, 104 deletions
@@ -3,7 +3,7 @@ #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- -PROJECT_NAME = polyester.kdevelop +PROJECT_NAME = polyester.tdevelop PROJECT_NUMBER = 0.1 OUTPUT_DIRECTORY = CREATE_SUBDIRS = NO @@ -1 +1 @@ -Polyester is a kde widget style and a kwin decoration both aimed to be a good balance between eye candy and simplicity. +Polyester is a TDE widget style and a twin decoration both aimed to be a good balance between eye candy and simplicity. diff --git a/client/config/configdialog.cc b/client/config/configdialog.cc index 75f6623..4e6db04 100644 --- a/client/config/configdialog.cc +++ b/client/config/configdialog.cc @@ -1,5 +1,5 @@ #include <kdialog.h> -#include <klocale.h> +#include <tdelocale.h> /**************************************************************************** ** Form implementation generated from reading ui file './configdialog.ui' ** diff --git a/client/config/polyesterconfig.cc b/client/config/polyesterconfig.cc index 24c5ce8..7f322fb 100755 --- a/client/config/polyesterconfig.cc +++ b/client/config/polyesterconfig.cc @@ -10,9 +10,9 @@ // Please see the header file for copyright and license information. ////////////////////////////////////////////////////////////////////////////// -#include <kconfig.h> -#include <klocale.h> -#include <kglobal.h> +#include <tdeconfig.h> +#include <tdelocale.h> +#include <tdeglobal.h> #include <tqbuttongroup.h> #include <tqgroupbox.h> #include <tqradiobutton.h> @@ -29,11 +29,11 @@ // ------------- // Constructor -polyesterConfig::polyesterConfig(KConfig* config, TQWidget* parent) +polyesterConfig::polyesterConfig(TDEConfig* config, TQWidget* parent) : TQObject(parent), config_(0), dialog_(0) { // create the configuration object - config_ = new KConfig("kwinpolyesterrc"); - KGlobal::locale()->insertCatalogue("kwin_polyester_config"); + config_ = new TDEConfig("twinpolyesterrc"); + TDEGlobal::locale()->insertCatalogue("twin_polyester_config"); // create and show the configuration dialog dialog_ = new ConfigDialog(parent); @@ -104,7 +104,7 @@ void polyesterConfig::selectionChanged(int) { // ------ // Load configuration data -void polyesterConfig::load(KConfig*) { +void polyesterConfig::load(TDEConfig*) { config_->setGroup("General"); TQString value = config_->readEntry("TitleAlignment", "AlignHCenter"); @@ -141,7 +141,7 @@ void polyesterConfig::load(KConfig*) { // ------ // Save configuration data -void polyesterConfig::save(KConfig*) { +void polyesterConfig::save(TDEConfig*) { config_->setGroup("General"); TQRadioButton *button = (TQRadioButton*)dialog_->titlealign->selected(); @@ -197,7 +197,7 @@ void polyesterConfig::defaults() { ////////////////////////////////////////////////////////////////////////////// extern "C" { - TQObject* allocate_config(KConfig* config, TQWidget* parent) { + TQObject* allocate_config(TDEConfig* config, TQWidget* parent) { return (new polyesterConfig(config, parent)); } } diff --git a/client/config/polyesterconfig.h b/client/config/polyesterconfig.h index 34c84ce..cd7e05c 100755 --- a/client/config/polyesterconfig.h +++ b/client/config/polyesterconfig.h @@ -32,28 +32,28 @@ #include <tqobject.h> -class KConfig; +class TDEConfig; class ConfigDialog; class polyesterConfig : public TQObject { TQ_OBJECT public: - polyesterConfig(KConfig* config, TQWidget* parent); + polyesterConfig(TDEConfig* config, TQWidget* parent); ~polyesterConfig(); signals: void changed(); public slots: - void load(KConfig*); - void save(KConfig*); + void load(TDEConfig*); + void save(TDEConfig*); void defaults(); protected slots: void selectionChanged(int); private: - KConfig *config_; + TDEConfig *config_; ConfigDialog *dialog_; }; diff --git a/client/polyester.cc b/client/polyester.cc index 2ef4044..edafebd 100755 --- a/client/polyester.cc +++ b/client/polyester.cc @@ -14,11 +14,11 @@ ////////////////////////////////////////////////////////////////////////////// -#include <kconfig.h> -#include <kdeversion.h> -#include <kglobal.h> -#include <kglobalsettings.h> -#include <klocale.h> +#include <tdeconfig.h> +#include <tdeversion.h> +#include <tdeglobal.h> +#include <tdeglobalsettings.h> +#include <tdelocale.h> #include <kpixmap.h> #include <kimageeffect.h> #include <kpixmapeffect.h> @@ -136,7 +136,7 @@ bool polyesterFactory::reset(unsigned long changed) { bool polyesterFactory::readConfig() { // create a config object - KConfig config("kwinpolyesterrc"); + TDEConfig config("twinpolyesterrc"); config.setGroup("General"); // grab settings @@ -1408,7 +1408,7 @@ void polyesterClient::mouseDoubleClickEvent(TQMouseEvent *e) { // Mousewheel over titlebar void polyesterClient::wheelEvent(TQWheelEvent * e) { -#if KDE_VERSION > KDE_MAKE_VERSION(3,4,3) +#if TDE_VERSION > TDE_MAKE_VERSION(3,4,3) if (titleLayout_->geometry().contains(e->pos())) titlebarMouseWheelOperation(e->delta()); #endif diff --git a/client/polyester.desktop b/client/polyester.desktop index a5f4459..30f8b1d 100755 --- a/client/polyester.desktop +++ b/client/polyester.desktop @@ -2,4 +2,4 @@ [Desktop Entry] Encoding=UTF-8 Name=Polyester -X-KDE-Library=kwin3_polyester +X-TDE-Library=twin3_polyester diff --git a/client/shadow.cpp b/client/shadow.cpp index 8b94933..d7b26e1 100755 --- a/client/shadow.cpp +++ b/client/shadow.cpp @@ -1,6 +1,6 @@ /* Copyright (C) 2003 by Sandro Giessl * based on the nice CVS KDesktop KShadowEngine class. thanks! - * looking forward to see KShadowEngine in kdefx somewhen btw.. :) + * looking forward to see KShadowEngine in tdefx somewhen btw.. :) * ------------------------------------------------------------------------ * these are the original copyright notes: * This file is proposed to be part of the KDE libraries. diff --git a/client/shadow.h b/client/shadow.h index 0434201..fe76dfe 100755 --- a/client/shadow.h +++ b/client/shadow.h @@ -1,6 +1,6 @@ /* Copyright (C) 2003 by Sandro Giessl * based on the nice CVS KDesktop KShadowEngine class. thanks! - * looking forward to see KShadowEngine in kdefx somewhen btw.. :) + * looking forward to see KShadowEngine in tdefx somewhen btw.. :) * ------------------------------------------------------------------------ * these are the original copyright notes: * This file is proposed to be part of the KDE libraries. diff --git a/polyester.kdevses b/polyester.kdevses index 178023c..c9b7ab5 100644 --- a/polyester.kdevses +++ b/polyester.kdevses @@ -38,7 +38,7 @@ <executable path="" params="" /> <valgrind path="" params="" /> <calltree path="" params="" /> - <kcachegrind path="" /> + <tdecachegrind path="" /> </kdevvalgrind> </pluginList> </KDevPrjSession> diff --git a/polyester.kdevelop b/polyester.tdevelop index 76a5edf..7a615dc 100644 --- a/polyester.kdevelop +++ b/polyester.tdevelop @@ -1,5 +1,5 @@ <?xml version = '1.0'?> -<kdevelop> +<tdevelop> <general> <author>Marco Martin</author> <email>[email protected]</email> @@ -178,7 +178,7 @@ <custom>false</custom> <bzip>false</bzip> <archname/> - <appname>polyester.kdevelop</appname> + <appname>polyester.tdevelop</appname> <version>0.7</version> <release>1</release> <vendor>suse</vendor> @@ -186,7 +186,7 @@ <summary>A glossy kde theme</summary> <group>System/GUI/KDE</group> <packager>Marco Martin</packager> - <description>Widget style + kwin decoration both aimed to be a good balance between eye candy and simplicity</description> + <description>Widget style + twin decoration both aimed to be a good balance between eye candy and simplicity</description> <changelog>Polyester 0.7:misc:-(hopefully) fixed gentoo ebuild (i don't have gentoo installed atm, so let me know)widget:-some little code cleanups-menubar text shadow configurable-as requested the look has been made a little bit similar to http://kdelook.org/content/show.php?content=33522 (but not identical)-active menu item more button-like-new option (default off) "menubar emphasis" that makes the menubar more glass-likedeco:-litte modification of the titlebar border-titlebar buttons with more contrast-when a dark color is chosen for the titlebar buttons, their icons become white</changelog> <devpackage>false</devpackage> <docspackage>false</docspackage> @@ -198,4 +198,4 @@ <appskde>false</appskde> <url/> </dist> -</kdevelop> +</tdevelop> diff --git a/style/config/polyesterconf.cpp b/style/config/polyesterconf.cpp index 055e19b..3f365b6 100755 --- a/style/config/polyesterconf.cpp +++ b/style/config/polyesterconf.cpp @@ -36,8 +36,8 @@ DEALINGS IN THE SOFTWARE. #include <tqsettings.h> #include <tqcolor.h> #include <tqgroupbox.h> -#include <kglobal.h> -#include <klocale.h> +#include <tdeglobal.h> +#include <tdelocale.h> #include <kcolorbutton.h> #include <kdemacros.h> @@ -48,7 +48,7 @@ extern "C" { KDE_EXPORT TQWidget* allocate_kstyle_config(TQWidget* parent) { - KGlobal::locale()->insertCatalogue("polyester"); + TDEGlobal::locale()->insertCatalogue("polyester"); return new PolyesterStyleConfig(parent); } } @@ -59,7 +59,7 @@ PolyesterStyleConfig::PolyesterStyleConfig(TQWidget* parent): TQWidget(parent) //Should have no margins here, the dialog provides them TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0); dialog_ = new ConfigDialog(this); - KGlobal::locale()->insertCatalogue("kstyle_polyester_config"); + TDEGlobal::locale()->insertCatalogue("kstyle_polyester_config"); layout->addWidget(dialog_); diff --git a/style/polyester.cpp b/style/polyester.cpp index 0c2b1bc..5fe43fa 100755 --- a/style/polyester.cpp +++ b/style/polyester.cpp @@ -23,7 +23,7 @@ Copyright (C) 2000 Daniel M. Duley <[email protected]> (C) 2000 Dirk Mueller <[email protected]> (C) 2001 Martijn Klingens <[email protected]> - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed <[email protected]> This library is free software; you can redistribute it and/or @@ -73,7 +73,7 @@ #include <tqsettings.h> #include <kpixmap.h> #include <kimageeffect.h> -#include <kglobal.h> +#include <tdeglobal.h> #include "polyester.h" #include "polyester.moc" @@ -160,7 +160,7 @@ class PolyesterStylePlugin : public TQStylePlugin KDE_Q_EXPORT_PLUGIN( PolyesterStylePlugin ) // -- end -- -PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollBar), +PolyesterStyle::PolyesterStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrollBar), kickerMode(false), kornMode(false), flatMode(false) @@ -236,19 +236,19 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr this hack may be disabled in the future, let's see...*/ if( !qstrcmp( tqApp->argv() [ 0 ], "unknown" ) ) { - _scrollBarType = KStyle::WindowsStyleScrollBar; + _scrollBarType = TDEStyle::WindowsStyleScrollBar; _menuStripe = false; } //Thanks, Lipstik :-) else if( !strcmp(_scrollBarStyle,"ThreeButtonScrollBar" ) ) - _scrollBarType = KStyle::ThreeButtonScrollBar; + _scrollBarType = TDEStyle::ThreeButtonScrollBar; else if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) ) - _scrollBarType = KStyle::WindowsStyleScrollBar; + _scrollBarType = TDEStyle::WindowsStyleScrollBar; else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) ) - _scrollBarType = KStyle::PlatinumStyleScrollBar; + _scrollBarType = TDEStyle::PlatinumStyleScrollBar; else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) ) - _scrollBarType = KStyle::NextStyleScrollBar; + _scrollBarType = TDEStyle::NextStyleScrollBar; //HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke /*if( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) ) @@ -363,9 +363,9 @@ void PolyesterStyle::polish(TQApplication* app) void PolyesterStyle::polish(TQWidget* widget) { - if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...? - khtmlWidgets[widget] = true; - connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*))); + if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...? + tdehtmlWidgets[widget] = true; + connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(tdehtmlWidgetDestroyed(TQObject*))); } // use tqt_cast where possible to check if the widget inheits one of the classes. might improve @@ -401,7 +401,7 @@ void PolyesterStyle::polish(TQWidget* widget) widget->installEventFilter(this); } else if (::tqt_cast<TQPopupMenu*>(widget)) { widget->setBackgroundMode( NoBackground ); - } else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) { + } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { widget->installEventFilter(this); } else if (::tqt_cast<TQHeader*>(widget)) { connect(widget->parent(), SIGNAL(contentsMoving(int, int)), widget, SLOT(update())); @@ -421,13 +421,13 @@ void PolyesterStyle::polish(TQWidget* widget) - KStyle::polish(widget); + TDEStyle::polish(widget); } void PolyesterStyle::unPolish(TQWidget* widget) { - if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...? - khtmlWidgets.remove(widget); + if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...? + tdehtmlWidgets.remove(widget); } // use tqt_cast to check if the widget inheits one of the classes. @@ -446,7 +446,7 @@ void PolyesterStyle::unPolish(TQWidget* widget) widget->removeEventFilter(this); } else if (::tqt_cast<TQPopupMenu*>(widget)) { widget->setBackgroundMode( PaletteBackground ); - } else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) { + } else if ( !qstrcmp(widget->name(), "tde toolbar widget") ) { widget->removeEventFilter(this); } @@ -459,13 +459,13 @@ void PolyesterStyle::unPolish(TQWidget* widget) progAnimWidgets.remove(widget); } - KStyle::unPolish(widget); + TDEStyle::unPolish(widget); } /*a bunch of slots stuff...*/ -void PolyesterStyle::khtmlWidgetDestroyed(TQObject* obj) +void PolyesterStyle::tdehtmlWidgetDestroyed(TQObject* obj) { - khtmlWidgets.remove(static_cast<TQWidget*>(obj)); + tdehtmlWidgets.remove(static_cast<TQWidget*>(obj)); } void PolyesterStyle::progressBarDestroyed(TQObject* obj) @@ -962,7 +962,7 @@ void PolyesterStyle::renderButton(TQPainter *p, bool mouseOver, bool horizontal, bool enabled, - bool khtmlMode, + bool tdehtmlMode, int animFrame, bool isDefault //TODO: move here all the default-button related code? ) const @@ -975,7 +975,7 @@ void PolyesterStyle::renderButton(TQPainter *p, uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom; if(!enabled) contourFlags|=Is_Disabled; - if(khtmlMode) contourFlags|=Draw_AlphaBlend; + if(tdehtmlMode) contourFlags|=Draw_AlphaBlend; uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom; if(horizontal) surfaceFlags|=Is_Horizontal; @@ -1547,7 +1547,7 @@ void PolyesterStyle::sliderThumbMoved(int val) } } -void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe, +void PolyesterStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -1844,7 +1844,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe, break; } - // copied and slightly modified from KStyle. + // copied and slightly modified from TDEStyle. case KPE_ListViewBranch: { // Typical Windows style listview branch element (dotted line). @@ -1917,7 +1917,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe, } default: - KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt); + TDEStyle::drawTDEStylePrimitive(kpe, p, widget, r, cg, flags, opt); } } @@ -2093,12 +2093,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, case PE_ButtonTool: case PE_ButtonDropDown: case PE_ButtonCommand: { - bool khtmlMode = khtmlWidgets.contains(opt.widget()); + bool tdehtmlMode = tdehtmlWidgets.contains(opt.widget()); int animFrame = 0; if( _animateButton && animWidgets.contains(opt.widget()) ) animFrame = (int)animWidgets[opt.widget()].animFrame; renderButton(p, r, cg, (on||down), mouseOver, true, enabled, - khtmlMode, animFrame, flags & Style_ButtonDefault ); + tdehtmlMode, animFrame, flags & Style_ButtonDefault ); break; } @@ -2222,14 +2222,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, //coordinates for the surface uint xs=x,ws=w; - if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) ) + if( pe == PE_ScrollBarSubPage && ( _scrollBarType == TDEStyle::PlatinumStyleScrollBar ) ) { contourFlags |= Draw_Left|Round_UpperLeft|Round_BottomLeft; surfaceFlags |= Round_UpperLeft|Round_BottomLeft; xs++; ws--; } - else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) ) + else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == TDEStyle::NextStyleScrollBar ) ) { contourFlags |= Draw_Right|Round_UpperRight|Round_BottomRight; surfaceFlags |= Round_UpperRight|Round_BottomRight; @@ -2255,14 +2255,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, //coordinates for the surface uint ys=y,hs=h; - if( pe == PE_ScrollBarSubPage && ( _scrollBarType == KStyle::PlatinumStyleScrollBar ) ) + if( pe == PE_ScrollBarSubPage && ( _scrollBarType == TDEStyle::PlatinumStyleScrollBar ) ) { contourFlags |= Draw_Top|Round_UpperLeft|Round_UpperRight; surfaceFlags |= Round_UpperLeft|Round_UpperRight; ys++; hs--; } - else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == KStyle::NextStyleScrollBar ) ) + else if( pe == PE_ScrollBarAddPage && ( _scrollBarType == TDEStyle::NextStyleScrollBar ) ) { contourFlags |= Draw_Bottom|Round_BottomLeft|Round_BottomRight; surfaceFlags |= Round_BottomLeft|Round_BottomRight; @@ -2349,7 +2349,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, } case PE_ScrollBarAddLine: { - uint isNext = _scrollBarType == KStyle::NextStyleScrollBar; + uint isNext = _scrollBarType == TDEStyle::NextStyleScrollBar; uint contourFlags = (!isNext||!horiz||down?Draw_Left:0)| Draw_Right| (!isNext||horiz||down?Draw_Top:0)| @@ -2378,13 +2378,13 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, if( horiz ) { contourFlags |= Sharp_UpperLeft|Sharp_BottomLeft; - if( _scrollBarType == KStyle::NextStyleScrollBar ) + if( _scrollBarType == TDEStyle::NextStyleScrollBar ) contourFlags |= Sharp_UpperRight|Sharp_BottomRight; } else { contourFlags |= Sharp_UpperLeft|Sharp_UpperRight; - if( _scrollBarType == KStyle::NextStyleScrollBar ) + if( _scrollBarType == TDEStyle::NextStyleScrollBar ) contourFlags |= Sharp_BottomLeft|Sharp_BottomRight; } @@ -2561,12 +2561,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, // HACK!! // - // In order to draw nice edges in khtml, we need to paint alpha-blended. + // In order to draw nice edges in tdehtml, we need to paint alpha-blended. // On the other hand, we can't paint alpha-blended in normal widgets. // - // In this place there is no reliable way to detect if we are in khtml; the - // only thing we know is that khtml buffers its widgets into a pixmap. So - // when the paint device is a TQPixmap, chances are high that we are in khtml. + // In this place there is no reliable way to detect if we are in tdehtml; the + // only thing we know is that tdehtml buffers its widgets into a pixmap. So + // when the paint device is a TQPixmap, chances are high that we are in tdehtml. // It's possible that this breaks other things, so let's see how it works... if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) { contourFlags += Draw_AlphaBlend; @@ -2873,7 +2873,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe, } default: { - return KStyle::drawPrimitive(pe, p, r, cg, flags, opt); + return TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt); } } } @@ -3169,7 +3169,7 @@ void PolyesterStyle::drawControl(ControlElement element, renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget); break; default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); } break; @@ -3720,7 +3720,7 @@ void PolyesterStyle::drawControl(ControlElement element, } default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -3739,7 +3739,7 @@ void PolyesterStyle::drawControlMask(ControlElement element, } default: { - KStyle::drawControlMask (element, p, w, r, opt); + TDEStyle::drawControlMask (element, p, w, r, opt); } } } @@ -3760,7 +3760,7 @@ void PolyesterStyle::drawComplexControlMask(ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, w, r, o); + TDEStyle::drawComplexControlMask (c, p, w, r, o); } } } @@ -3806,7 +3806,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control, :cg.background(); uint contourFlags = 0; - if( khtmlWidgets.contains(cb) ) + if( tdehtmlWidgets.contains(cb) ) contourFlags |= Draw_AlphaBlend; if (_inputFocusHighlight && hasFocus && editable && enabled) @@ -4185,7 +4185,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control, } default: - KStyle::drawComplexControl(control, p, widget, + TDEStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; @@ -4200,7 +4200,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const return querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ); } - // Don't use KStyles progressbar subrect + // Don't use TDEStyles progressbar subrect // TODO: case SR_ProgressBarGroove: { return TQRect(widget->rect()); @@ -4212,7 +4212,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const } default: { - return KStyle::subRect(r, widget); + return TDEStyle::subRect(r, widget); } } } @@ -4235,7 +4235,7 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control, return TQRect(r.left()+2, r.top()+2, r.width()-4-15-1, r.height()-4); } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } break; @@ -4279,13 +4279,13 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control, return TQRect(buttonsLeft, r.top()+1, bs.width(), r.height()-2); } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } break; } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } } @@ -4391,19 +4391,19 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::pixelMetric(m, widget); + return TDEStyle::pixelMetric(m, widget); } } -int PolyesterStyle::kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const +int PolyesterStyle::kPixelMetric(TDEStylePixelMetric kpm, const TQWidget *widget) const { switch(kpm) { case KPM_MenuItemSeparatorHeight: return 2; default: - return KStyle::kPixelMetric(kpm, widget); + return TDEStyle::kPixelMetric(kpm, widget); } } @@ -4483,14 +4483,14 @@ TQSize PolyesterStyle::sizeFromContents(ContentsType t, if(widget->parent() && ::tqt_cast<TQToolBar*>(widget->parent()) ) return TQSize( s.width()+2*4, s.height()+2*4 ); else - return KStyle::sizeFromContents (t, widget, s, opt); + return TDEStyle::sizeFromContents (t, widget, s, opt); } default: - return KStyle::sizeFromContents (t, widget, s, opt); + return TDEStyle::sizeFromContents (t, widget, s, opt); } - return KStyle::sizeFromContents (t, widget, s, opt); + return TDEStyle::sizeFromContents (t, widget, s, opt); } int PolyesterStyle::styleHint( StyleHint stylehint, @@ -4532,14 +4532,14 @@ int PolyesterStyle::styleHint( StyleHint stylehint, } #endif default: - return KStyle::styleHint(stylehint, widget, option, returnData); + return TDEStyle::styleHint(stylehint, widget, option, returnData); } } bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev) { - if (KStyle::eventFilter(obj, ev) ) + if (TDEStyle::eventFilter(obj, ev) ) return true; if (!obj->isWidgetType() ) return false; @@ -4690,7 +4690,7 @@ bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev) animationTimer->start( 50, false ); } } - if ( !qstrcmp(obj->name(), "kde toolbar widget") ) + if ( !qstrcmp(obj->name(), "tde toolbar widget") ) { TQWidget* lb = static_cast<TQWidget*>(obj); if (lb->backgroundMode() == TQt::PaletteButton) diff --git a/style/polyester.h b/style/polyester.h index a4a93d8..84f1133 100755 --- a/style/polyester.h +++ b/style/polyester.h @@ -23,7 +23,7 @@ Copyright (C) 2000 Daniel M. Duley <[email protected]> (C) 2000 Dirk Mueller <[email protected]> (C) 2001 Martijn Klingens <[email protected]> - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed <[email protected]> This library is free software; you can redistribute it and/or @@ -44,7 +44,7 @@ #ifndef __POLYESTER_H #define __POLYESTER_H -#include <kstyle.h> +#include <tdestyle.h> #include <tqbitmap.h> #include <tqintcache.h> @@ -62,7 +62,7 @@ class TQTimer; //a tiny reimplementation of max... int max(int a, int b){return (a>b?a:b);} -class PolyesterStyle : public KStyle +class PolyesterStyle : public TDEStyle { TQ_OBJECT @@ -74,7 +74,7 @@ public: void polish(TQWidget* widget ); void unPolish(TQWidget* widget ); - void drawKStylePrimitive(KStylePrimitive kpe, + void drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -112,7 +112,7 @@ public: int pixelMetric(PixelMetric m, const TQWidget *widget = 0 ) const; - int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const; + int kPixelMetric(TDEStylePixelMetric kpm, const TQWidget *widget) const; TQRect subRect(SubRect r, const TQWidget *widget ) const; @@ -242,7 +242,7 @@ protected: bool mouseOver = false, bool horizontal = true, bool enabled = true, - bool khtmlMode = false, + bool tdehtmlMode = false, int animFrame = 0, bool isDefault = false) const; @@ -285,7 +285,7 @@ protected: int hoverHeaderId; protected slots: - void khtmlWidgetDestroyed(TQObject* w); + void tdehtmlWidgetDestroyed(TQObject* w); void sliderThumbMoved(int val); @@ -311,7 +311,7 @@ private: bool _scrollBarLines; TQString _scrollBarStyle; int _scrollBarExtent; - KStyle::KStyleScrollBarType _scrollBarType; + TDEStyle::TDEStyleScrollBarType _scrollBarType; bool _useLowerCaseText; bool _animateProgressBar; bool _animateButton; @@ -346,8 +346,8 @@ private: TQTab *hoverTab; - // track khtml widgets. - TQMap<const TQWidget*,bool> khtmlWidgets; + // track tdehtml widgets. + TQMap<const TQWidget*,bool> tdehtmlWidgets; //Animation support. TQMap<TQWidget*, int> progAnimWidgets; |