diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /ksplashml/themeengine/standard/themestandard.h | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksplashml/themeengine/standard/themestandard.h')
-rw-r--r-- | ksplashml/themeengine/standard/themestandard.h | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/ksplashml/themeengine/standard/themestandard.h b/ksplashml/themeengine/standard/themestandard.h new file mode 100644 index 000000000..a24f668db --- /dev/null +++ b/ksplashml/themeengine/standard/themestandard.h @@ -0,0 +1,93 @@ +/*************************************************************************** + * Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> * + * Copyright Ravikiran Rajagopal 2003 * + * ravi@ee.eng.ohio-state.edu * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License (version 2) as * + * published by the Free Software Foundation. (The original KSplash/ML * + * codebase (upto version 0.95.3) is BSD-licensed.) * + * * + ***************************************************************************/ + +#ifndef __THEMESTANDARD_H__ +#define __THEMESTANDARD_H__ + +#include <themeengine.h> + +#include "wndicon.h" +#include "wndstatus.h" + +/* + * Special Note: The "Standard" engine is treated a little bit differently than + * the other ThemeEngines in this program. Because we don't ever want to end up + * in a situation in which there is _no_ user interface, this ThemeEngine will + * be statically linked in with the ksplash binary itself, so that no dynamic + * loading is necessary to access it. The disadvantage that this presents is + * immediately obvious: The control center module is no longer able to dynamically + * load a configuration object for this theme, since this engine doesn't reside in + * a shared-object library like the other ones do. Therefore, we will have to + * implement the ThemeEngineConfig object for this engine in the kcmksplash + * subsystem, in such a manner that it is statically linked in with the control + * panel. I know, this is really nasty, but I would rather have slightly uglier + * code, so long as it makes the End User Experience of this program somewhat more + * predictable (i.e., even if we can't do exactly what the user wants, we can still + * do _something_...) + * + * Therefore, you will find the CfgStandard class in the ../kcmksplash/ directory. + */ + +/** + * @short The default KSplash splash screen. + */ +class ThemeStandard: public ThemeEngine +{ + Q_OBJECT +public: + ThemeStandard( QWidget *, const char*, const QStringList& ); + //inline const ThemeEngineConfig *config( QWidget *p, KConfig *kc ) { return 0L; } + +public slots: + inline void slotUpdateProgress( int i ) + { + if( mStatus ) mStatus->slotUpdateProgress( i ); + } + inline void slotUpdateSteps( int i ) + { + if( mStatus ) mStatus->slotUpdateSteps( i ); + } + inline void slotSetText( const QString& s ) + { + if( mStatus ) mStatus->slotSetMessage( s ); + } + void slotSetPixmap( const QString& ); + +private: + void showEvent( QShowEvent * ); + void _readSettings(); + void _initUi(); + + WndStatus *mStatus; + WndIcon *mIcon, *mPrevIcon; + int mIconCount; + int mStatusBarHeight; + int mStdIconWidth; + + WndIcon::Position mIconPos; + bool mSbAtTop; + bool mSbVisible; + bool mSbPbVisible; + QString mSbFontName; + int mSbFontSz; + bool mSbFontBold; + bool mSbFontItalic; + QFont mSbFont; + QColor mSbFg; + QColor mSbBg; + QString mSbIcon; + bool mIconsVisible; + bool mIconsJumping; + QString mSplashScreen; +}; + +#endif |