diff options
Diffstat (limited to 'kstyles/kthemestyle')
-rw-r--r-- | kstyles/kthemestyle/kstyledirs.cpp | 14 | ||||
-rw-r--r-- | kstyles/kthemestyle/kstyledirs.h | 22 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemebase.cpp | 14 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemebase.h | 28 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemestyle.cpp | 22 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemestyle.h | 6 |
6 files changed, 53 insertions, 53 deletions
diff --git a/kstyles/kthemestyle/kstyledirs.cpp b/kstyles/kthemestyle/kstyledirs.cpp index 7e548d0d5..8755fb294 100644 --- a/kstyles/kthemestyle/kstyledirs.cpp +++ b/kstyles/kthemestyle/kstyledirs.cpp @@ -1,7 +1,7 @@ /* $Id$ - Simple helper routines for style's use of KStandardDirs with TQSettings, etc. + Simple helper routines for style's use of TDEStandardDirs with TQSettings, etc. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -25,19 +25,19 @@ #include <kstandarddirs.h> #include "kstyledirs.h" -KStyleDirs* KStyleDirs::instance = 0; +TDEStyleDirs* TDEStyleDirs::instance = 0; -KStyleDirs::KStyleDirs() +TDEStyleDirs::TDEStyleDirs() { - addResourceType( "themepixmap", KStandardDirs::kde_default( "data" ) + "kstyle/pixmaps/" ); - addResourceType( "themerc", KStandardDirs::kde_default( "data" ) + "kstyle/themes/" ); + addResourceType( "themepixmap", TDEStandardDirs::kde_default( "data" ) + "kstyle/pixmaps/" ); + addResourceType( "themerc", TDEStandardDirs::kde_default( "data" ) + "kstyle/themes/" ); } -KStyleDirs::~KStyleDirs() +TDEStyleDirs::~TDEStyleDirs() { } -void KStyleDirs::addToSearch( const char* type, TQSettings& s ) const +void TDEStyleDirs::addToSearch( const char* type, TQSettings& s ) const { const TQStringList & dirs = resourceDirs(type); for ( int c = dirs.size()-1; c >= 0 ; c-- ) diff --git a/kstyles/kthemestyle/kstyledirs.h b/kstyles/kthemestyle/kstyledirs.h index 9d2635136..410fad2ef 100644 --- a/kstyles/kthemestyle/kstyledirs.h +++ b/kstyles/kthemestyle/kstyledirs.h @@ -30,22 +30,22 @@ /** * @short Access to the standard KDE directories for the pixmap style * @author Maksim Orlovich<mo002j@mail.rochester.edu> is responsible for this file, - but all the interesting work is done by KStandardDirs + but all the interesting work is done by TDEStandardDirs * @version $Id$ * -* This class provides a this wrapper for styles around KStandardDirs, +* This class provides a this wrapper for styles around TDEStandardDirs, * permitting integration with TQSettings and easy loading of pixmaps * * It add share/apps/kstyle/themes as "themerc", * share/apps/kstyle/pixmaps "themepixmap" */ -class KStyleDirs: public KStandardDirs +class TDEStyleDirs: public TDEStandardDirs { public: - static KStyleDirs* dirs() + static TDEStyleDirs* dirs() { if ( !instance) - instance = new KStyleDirs; + instance = new TDEStyleDirs; return instance; } @@ -60,7 +60,7 @@ public: For example, when one does the following: TQSettings settings; - KStyleDirs dirs; + TDEStyleDirs dirs; dirs.addToSearch("config",settings); The one can do settings.readEntry("kstyle/KDE/WidgetStyle") to access a settings in kstylerc. @@ -68,15 +68,15 @@ public: void addToSearch( const char* type, TQSettings& q) const; //Better name? protected: - static KStyleDirs* instance; + static TDEStyleDirs* instance; /** Creates an instance of the class, and calculates the path information. */ - KStyleDirs(); - KStyleDirs(const KStyleDirs&); - KStyleDirs& operator= (const KStyleDirs&); + TDEStyleDirs(); + TDEStyleDirs(const TDEStyleDirs&); + TDEStyleDirs& operator= (const TDEStyleDirs&); - virtual ~KStyleDirs(); + virtual ~TDEStyleDirs(); }; #endif diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 56cbeb09f..adbf49084 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -7,7 +7,7 @@ KDE3 port (C) 2001-2002 Maksim Orlovich <mo002j@mail.rochester.edu> Port version 0.9.7 - Palette setup code is from KApplication, + Palette setup code is from TDEApplication, Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org) Copyright (C) 1998, 1999, 2000 KDE Team @@ -60,7 +60,7 @@ Bugs: Can't delete old slider image when calculating the rotated one for some reason. */ -//Shamelessly stolen from KConfigBase +//Shamelessly stolen from TDEConfigBase static TQColor readColorEntry( TQSettings* s, const char *pKey, const TQColor* pDefault ) { @@ -423,7 +423,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ ) TQSettings config; if (configDirName.isEmpty() || configDirName == ".") { - KStyleDirs::dirs()->addToSearch( "themerc", config ); + TDEStyleDirs::dirs()->addToSearch( "themerc", config ); } else config.insertSearchPath( TQSettings::Unix, configDirName ); @@ -525,7 +525,7 @@ void KThemeBase::readConfig( TQt::GUIStyle /*style*/ ) } KThemeBase::KThemeBase( const TQString& dir, const TQString & configFile ) - : KStyle( FilledFrameWorkaround ), configFileName( configFile ) + : TDEStyle( FilledFrameWorkaround ), configFileName( configFile ) { d = new KThemeBasePrivate; if ( configFileName.isEmpty() ) @@ -648,7 +648,7 @@ KThemeBase::~KThemeBase() if ( grHighColors[ i ] ) delete( grHighColors[ i ] ); } - KStyleDirs::release(); + TDEStyleDirs::release(); delete cache; delete d; } @@ -656,7 +656,7 @@ KThemeBase::~KThemeBase() TQImage* KThemeBase::loadImage( const TQString &name ) { TQImage * image = new TQImage; - TQString path = KStyleDirs::dirs()->findResource( "themepixmap",name ); + TQString path = TDEStyleDirs::dirs()->findResource( "themepixmap",name ); image->load( path ); if ( !image->isNull() ) return ( image ); @@ -668,7 +668,7 @@ TQImage* KThemeBase::loadImage( const TQString &name ) KThemePixmap* KThemeBase::loadPixmap( const TQString &name ) { KThemePixmap * pixmap = new KThemePixmap( false ); - TQString path = KStyleDirs::dirs()->findResource( "themepixmap", name ); + TQString path = TDEStyleDirs::dirs()->findResource( "themepixmap", name ); pixmap->load( path ); if ( !pixmap->isNull() ) return pixmap; diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h index 3e2019383..1e16bcee7 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -6,7 +6,7 @@ KDE3 port (C) 2001 Maksim Orlovich <mo002j@mail.rochester.edu> - Palette setup code is from KApplication, + Palette setup code is from TDEApplication, Copyright (C) 1997 Matthias Kalle Dalheimer (kalle@kde.org) Copyright (C) 1998, 1999, 2000 KDE Team @@ -34,7 +34,7 @@ Copyright (C) 1998, 1999, 2000 KDE Team #include <kpixmap.h> #include <tqintcache.h> #include <tqstring.h> -#include <kstyle.h> +#include <tdestyle.h> #include <tqsettings.h> #include <tqpalette.h> // for QColorGroup #include "kstyledirs.h" @@ -211,7 +211,7 @@ class KThemeBasePrivate; * * @author Daniel M. Duley <mosfet@kde.org> */ -class KThemeBase: public KStyle +class KThemeBase: public TDEStyle { Q_OBJECT public: @@ -280,7 +280,7 @@ public: Background, RotSliderGroove, RotInactiveTab, RotActiveTab, WIDGETS}; /** - * The scaling type specified by the KConfig file. + * The scaling type specified by the TDEConfig file. * * @param widget A Widgets enum value. * @@ -288,7 +288,7 @@ public: */ ScaleHint scaleHint( WidgetType widget ) const; /** - * The gradient type specified by the KConfig file. + * The gradient type specified by the TDEConfig file. * * @param widget A Widgets enum value. * @@ -510,14 +510,14 @@ protected: */ virtual int pixelMetric ( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * widget = 0 ) const { - return KStyle::pixelMetric( metric, ceData, elementFlags, widget ); + return TDEStyle::pixelMetric( metric, ceData, elementFlags, widget ); } virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption& option = TQStyleOption::Default ) const { - KStyle::tqdrawPrimitive ( pe, p, ceData, elementFlags, r, cg, + TDEStyle::tqdrawPrimitive ( pe, p, ceData, elementFlags, r, cg, flags, option ); } @@ -532,7 +532,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - KStyle::drawControl( element, p, ceData, elementFlags, + TDEStyle::drawControl( element, p, ceData, elementFlags, r, cg, how, opt, widget ); } @@ -544,7 +544,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - KStyle::drawControlMask( element, p, ceData, elementFlags, r, opt, widget ); + TDEStyle::drawControlMask( element, p, ceData, elementFlags, r, opt, widget ); } @@ -560,11 +560,11 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget* widget = 0 ) const { - KStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget ); + TDEStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, opt, widget ); } - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -574,7 +574,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget* widget = 0 ) const { - KStyle::drawKStylePrimitive( kpe, + TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget ); } @@ -585,7 +585,7 @@ protected: TQStyleHintReturn* returnData = 0, const TQWidget *widget = 0 ) const { - return KStyle::styleHint( sh, + return TDEStyle::styleHint( sh, ceData, elementFlags, opt, @@ -600,7 +600,7 @@ protected: const TQStyleOption& opt = TQStyleOption::Default, const TQWidget *widget = 0 ) const { - return KStyle::sizeFromContents( contents, + return TDEStyle::sizeFromContents( contents, ceData, elementFlags, contentsSize, opt, widget ); } diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index ff7199939..a164821b1 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -53,7 +53,7 @@ Port version 0.9.7 #include <tqpalette.h> #include <tqtabbar.h> #include <tqtoolbutton.h> -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <kdrawutil.h> #include <tqdrawutil.h> #include <tqprogressbar.h> @@ -130,7 +130,7 @@ public: TQStringList keys() const { TQSettings cfg; - KStyleDirs::dirs()->addToSearch( "config", cfg ); + TDEStyleDirs::dirs()->addToSearch( "config", cfg ); TQStringList keys; bool ok; @@ -145,7 +145,7 @@ public: TQStyle* create( const TQString& key ) { TQSettings cfg; - KStyleDirs::dirs()->addToSearch( "config", cfg ); + TDEStyleDirs::dirs()->addToSearch( "config", cfg ); TQString file = cfg.readEntry( "/kthemestyle/" + key + "/file" ); if ( !key.isEmpty() ) @@ -330,7 +330,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQStyleControlElementData &ceData, return checkbox; } } - return KStyle::subRect(sr, ceData, elementFlags, widget); + return TDEStyle::subRect(sr, ceData, elementFlags, widget); } int KThemeStyle::pixelMetric ( PixelMetric metric, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, const TQWidget * widget ) const @@ -515,7 +515,7 @@ bool KThemeStyle::objectEventHandler( const TQStyleControlElementData &ceData, C } } - return KStyle::objectEventHandler(ceData, elementFlags, source, event); + return TDEStyle::objectEventHandler(ceData, elementFlags, source, event); } void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) @@ -569,7 +569,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen { w->setBackgroundMode( TQWidget::NoBackground ); } - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) { w->setBackgroundMode( TQWidget::PaletteBackground ); } @@ -626,7 +626,7 @@ void KThemeStyle::polish( const TQStyleControlElementData &ceData, ControlElemen } } - KStyle::polish( ceData, elementFlags, ptr ); + TDEStyle::polish( ceData, elementFlags, ptr ); } void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr ) @@ -652,7 +652,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem w->setBackgroundMode( TQWidget::PaletteButton ); //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class) - else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) + else if ( w->inherits( "TDEToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) ) w->setBackgroundMode( TQWidget::PaletteButton ); //For scrollbars, we don't do much, since the widget queries the style on the switch @@ -662,7 +662,7 @@ void KThemeStyle::unPolish( const TQStyleControlElementData &ceData, ControlElem w->unsetPalette(); } - KStyle::unPolish( ceData, elementFlags, ptr ); + TDEStyle::unPolish( ceData, elementFlags, ptr ); } @@ -1831,7 +1831,7 @@ void KThemeStyle::drawControlMask( ControlElement element, } -void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, +void KThemeStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, @@ -2004,7 +2004,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, if ( !handled ) { - KThemeBase::drawKStylePrimitive( kpe, p, ceData, elementFlags, + KThemeBase::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget ); } diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h index 457064a56..24f24e1a8 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -72,8 +72,8 @@ public: /** * Constructs a new KThemeStyle object. * - * @param configDir The directory which has the KConfig file. - * @param configFile A KConfig file to use as the theme configuration. + * @param configDir The directory which has the TDEConfig file. + * @param configFile A TDEConfig file to use as the theme configuration. * Defaults to ~/.kderc. */ KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null ); @@ -116,7 +116,7 @@ public: const TQStyleOption& = TQStyleOption::Default, const TQWidget* widget = 0 ) const; - virtual void drawKStylePrimitive( KStylePrimitive kpe, + virtual void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, |