summaryrefslogtreecommitdiff
path: root/noncore/net/opieirc
Side-by-side diff
Diffstat (limited to 'noncore/net/opieirc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opieirc/ircservereditor.cpp10
-rw-r--r--noncore/net/opieirc/ircserverlist.cpp76
-rw-r--r--noncore/net/opieirc/ircsettings.cpp22
3 files changed, 75 insertions, 33 deletions
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp
index 60274d1..2d11bf0 100644
--- a/noncore/net/opieirc/ircservereditor.cpp
+++ b/noncore/net/opieirc/ircservereditor.cpp
@@ -1 +1,7 @@
+#include "ircservereditor.h"
+
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qmessagebox.h>
@@ -4,3 +10,2 @@
#include <qwhatsthis.h>
-#include "ircservereditor.h"
@@ -45,3 +50,4 @@ IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char*
setCaption(tr("Edit server information"));
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp
index 595ae3e..62bfc17 100644
--- a/noncore/net/opieirc/ircserverlist.cpp
+++ b/noncore/net/opieirc/ircserverlist.cpp
@@ -1 +1,9 @@
+
+#include "ircserverlist.h"
+#include "ircservereditor.h"
+
+/* OPIE */
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qlayout.h>
@@ -5,8 +13,8 @@
#include <qwhatsthis.h>
-#include "ircserverlist.h"
-#include "ircservereditor.h"
-class IRCListBoxServer : public QListBoxText {
+class IRCListBoxServer : public QListBoxText
+{
public:
- IRCListBoxServer(IRCServer server) : QListBoxText(server.name()) {
+ IRCListBoxServer(IRCServer server) : QListBoxText(server.name())
+ {
m_server = server;
@@ -14,7 +22,9 @@ public:
- IRCServer server() {
+ IRCServer server()
+ {
return m_server;
}
-
- void setServer(IRCServer server) {
+
+ void setServer(IRCServer server)
+ {
m_server = server;
@@ -26,3 +36,4 @@ protected:
-IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
+IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp)
+{
QVBoxLayout *layout = new QVBoxLayout(this, 5, 5);
@@ -50,7 +61,10 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
int count = m_config->readNumEntry("ServerCount", 0);
- if (count) {
- for (int i=0; i<count; i++) {
+ if (count)
+ {
+ for (int i=0; i<count; i++)
+ {
m_config->setGroup("OpieIRC");
QString name = m_config->readEntry("Server"+QString::number(i));
- if (name.length() > 0) {
+ if (name.length() > 0)
+ {
IRCServer server;
@@ -69,10 +83,12 @@ IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFla
}
-
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
-void IRCServerList::addServer() {
+void IRCServerList::addServer()
+{
IRCServer server;
IRCServerEditor editor(server, this, "ServerEditor", TRUE);
- if (editor.exec() == QDialog::Accepted) {
+ if (editor.exec() == QDialog::Accepted)
+ {
server = editor.getServer();
@@ -83,5 +99,7 @@ void IRCServerList::addServer() {
-void IRCServerList::delServer() {
+void IRCServerList::delServer()
+{
int index = m_list->currentItem();
- if (index != -1) {
+ if (index != -1)
+ {
m_list->removeItem(index);
@@ -90,5 +108,7 @@ void IRCServerList::delServer() {
-void IRCServerList::editServer() {
+void IRCServerList::editServer()
+{
int index = m_list->currentItem();
- if (index != -1) {
+ if (index != -1)
+ {
IRCListBoxServer *item = (IRCListBoxServer *)m_list->item(index);
@@ -96,3 +116,4 @@ void IRCServerList::editServer() {
IRCServerEditor editor(server, this, "ServerEditor", TRUE);
- if (editor.exec() == QDialog::Accepted) {
+ if (editor.exec() == QDialog::Accepted)
+ {
server = editor.getServer();
@@ -103,3 +124,4 @@ void IRCServerList::editServer() {
-int IRCServerList::exec() {
+int IRCServerList::exec()
+{
int returncode = QDialog::exec();
@@ -108,3 +130,4 @@ int IRCServerList::exec() {
m_config->writeEntry("ServerCount", QString::number(m_list->count()));
- for (unsigned int i=0; i<m_list->count(); i++) {
+ for (unsigned int i=0; i<m_list->count(); i++)
+ {
IRCServer server = ((IRCListBoxServer *)m_list->item(i))->server();
@@ -124,3 +147,4 @@ int IRCServerList::exec() {
-bool IRCServerList::hasServer() {
+bool IRCServerList::hasServer()
+{
return (m_list->currentItem() != -1);
@@ -128,3 +152,4 @@ bool IRCServerList::hasServer() {
-IRCServer IRCServerList::server() {
+IRCServer IRCServerList::server()
+{
return ((IRCListBoxServer *)m_list->item(m_list->currentItem()))->server();
@@ -132,3 +157,4 @@ IRCServer IRCServerList::server() {
-IRCServerList::~IRCServerList() {
+IRCServerList::~IRCServerList()
+{
delete m_config;
diff --git a/noncore/net/opieirc/ircsettings.cpp b/noncore/net/opieirc/ircsettings.cpp
index 2862296..f69d2c4 100644
--- a/noncore/net/opieirc/ircsettings.cpp
+++ b/noncore/net/opieirc/ircsettings.cpp
@@ -1,9 +1,16 @@
+
+#include "ircsettings.h"
+#include "irctab.h"
+
+/* OPIE */
#include <opie/ocolorbutton.h>
#include <opie/otabwidget.h>
+#include <qpe/qpeapplication.h>
+
+/* QT */
#include <qvalidator.h>
#include <qwhatsthis.h>
-#include "ircsettings.h"
-#include "irctab.h"
-IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp) {
+IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags) : QDialog(parent, name, modal, WStyle_ContextHelp)
+{
setCaption(tr("Settings") );
@@ -72,6 +79,8 @@ IRCSettings::IRCSettings(QWidget* parent, const char* name, bool modal, WFlags)
tw->setCurrentTab( genwidget );
- showMaximized();
+
+ QPEApplication::showDialog( this );
}
-void IRCSettings::accept() {
+void IRCSettings::accept()
+{
IRCTab::m_backgroundColor = m_background->color().name();
@@ -95,3 +104,4 @@ void IRCSettings::accept() {
-IRCSettings::~IRCSettings() {
+IRCSettings::~IRCSettings()
+{
delete m_config;