diff options
author | Timothy Pearson <[email protected]> | 2013-02-03 23:01:18 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2013-02-03 23:01:18 -0600 |
commit | aa3abfa2a78cccfcb1f91d808753c79295d618e9 (patch) | |
tree | fe00218b08a670818d7ee67e677d1f6b5ded6eed /kstyles/kthemestyle | |
parent | e92a4e05c504978308b2dd83082d2727b74bea8f (diff) | |
download | tdelibs-aa3abfa2a78cccfcb1f91d808753c79295d618e9.tar.gz tdelibs-aa3abfa2a78cccfcb1f91d808753c79295d618e9.zip |
Rename KStyle to TDEStyle to avoid conflicts with KDE4
Diffstat (limited to 'kstyles/kthemestyle')
-rw-r--r-- | kstyles/kthemestyle/kstyledirs.cpp | 8 | ||||
-rw-r--r-- | kstyles/kthemestyle/kstyledirs.h | 18 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemebase.cpp | 10 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemebase.h | 20 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemestyle.cpp | 16 | ||||
-rw-r--r-- | kstyles/kthemestyle/kthemestyle.h | 2 |
6 files changed, 37 insertions, 37 deletions
diff --git a/kstyles/kthemestyle/kstyledirs.cpp b/kstyles/kthemestyle/kstyledirs.cpp index 0128dac28..8755fb294 100644 --- a/kstyles/kthemestyle/kstyledirs.cpp +++ b/kstyles/kthemestyle/kstyledirs.cpp @@ -25,19 +25,19 @@ #include <kstandarddirs.h> #include "kstyledirs.h" -KStyleDirs* KStyleDirs::instance = 0; +TDEStyleDirs* TDEStyleDirs::instance = 0; -KStyleDirs::KStyleDirs() +TDEStyleDirs::TDEStyleDirs() { 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 79887cce1..410fad2ef 100644 --- a/kstyles/kthemestyle/kstyledirs.h +++ b/kstyles/kthemestyle/kstyledirs.h @@ -39,13 +39,13 @@ * It add share/apps/kstyle/themes as "themerc", * share/apps/kstyle/pixmaps "themepixmap" */ -class KStyleDirs: public TDEStandardDirs +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 7ca3ffb06..adbf49084 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -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 e9ea55d5b..faef98dfd 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -211,7 +211,7 @@ class KThemeBasePrivate; * * @author Daniel M. Duley <[email protected]> */ -class KThemeBase: public KStyle +class KThemeBase: public TDEStyle { Q_OBJECT public: @@ -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 7d2c72c2a..4cc374e5d 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -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 ) @@ -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 ) @@ -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 c978601a8..24f24e1a8 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -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, |