author | wazlaf <wazlaf> | 2002-09-10 23:12:17 (UTC) |
---|---|---|
committer | wazlaf <wazlaf> | 2002-09-10 23:12:17 (UTC) |
commit | d478be344e2ba383a1e38d2a1705de1cdbe2e838 (patch) (unidiff) | |
tree | 9daf7b496c74c695ed8bd72a6ccd321f770b043c /noncore/net/opieirc/ircservereditor.cpp | |
parent | 2d6c8bd7290b766c31c100cd2d66ef0d1d0c407c (diff) | |
download | opie-d478be344e2ba383a1e38d2a1705de1cdbe2e838.zip opie-d478be344e2ba383a1e38d2a1705de1cdbe2e838.tar.gz opie-d478be344e2ba383a1e38d2a1705de1cdbe2e838.tar.bz2 |
initial import of OpieIRC v0.1
Diffstat (limited to 'noncore/net/opieirc/ircservereditor.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opieirc/ircservereditor.cpp | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/noncore/net/opieirc/ircservereditor.cpp b/noncore/net/opieirc/ircservereditor.cpp new file mode 100644 index 0000000..1b157d6 --- a/dev/null +++ b/noncore/net/opieirc/ircservereditor.cpp | |||
@@ -0,0 +1,49 @@ | |||
1 | #include <qlayout.h> | ||
2 | #include <qlabel.h> | ||
3 | #include "ircservereditor.h" | ||
4 | |||
5 | IRCServerEditor::IRCServerEditor(IRCServer server, QWidget* parent, const char* name, bool modal = FALSE, WFlags f) : QDialog(parent, name, modal, f) { | ||
6 | QGridLayout *layout = new QGridLayout(this, 6, 2, 5, 5); | ||
7 | QLabel *label = new QLabel(tr("Hostname :"), this); | ||
8 | m_hostname = new QLineEdit(server.hostname(), this); | ||
9 | layout->addWidget(label, 0, 0); | ||
10 | layout->addWidget(m_hostname, 0, 1); | ||
11 | label = new QLabel(tr("Port :"), this); | ||
12 | m_port = new QLineEdit(QString::number(server.port()), this); | ||
13 | layout->addWidget(label, 1, 0); | ||
14 | layout->addWidget(m_port, 1, 1); | ||
15 | label = new QLabel(tr("Nickname :"), this); | ||
16 | m_nickname = new QLineEdit(server.nick(), this); | ||
17 | layout->addWidget(label, 2, 0); | ||
18 | layout->addWidget(m_nickname, 2, 1); | ||
19 | label = new QLabel(tr("Description :"), this); | ||
20 | m_description = new QLineEdit(server.description(), this); | ||
21 | layout->addWidget(label, 3, 0); | ||
22 | layout->addWidget(m_description, 3, 1); | ||
23 | label = new QLabel(tr("Realname :"), this); | ||
24 | m_realname = new QLineEdit(server.realname(), this); | ||
25 | layout->addWidget(label, 4, 0); | ||
26 | layout->addWidget(m_realname, 4, 1); | ||
27 | label = new QLabel(tr("Username :"), this); | ||
28 | m_username = new QLineEdit(server.username(), this); | ||
29 | layout->addWidget(label, 3, 0); | ||
30 | layout->addWidget(m_username, 3, 1); | ||
31 | label = new QLabel(tr("Password :"), this); | ||
32 | m_password = new QLineEdit(server.password(), this); | ||
33 | layout->addWidget(label, 5, 0); | ||
34 | layout->addWidget(m_password, 5, 1); | ||
35 | showMaximized(); | ||
36 | } | ||
37 | |||
38 | |||
39 | IRCServer IRCServerEditor::getServer() { | ||
40 | IRCServer server; | ||
41 | server.setHostname(m_hostname->text()); | ||
42 | server.setPort(m_port->text().toInt()); | ||
43 | server.setNick(m_nickname->text()); | ||
44 | server.setDescription(m_description->text()); | ||
45 | server.setRealname(m_realname->text()); | ||
46 | server.setUsername(m_username->text()); | ||
47 | server.setPassword(m_password->text()); | ||
48 | return server; | ||
49 | } | ||