1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
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( TQWidget *, const char*, const TQStringList& );
//inline const ThemeEngineConfig *config( TQWidget *p, KConfig *kc ) { return 0L; }
public slots:
inline void slotUpdateProgress( int i )
{
if( mtqStatus ) mtqStatus->slotUpdateProgress( i );
}
inline void slotUpdateSteps( int i )
{
if( mtqStatus ) mtqStatus->slotUpdateSteps( i );
}
inline void slotSetText( const TQString& s )
{
if( mtqStatus ) mtqStatus->slotSetMessage( s );
}
void slotSetPixmap( const TQString& );
private:
void showEvent( TQShowEvent * );
void _readSettings();
void _initUi();
WndtqStatus *mtqStatus;
WndIcon *mIcon, *mPrevIcon;
int mIconCount;
int mStatusBarHeight;
int mStdIconWidth;
WndIcon::Position mIconPos;
bool mSbAtTop;
bool mSbVisible;
bool mSbPbVisible;
TQString mSbFontName;
int mSbFontSz;
bool mSbFontBold;
bool mSbFontItalic;
TQFont mSbFont;
TQColor mSbFg;
TQColor mSbBg;
TQString mSbIcon;
bool mIconsVisible;
bool mIconsJumping;
TQString mSplashScreen;
};
#endif
|