Qt3to4
[kdeartwork.git] / kscreensaver / kdesavers / banner.h
blobbdffad58662f9f75b3bf38251c0b780e8195c732
1 //-----------------------------------------------------------------------------
2 //
3 // kbanner - Basic screen saver for KDE
4 //
5 // Copyright (c) Martin R. Jones 1996
6 //
8 #ifndef __BANNER_H__
9 #define __BANNER_H__
11 #include <qtimer.h>
12 //Added by qt3to4:
13 #include <QPixmap>
14 #include <Q3ValueList>
16 #include <kscreensaver.h>
17 #include <kdialogbase.h>
19 #define SATURATION 150
20 #define VALUE 255
22 class QLineEdit;
23 class KColorButton;
24 class KRandomSequence;
26 class KBannerSaver : public KScreenSaver
28 Q_OBJECT
29 public:
30 KBannerSaver( WId id );
31 virtual ~KBannerSaver();
33 void setSpeed( int spd );
34 void setFont( const QString &family, int size, const QColor &color,
35 bool b, bool i );
36 void setMessage( const QString &msg );
37 void setTimeDisplay();
38 void setCyclingColor(bool on);
39 void setColor( QColor &color);
41 private:
42 void readSettings();
43 void initialize();
45 protected slots:
46 void slotTimeout();
48 protected:
49 QFont font;
50 QTimer timer;
51 QString fontFamily;
52 int fontSize;
53 bool bold;
54 bool italic;
55 QColor fontColor;
56 bool cyclingColor;
57 int currentHue;
58 bool needUpdate;
59 bool needBlank;
60 QString message;
61 bool showTime;
62 int xpos, ypos, step, fsize;
63 KRandomSequence *krnd;
64 int speed;
65 int colorContext;
66 QPixmap pixmap;
67 QSize pixmapSize;
71 class KBannerSetup : public KDialogBase
73 Q_OBJECT
74 public:
75 KBannerSetup( QWidget *parent = NULL, const char *name = NULL );
77 protected:
78 void readSettings();
79 void fillFontSizes();
81 private slots:
82 void slotFamily( const QString & );
83 void slotSize( int );
84 void slotSizeEdit(const QString &);
85 void slotColor(const QColor &);
86 void slotCyclingColor(bool on);
87 void slotBold( bool );
88 void slotItalic( bool );
89 void slotSpeed( int );
90 void slotMessage( const QString & );
91 void slotOk();
92 void slotHelp();
93 void slotTimeToggled(bool on);
95 private:
96 QWidget *preview;
97 KColorButton *colorPush;
98 KBannerSaver *saver;
99 QLineEdit *ed;
100 QComboBox* comboSizes;
102 QString message;
103 bool showTime;
104 QString fontFamily;
105 int fontSize;
106 QColor fontColor;
107 bool cyclingColor;
108 bool bold;
109 bool italic;
110 int speed;
111 Q3ValueList<int> sizes;
114 #endif