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 | bcb704366cb5e333a626c18c308c7e0448a8e69f (patch) | |
tree | f0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /ksirc/KSTicker/ksticker.h | |
download | tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.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/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksirc/KSTicker/ksticker.h')
-rw-r--r-- | ksirc/KSTicker/ksticker.h | 106 |
1 files changed, 106 insertions, 0 deletions
diff --git a/ksirc/KSTicker/ksticker.h b/ksirc/KSTicker/ksticker.h new file mode 100644 index 00000000..d11d8a0f --- /dev/null +++ b/ksirc/KSTicker/ksticker.h @@ -0,0 +1,106 @@ +#ifndef KSTICKER_H +#define KSTICKER_H + +#include <qobject.h> +#include <qframe.h> +#include <qstring.h> +#include <qptrlist.h> +#include <qpopupmenu.h> + +class SInfo { +public: + int length; +}; + +class KSTicker : public QFrame +{ + Q_OBJECT + +public: + KSTicker(QWidget * parent=0, const char * name=0, WFlags f=0); + virtual ~KSTicker(); + + void setString(QString); + void mergeString(QString); + void mergeString(QString, QColor); + + virtual void show(); + virtual void hide(); + + void speed(int *, int *); + + virtual void setBackgroundColor ( const QColor & ); + virtual void setPalette ( const QPalette & p ); + +signals: + void doubleClick(); + void closing(); + +public slots: + virtual void setSpeed(int, int); + +protected slots: + virtual void fontSelector(); + virtual void scrollRate(); + virtual void updateFont(const QFont &font); + virtual void scrollConstantly(); + +protected: + virtual void timerEvent ( QTimerEvent * ); + virtual void paintEvent ( QPaintEvent * ); + virtual void resizeEvent( QResizeEvent * ); + virtual void closeEvent( QCloseEvent * ); + virtual void mouseDoubleClickEvent( QMouseEvent * ); + virtual void mousePressEvent ( QMouseEvent * ); + virtual void iconify(); + + +private: + + QString stripCols(QString); + + QStringList strlist; /* everything left to parse */ + QStringList strbuffer; /* fifo of the last 10 lines to scroll in scroll constantly mode */ + QStringList tipbuffer; /* 5 lines for the tooltip */ + QString currentStr; /* the string we are currently parsing */ + + QFont ourFont; + + int onechar; + int chars; + int descent; + + int tickStep; + int cOffset; + + int tickRate; + + int pHeight; + + int currentChar; + + void startTicker(); + void stopTicker(); + + bool bScrollConstantly; + int iScrollItem; + bool bAtEnd; + + QPixmap *pic; + + QPopupMenu *popup; + + /* + * Drawing settings and variables + */ + bool bold; + bool underline; + bool italics; + QColor defbg; + QColor deffg; + QColor bg; + QColor fg; +}; + +#endif // KSTICKER_H + |