summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircmisc.cpp
authorwazlaf <wazlaf>2002-09-23 22:12:39 (UTC)
committer wazlaf <wazlaf>2002-09-23 22:12:39 (UTC)
commit074769a4adb816153e47d63087e9e326bd3a04bf (patch) (unidiff)
treecc69651d9e9e5901696a55d9523e343125780705 /noncore/net/opieirc/ircmisc.cpp
parente0b04701b3c9182ba22f56e329f98c57af4e1fe2 (diff)
downloadopie-074769a4adb816153e47d63087e9e326bd3a04bf.zip
opie-074769a4adb816153e47d63087e9e326bd3a04bf.tar.gz
opie-074769a4adb816153e47d63087e9e326bd3a04bf.tar.bz2
configuration dialog + color configurability throughout the program + popup menu on the channel person list
Diffstat (limited to 'noncore/net/opieirc/ircmisc.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircmisc.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircmisc.cpp b/noncore/net/opieirc/ircmisc.cpp
new file mode 100644
index 0000000..f41a89a
--- a/dev/null
+++ b/noncore/net/opieirc/ircmisc.cpp
@@ -0,0 +1,31 @@
1#include <opie/colordialog.h>
2#include <qlayout.h>
3#include "ircmisc.h"
4
5IRCColorLabel::IRCColorLabel(QColor color, QWidget *parent, const char *name, WFlags f) : QLabel(parent, name, f) {
6 m_color = color;
7 setAlignment(AlignVCenter | AlignCenter);
8 setFrameStyle(QFrame::StyledPanel);
9 setFrameShadow(QFrame::Sunken);
10 setBackgroundColor(m_color);
11}
12
13void IRCColorLabel::mousePressEvent(QMouseEvent *) {
14 m_color = OColorDialog::getColor(m_color);
15 setBackgroundColor(m_color);
16}
17
18QColor IRCColorLabel::color() {
19 return m_color;
20}
21
22IRCFramedColorLabel::IRCFramedColorLabel(QColor color, QWidget *parent, const char *name, WFlags f) : QWidget(parent, name, f) {
23 QVBoxLayout *layout = new QVBoxLayout(this, 10, 0);
24 m_label = new IRCColorLabel(color, this);
25 layout->addWidget(m_label);
26}
27
28QColor IRCFramedColorLabel::color() {
29 return m_label->color();
30}
31