From d478be344e2ba383a1e38d2a1705de1cdbe2e838 Mon Sep 17 00:00:00 2001 From: wazlaf Date: Tue, 10 Sep 2002 23:12:17 +0000 Subject: initial import of OpieIRC v0.1 --- (limited to 'noncore/net/opieirc/ircserverlist.cpp') diff --git a/noncore/net/opieirc/ircserverlist.cpp b/noncore/net/opieirc/ircserverlist.cpp new file mode 100644 index 0000000..964fa13 --- a/dev/null +++ b/noncore/net/opieirc/ircserverlist.cpp @@ -0,0 +1,55 @@ +#include +#include +#include +#include +#include "ircserverlist.h" +#include "ircservereditor.h" + +class IRCListBoxServer : public QListBoxText { +public: + IRCListBoxServer(IRCServer server); + QString text(); +}; + +IRCServerList::IRCServerList(QWidget* parent, const char *name, bool modal, WFlags f) : QDialog(parent, name, modal, f) { + QVBoxLayout *layout = new QVBoxLayout(this, 5, 5); + setCaption(tr("Serverlist Browser")); + m_config = new Config("OpieIRC"); + m_config->setGroup("OpieIRC"); + QLabel *label = new QLabel(tr("Please choose a server profile"), this); + layout->addWidget(label); + m_list = new QListBox(this); + layout->addWidget(m_list); + QHBox *buttons = new QHBox(this); + QPushButton *del = new QPushButton(tr("Delete"), buttons); + QPushButton *edit = new QPushButton(tr("Edit"), buttons); + QPushButton *add = new QPushButton(tr("Add"), buttons); + connect(del, SIGNAL(clicked()), this, SLOT(delServer())); + connect(edit, SIGNAL(clicked()), this, SLOT(editServer())); + connect(add, SIGNAL(clicked()), this, SLOT(addServer())); + layout->addWidget(buttons); + showMaximized(); +} + +void IRCServerList::addServer() { + IRCServer server; + IRCServerEditor editor(server, this, "ServerEditor", TRUE); + if (editor.exec() == QDialog::Accepted) { + server = editor.getServer(); + //m_servers->append(server); + update(); + } +} + +void IRCServerList::delServer() { +} + +void IRCServerList::editServer() { +} + +void IRCServerList::update() { +} + +IRCServerList::~IRCServerList() { + delete m_config; +} -- cgit v0.9.0.2