author | wazlaf <wazlaf> | 2002-09-30 08:07:05 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-09-30 08:07:05 (UTC) |
commit | a999acbcd1b8bc1715f2ad2dda6acedf423b89ea (patch) (unidiff) | |
tree | 898d433efa8ff3b25a5d10ab4dc4a0a9bc415104 /noncore/net/opieirc/ircmisc.h | |
parent | 75dccdfe90324e9ff2426930ae185c3a6bdab734 (diff) | |
download | opie-a999acbcd1b8bc1715f2ad2dda6acedf423b89ea.zip opie-a999acbcd1b8bc1715f2ad2dda6acedf423b89ea.tar.gz opie-a999acbcd1b8bc1715f2ad2dda6acedf423b89ea.tar.bz2 |
tabs now change their color when actions occur
-rw-r--r-- | noncore/net/opieirc/ircmisc.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmisc.h b/noncore/net/opieirc/ircmisc.h index 1ea04c8..4df6ce0 100644 --- a/noncore/net/opieirc/ircmisc.h +++ b/noncore/net/opieirc/ircmisc.h | |||
@@ -21,10 +21,16 @@ | |||
21 | #ifndef __IRCMISC_H | 21 | #ifndef __IRCMISC_H |
22 | #define __IRCMISC_H | 22 | #define __IRCMISC_H |
23 | 23 | ||
24 | #include <qtabwidget.h> | ||
25 | #include <qtabbar.h> | ||
24 | #include <qlabel.h> | 26 | #include <qlabel.h> |
25 | #include <qcolor.h> | 27 | #include <qcolor.h> |
28 | #include <qvector.h> | ||
29 | |||
30 | /* IRCFramedColorLabel is used to display a color */ | ||
26 | 31 | ||
27 | class IRCColorLabel : public QLabel { | 32 | class IRCColorLabel : public QLabel { |
33 | Q_OBJECT | ||
28 | public: | 34 | public: |
29 | IRCColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); | 35 | IRCColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); |
30 | QColor color(); | 36 | QColor color(); |
@@ -34,6 +40,7 @@ class IRCColorLabel : public QLabel { | |||
34 | }; | 40 | }; |
35 | 41 | ||
36 | class IRCFramedColorLabel : public QWidget { | 42 | class IRCFramedColorLabel : public QWidget { |
43 | Q_OBJECT | ||
37 | public: | 44 | public: |
38 | IRCFramedColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); | 45 | IRCFramedColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); |
39 | QColor color(); | 46 | QColor color(); |
@@ -41,4 +48,25 @@ class IRCFramedColorLabel : public QWidget { | |||
41 | IRCColorLabel *m_label; | 48 | IRCColorLabel *m_label; |
42 | }; | 49 | }; |
43 | 50 | ||
51 | /* Custom colored QTabWidget */ | ||
52 | |||
53 | class IRCTabWidget : public QTabWidget { | ||
54 | Q_OBJECT | ||
55 | public: | ||
56 | IRCTabWidget(QWidget *parent = 0, const char *name = 0); | ||
57 | void setTabColor(int index, const QColor *color); | ||
58 | }; | ||
59 | |||
60 | class IRCTabBar : public QTabBar { | ||
61 | Q_OBJECT | ||
62 | public: | ||
63 | IRCTabBar(QWidget *parent = 0, const char *name = 0); | ||
64 | void setTabColor(int index, const QColor *color); | ||
65 | protected: | ||
66 | void paintLabel(QPainter*, const QRect&, QTab*, bool) const; | ||
67 | int insertTab(QTab *, int index = -1); | ||
68 | protected: | ||
69 | QVector<QColor> m_colors; | ||
70 | }; | ||
71 | |||
44 | #endif /* __IRCMISC_H */ | 72 | #endif /* __IRCMISC_H */ |