blob: 026b817ded846215abed21f75ce0fde3cd477470 (
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
105
106
107
108
109
110
111
112
|
//-----------------------------------------------------------------------------
//
// kbanner - Basic screen saver for KDE
//
// Copyright (c) Martin R. Jones 1996
//
#ifndef __BANNER_H__
#define __BANNER_H__
#include <qtimer.h>
#include <kscreensaver.h>
#include <kdialogbase.h>
#define SATURATION 150
#define VALUE 255
class QLineEdit;
class KColorButton;
class KRandomSequence;
class KBannerSaver : public KScreenSaver
{
Q_OBJECT
public:
KBannerSaver( WId id );
virtual ~KBannerSaver();
void setSpeed( int spd );
void setFont( const QString &family, int size, const QColor &color,
bool b, bool i );
void setMessage( const QString &msg );
void setTimeDisplay();
void setCyclingColor(bool on);
void setColor( QColor &color);
private:
void readSettings();
void initialize();
protected slots:
void slotTimeout();
protected:
QFont font;
QTimer timer;
QString fontFamily;
int fontSize;
bool bold;
bool italic;
QColor fontColor;
bool cyclingColor;
int currentHue;
bool needUpdate;
bool needBlank;
QString message;
bool showTime;
int xpos, ypos, step, fsize;
KRandomSequence *krnd;
int speed;
int colorContext;
QPixmap pixmap;
QSize pixmapSize;
};
class KBannerSetup : public KDialogBase
{
Q_OBJECT
public:
KBannerSetup( QWidget *parent = NULL, const char *name = NULL );
protected:
void readSettings();
void fillFontSizes();
private slots:
void slotFamily( const QString & );
void slotSize( int );
void slotSizeEdit(const QString &);
void slotColor(const QColor &);
void slotCyclingColor(bool on);
void slotBold( bool );
void slotItalic( bool );
void slotSpeed( int );
void slotMessage( const QString & );
void slotOk();
void slotHelp();
void slotTimeToggled(bool on);
private:
QWidget *preview;
KColorButton *colorPush;
KBannerSaver *saver;
QLineEdit *ed;
QComboBox* comboSizes;
QString message;
bool showTime;
QString fontFamily;
int fontSize;
QColor fontColor;
bool cyclingColor;
bool bold;
bool italic;
int speed;
QValueList<int> sizes;
};
#endif
|