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
Diffstat (limited to 'noncore/net/opieirc/ircmisc.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircmisc.h | 50 |
1 files changed, 39 insertions, 11 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,24 +21,52 @@ | |||
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 { |
28 | public: | 33 | Q_OBJECT |
29 | IRCColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); | 34 | public: |
30 | QColor color(); | 35 | IRCColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); |
31 | void mousePressEvent(QMouseEvent *event); | 36 | QColor color(); |
32 | protected: | 37 | void mousePressEvent(QMouseEvent *event); |
33 | QColor m_color; | 38 | protected: |
39 | QColor m_color; | ||
34 | }; | 40 | }; |
35 | 41 | ||
36 | class IRCFramedColorLabel : public QWidget { | 42 | class IRCFramedColorLabel : public QWidget { |
37 | public: | 43 | Q_OBJECT |
38 | IRCFramedColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); | 44 | public: |
39 | QColor color(); | 45 | IRCFramedColorLabel(QColor color, QWidget *parent = 0, const char *name = 0, WFlags f = 0); |
40 | protected: | 46 | QColor color(); |
41 | IRCColorLabel *m_label; | 47 | protected: |
48 | IRCColorLabel *m_label; | ||
49 | }; | ||
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; | ||
42 | }; | 70 | }; |
43 | 71 | ||
44 | #endif /* __IRCMISC_H */ | 72 | #endif /* __IRCMISC_H */ |