summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircmisc.h
Unidiff
Diffstat (limited to 'noncore/net/opieirc/ircmisc.h') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmisc.h28
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
27class IRCColorLabel : public QLabel { 32class 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
36class IRCFramedColorLabel : public QWidget { 42class 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
53class IRCTabWidget : public QTabWidget {
54 Q_OBJECT
55public:
56 IRCTabWidget(QWidget *parent = 0, const char *name = 0);
57 void setTabColor(int index, const QColor *color);
58};
59
60class IRCTabBar : public QTabBar {
61 Q_OBJECT
62public:
63 IRCTabBar(QWidget *parent = 0, const char *name = 0);
64 void setTabColor(int index, const QColor *color);
65protected:
66 void paintLabel(QPainter*, const QRect&, QTab*, bool) const;
67 int insertTab(QTab *, int index = -1);
68protected:
69 QVector<QColor> m_colors;
70};
71
44#endif /* __IRCMISC_H */ 72#endif /* __IRCMISC_H */