blob: 69bef6b43d8327ba8297d4a4976b844c54a1c5e3 (
plain)
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
94
95
96
97
98
99
100
101
102
103
104
|
/***************************************************************************
* 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 __PREVIEWREDMOND_H__
#define __PREVIEWREDMOND_H__
#include <kiconloader.h>
#include <tqcolor.h>
#include <tqfont.h>
#include <tqwidget.h>
/*
* class PreviewRedmond: Provides a sneak peek at how certain Redmond
* settings will look. This will not be able to render any background
* images, so we'll just use a nice shade of gray or black as the
* background...
*/
class PreviewRedmond: public QWidget
{
Q_OBJECT
public:
PreviewRedmond( TQWidget* );
inline void setWelcomeString( const TQString& s )
{
m_welcomeString = s;
_updateCache();
}
inline void setUserString( const TQString& s )
{
m_userString = s;
_updateCache();
}
inline void setWelcomeFont( const TQFont& f )
{
m_welcomeFont = f;
_updateCache();
}
inline void setUserFont( const TQFont& f )
{
m_userFont = f;
_updateCache();
}
inline void setStatusFont( const TQFont& f )
{
m_statusFont = f;
_updateCache();
}
inline void setWelcomeColor( const TQColor& c )
{
m_welcomeColor = c;
_updateCache();
}
inline void setWelcomeShadowColor( const TQColor& c )
{
m_welcomeShadowColor = c;
_updateCache();
}
inline void setUserColor( const TQColor& c )
{
m_userColor = c;
_updateCache();
}
inline void setStatusColor( const TQColor& c )
{
m_statusColor = c;
_updateCache();
}
inline void setIcon( const TQString& s )
{
m_icon = DesktopIcon( s );
_updateCache();
}
protected:
void _updateCache();
void paintEvent( TQPaintEvent* );
void resizeEvent( TQResizeEvent* );
TQPixmap m_cache;
TQString m_welcomeString, m_userString;
TQFont m_welcomeFont, m_userFont, m_statusFont;
TQColor m_welcomeColor, m_welcomeShadowColor, m_userColor, m_statusColor;
TQPixmap m_icon;
bool m_showWelcomeString, m_showUserString, m_showUserIcon, m_showStatusString;
};
#endif
|