diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 8b2aa1b5301ab60368a03e36df4ff5216726e87d (patch) | |
tree | 36163d4ee667c23b5cf232df2f3004cd0a76202a /kscreensaver/kdesavers/banner.h | |
download | tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.tar.gz tdeartwork-8b2aa1b5301ab60368a03e36df4ff5216726e87d.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kscreensaver/kdesavers/banner.h')
-rw-r--r-- | kscreensaver/kdesavers/banner.h | 112 |
1 files changed, 112 insertions, 0 deletions
diff --git a/kscreensaver/kdesavers/banner.h b/kscreensaver/kdesavers/banner.h new file mode 100644 index 00000000..026b817d --- /dev/null +++ b/kscreensaver/kdesavers/banner.h @@ -0,0 +1,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 + |