Diffstat (limited to 'noncore/net/opieirc/ircsettings.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircsettings.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp index 1903e87..78eaed3 100644 --- a/noncore/net/opieirc/ircsettings.cpp +++ b/noncore/net/opieirc/ircsettings.cpp | |||
@@ -1,26 +1,28 @@ | |||
1 | #include <qlayout.h> | 1 | #include <qlayout.h> |
2 | #include <qvalidator.h> | 2 | #include <qvalidator.h> |
3 | #include <qscrollview.h> | 3 | #include <qscrollview.h> |
4 | #include <qwhatsthis.h> | ||
4 | #include "ircsettings.h" | 5 | #include "ircsettings.h" |
5 | #include "irctab.h" | 6 | #include "irctab.h" |
6 | #include "ircmisc.h" | 7 | #include "ircmisc.h" |
7 | 8 | ||
8 | IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f) : QDialog(parent, name, modal, f) { | 9 | IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) { |
9 | setCaption("Settings"); | 10 | setCaption("Settings"); |
10 | m_config = new Config("OpieIRC"); | 11 | m_config = new Config("OpieIRC"); |
11 | m_config->setGroup("OpieIRC"); | 12 | m_config->setGroup("OpieIRC"); |
12 | QHBoxLayout *l = new QHBoxLayout(this, 2, 2); | 13 | QHBoxLayout *l = new QHBoxLayout(this, 2, 2); |
13 | QTabWidget *tw = new QTabWidget(this); | 14 | QTabWidget *tw = new QTabWidget(this); |
14 | l->addWidget(tw); | 15 | l->addWidget(tw); |
15 | /* General Configuration */ | 16 | /* General Configuration */ |
16 | QWidget *widget = new QWidget(tw); | 17 | QWidget *widget = new QWidget(tw); |
17 | QGridLayout *layout = new QGridLayout(widget, 1, 2, 5, 0); | 18 | QGridLayout *layout = new QGridLayout(widget, 1, 2, 5, 0); |
18 | QLabel *label = new QLabel(tr("Lines displayed :"), widget); | 19 | QLabel *label = new QLabel(tr("Lines displayed :"), widget); |
19 | layout->addWidget(label, 0, 0); | 20 | layout->addWidget(label, 0, 0); |
20 | m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget); | 21 | m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), widget); |
22 | QWhatsThis::add(m_lines, tr("Amount of lines to be displayed in chats before old lines get deleted - this is necessary to restrain memory consumption. Set to 0 if you don't need this")); | ||
21 | QIntValidator *validator = new QIntValidator(this); | 23 | QIntValidator *validator = new QIntValidator(this); |
22 | validator->setTop(10000); | 24 | validator->setTop(10000); |
23 | validator->setBottom(0); | 25 | validator->setBottom(0); |
24 | m_lines->setValidator(validator); | 26 | m_lines->setValidator(validator); |
25 | layout->addWidget(m_lines, 0, 1); | 27 | layout->addWidget(m_lines, 0, 1); |
26 | tw->addTab(widget, tr("General")); | 28 | tw->addTab(widget, tr("General")); |
@@ -31,36 +33,43 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags f | |||
31 | widget = new QWidget(view->viewport()); | 33 | widget = new QWidget(view->viewport()); |
32 | view->addChild(widget); | 34 | view->addChild(widget); |
33 | layout = new QGridLayout(widget, 7, 2, 5, 0); | 35 | layout = new QGridLayout(widget, 7, 2, 5, 0); |
34 | label = new QLabel(tr("Background color :"), widget); | 36 | label = new QLabel(tr("Background color :"), widget); |
35 | layout->addWidget(label, 0, 0); | 37 | layout->addWidget(label, 0, 0); |
36 | m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget); | 38 | m_background = new IRCFramedColorLabel(QColor(m_config->readEntry("BackgroundColor", "#FFFFFF")), widget); |
39 | QWhatsThis::add(m_background, tr("Background color to be used in chats")); | ||
37 | layout->addWidget(m_background, 0, 1); | 40 | layout->addWidget(m_background, 0, 1); |
38 | label = new QLabel(tr("Normal text color :"), widget); | 41 | label = new QLabel(tr("Normal text color :"), widget); |
39 | layout->addWidget(label, 1, 0); | 42 | layout->addWidget(label, 1, 0); |
40 | m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget); | 43 | m_text = new IRCFramedColorLabel(m_config->readEntry("TextColor", "#000000"), widget); |
44 | QWhatsThis::add(m_text, tr("Text color to be used in chats")); | ||
41 | layout->addWidget(m_text, 1, 1); | 45 | layout->addWidget(m_text, 1, 1); |
42 | label = new QLabel(tr("Error color :"), widget); | 46 | label = new QLabel(tr("Error color :"), widget); |
43 | layout->addWidget(label, 2, 0); | 47 | layout->addWidget(label, 2, 0); |
44 | m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget); | 48 | m_error = new IRCFramedColorLabel(m_config->readEntry("ErrorColor", "#FF0000"), widget); |
49 | QWhatsThis::add(m_error, tr("Text color to be used to display errors")); | ||
45 | layout->addWidget(m_error, 2, 1); | 50 | layout->addWidget(m_error, 2, 1); |
46 | label = new QLabel(tr("Text written by yourself :"), widget); | 51 | label = new QLabel(tr("Text written by yourself :"), widget); |
47 | layout->addWidget(label, 3, 0); | 52 | layout->addWidget(label, 3, 0); |
48 | m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget); | 53 | m_self = new IRCFramedColorLabel(m_config->readEntry("SelfColor", "#CC0000"), widget); |
54 | QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself")); | ||
49 | layout->addWidget(m_self, 3, 1); | 55 | layout->addWidget(m_self, 3, 1); |
50 | label = new QLabel(tr("Text written by others :"), widget); | 56 | label = new QLabel(tr("Text written by others :"), widget); |
51 | layout->addWidget(label, 4, 0); | 57 | layout->addWidget(label, 4, 0); |
52 | m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget); | 58 | m_other = new IRCFramedColorLabel(m_config->readEntry("OtherColor", "#0000BB"), widget); |
59 | QWhatsThis::add(m_other, tr("Text color to be used to identify text written by others")); | ||
53 | layout->addWidget(m_other, 4, 1); | 60 | layout->addWidget(m_other, 4, 1); |
54 | label = new QLabel(tr("Text written by the server :"), widget); | 61 | label = new QLabel(tr("Text written by the server :"), widget); |
55 | layout->addWidget(label, 5, 0); | 62 | layout->addWidget(label, 5, 0); |
56 | m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget); | 63 | m_server = new IRCFramedColorLabel(m_config->readEntry("ServerColor", "#0000FF"), widget); |
64 | QWhatsThis::add(m_server, tr("Text color to be used to identify text written by the server")); | ||
57 | layout->addWidget(m_server, 5, 1); | 65 | layout->addWidget(m_server, 5, 1); |
58 | label = new QLabel(tr("Notifications :"), widget); | 66 | label = new QLabel(tr("Notifications :"), widget); |
59 | layout->addWidget(label, 6, 0); | 67 | layout->addWidget(label, 6, 0); |
60 | m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget); | 68 | m_notification = new IRCFramedColorLabel(m_config->readEntry("NotificationColor", "#AAE300"), widget); |
69 | QWhatsThis::add(m_notification, tr("Text color to be used to display notifications")); | ||
61 | layout->addWidget(m_notification, 6, 1); | 70 | layout->addWidget(m_notification, 6, 1); |
62 | tw->addTab(view, tr("Colors")); | 71 | tw->addTab(view, tr("Colors")); |
63 | showMaximized(); | 72 | showMaximized(); |
64 | } | 73 | } |
65 | 74 | ||
66 | QString IRCSettings::getColorString(QWidget *widget) { | 75 | QString IRCSettings::getColorString(QWidget *widget) { |