00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef __WNDMAIN_H__
00013 #define __WNDMAIN_H__
00014
00015 #include <kapplication.h>
00016
00017 #include <tqptrlist.h>
00018 #include <tqstring.h>
00019 #include <tqobject.h>
00020
00021 #include "ksplashiface.h"
00022
00023
00024 #define N_ACTIONITEMS 8
00025
00026
00027
00028 typedef struct
00029 {
00030 TQString ItemPixmap;
00031 TQString ItemText;
00032 } Action;
00033
00034 class WndStatus;
00035 class ObjKsTheme;
00036 class ThemeEngine;
00037 class KConfig;
00038
00039 class KSplash: public TQWidget, virtual public KSplashIface
00040 {
00041 Q_OBJECT
00042
00043 public:
00044 KSplash(const char *name = "ksplash");
00045 ~KSplash();
00046
00047 TQPtrList<Action> actionList();
00048
00049
00050 ASYNC upAndRunning( TQString );
00051 ASYNC setMaxProgress(int);
00052 ASYNC setProgress(int);
00053 ASYNC setStartupItemCount( int count );
00054 ASYNC programStarted( TQString programIcon, TQString programName, TQString description );
00055 ASYNC startupComplete();
00056 ASYNC close();
00057 ASYNC hide();
00058 ASYNC show();
00059
00060 signals:
00061 void stepsChanged(int);
00062 void progressChanged(int);
00063 void actionListChanged();
00064
00065 protected:
00066 bool eventFilter( TQObject *o, TQEvent *e );
00067
00068 public slots:
00069 void slotUpdateSteps( int );
00070 void slotUpdateProgress( int );
00071
00072 private slots:
00073 void initDcop();
00074 void prepareIconList();
00075 void prepareSplashScreen();
00076 void slotExec();
00077 void nextIcon();
00078 void slotInsertAction( const TQString&, const TQString& );
00079 void slotReadProperties( KConfig * );
00080
00081 void slotSetText( const TQString& );
00082 void slotSetPixmap( const TQString& );
00083
00084 void loadTheme( const TQString& );
00085
00086 private:
00087 ThemeEngine *_loadThemeEngine( const TQString& pluginName, const TQString& theme );
00088 void updateState( unsigned int state );
00089
00090 protected:
00091 unsigned int mState;
00092 unsigned int mMaxProgress;
00093 unsigned int mStep;
00094 TQTimer* close_timer;
00095
00096 bool mSessMgrCalled;
00097 bool mTimeToGo;
00098
00099 TQString mTheme;
00100 ObjKsTheme *mKsTheme;
00101
00102 ThemeEngine *mThemeEngine;
00103 TQPtrList<Action> mActionList;
00104 Action *mCurrentAction, *mPreviousAction;
00105
00106 TQString mThemeLibName;
00107 };
00108
00109 #endif