summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc/ircsettings.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc/ircsettings.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircsettings.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index f69d2c4..13fcc24 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -1,61 +1,63 @@
#include "ircsettings.h"
#include "irctab.h"
/* OPIE */
-#include <opie/ocolorbutton.h>
-#include <opie/otabwidget.h>
+#include <opie2/ocolorbutton.h>
+#include <opie2/otabwidget.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qvalidator.h>
#include <qwhatsthis.h>
+using namespace Opie;
+using namespace Opie::Ui;
IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp)
{
setCaption(tr("Settings") );
m_config = new Config("OpieIRC");
m_config->setGroup("OpieIRC");
QHBoxLayout *l = new QHBoxLayout(this, 2, 2);
OTabWidget *tw = new OTabWidget(this);
l->addWidget(tw);
/* General Configuration */
QWidget *genwidget = new QWidget(tw);
QGridLayout *layout = new QGridLayout(genwidget, 1, 2, 5, 0);
QLabel *label = new QLabel(tr("Lines displayed :"), genwidget);
layout->addWidget(label, 0, 0);
m_lines = new QLineEdit(m_config->readEntry("Lines", "100"), genwidget);
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"));
QIntValidator *validator = new QIntValidator(this);
validator->setTop(10000);
validator->setBottom(0);
m_lines->setValidator(validator);
layout->addWidget(m_lines, 0, 1);
tw->addTab(genwidget, "opieirc/settings", tr("General"));
/* Color configuration */
QScrollView *view = new QScrollView(this);
view->setResizePolicy(QScrollView::AutoOneFit);
view->setFrameStyle( QFrame::NoFrame );
QWidget *widget = new QWidget(view->viewport());
view->addChild(widget);
layout = new QGridLayout(widget, 7, 2, 5, 0);
label = new QLabel(tr("Background color :"), widget);
layout->addWidget(label, 0, 0);
m_background = new OColorButton(widget, m_config->readEntry("BackgroundColor", "#FFFFFF"));
QWhatsThis::add(m_background, tr("Background color to be used in chats"));
layout->addWidget(m_background, 0, 1);
label = new QLabel(tr("Normal text color :"), widget);
layout->addWidget(label, 1, 0);
m_text = new OColorButton(widget, m_config->readEntry("TextColor", "#000000"));
QWhatsThis::add(m_text, tr("Text color to be used in chats"));
layout->addWidget(m_text, 1, 1);
label = new QLabel(tr("Error color :"), widget);
layout->addWidget(label, 2, 0);
m_error = new OColorButton(widget, m_config->readEntry("ErrorColor", "#FF0000"));
QWhatsThis::add(m_error, tr("Text color to be used to display errors"));
layout->addWidget(m_error, 2, 1);
label = new QLabel(tr("Text written by yourself :"), widget);
layout->addWidget(label, 3, 0);
m_self = new OColorButton(widget, m_config->readEntry("SelfColor", "#CC0000"));
QWhatsThis::add(m_self, tr("Text color to be used to identify text written by yourself"));