00001 /*************************************************************************** 00002 * Copyright Brian Ledbetter 2001-2003 <brian@shadowcom.net> * 00003 * Copyright Ravikiran Rajagopal 2003 * 00004 * ravi@ee.eng.ohio-state.edu * 00005 * * 00006 * This program is free software; you can redistribute it and/or modify * 00007 * it under the terms of the GNU General Public License (version 2) as * 00008 * published by the Free Software Foundation. (The original KSplash/ML * 00009 * codebase (upto version 0.95.3) is BSD-licensed.) * 00010 * * 00011 ***************************************************************************/ 00012 00013 #ifndef __THEMESTANDARD_H__ 00014 #define __THEMESTANDARD_H__ 00015 00016 #include <themeengine.h> 00017 00018 #include "wndicon.h" 00019 #include "wndstatus.h" 00020 00021 /* 00022 * Special Note: The "Standard" engine is treated a little bit differently than 00023 * the other ThemeEngines in this program. Because we don't ever want to end up 00024 * in a situation in which there is _no_ user interface, this ThemeEngine will 00025 * be statically linked in with the ksplash binary itself, so that no dynamic 00026 * loading is necessary to access it. The disadvantage that this presents is 00027 * immediately obvious: The control center module is no longer able to dynamically 00028 * load a configuration object for this theme, since this engine doesn't reside in 00029 * a shared-object library like the other ones do. Therefore, we will have to 00030 * implement the ThemeEngineConfig object for this engine in the kcmksplash 00031 * subsystem, in such a manner that it is statically linked in with the control 00032 * panel. I know, this is really nasty, but I would rather have slightly uglier 00033 * code, so long as it makes the End User Experience of this program somewhat more 00034 * predictable (i.e., even if we can't do exactly what the user wants, we can still 00035 * do _something_...) 00036 * 00037 * Therefore, you will find the CfgStandard class in the ../kcmksplash/ directory. 00038 */ 00039 00043 class ThemeStandard: public ThemeEngine 00044 { 00045 Q_OBJECT 00046 public: 00047 ThemeStandard( TQWidget *, const char*, const TQStringList& ); 00048 //inline const ThemeEngineConfig *config( TQWidget *p, KConfig *kc ) { return 0L; } 00049 00050 public slots: 00051 inline void slotUpdateProgress( int i ) 00052 { 00053 if( mStatus ) mStatus->slotUpdateProgress( i ); 00054 } 00055 inline void slotUpdateSteps( int i ) 00056 { 00057 if( mStatus ) mStatus->slotUpdateSteps( i ); 00058 } 00059 inline void slotSetText( const TQString& s ) 00060 { 00061 if( mStatus ) mStatus->slotSetMessage( s ); 00062 } 00063 void slotSetPixmap( const TQString& ); 00064 00065 private: 00066 void showEvent( TQShowEvent * ); 00067 void _readSettings(); 00068 void _initUi(); 00069 00070 WndStatus *mStatus; 00071 WndIcon *mIcon, *mPrevIcon; 00072 int mIconCount; 00073 int mStatusBarHeight; 00074 int mStdIconWidth; 00075 00076 WndIcon::Position mIconPos; 00077 bool mSbAtTop; 00078 bool mSbVisible; 00079 bool mSbPbVisible; 00080 TQString mSbFontName; 00081 int mSbFontSz; 00082 bool mSbFontBold; 00083 bool mSbFontItalic; 00084 TQFont mSbFont; 00085 TQColor mSbFg; 00086 TQColor mSbBg; 00087 TQString mSbIcon; 00088 bool mIconsVisible; 00089 bool mIconsJumping; 00090 TQString mSplashScreen; 00091 }; 00092 00093 #endif
1.6.1