1 /***************************************************************************
2 * Copyright (C) 2005 by the Quassel Project *
3 * devel@quassel-irc.org *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) version 3. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
21 #ifndef _SERVERLIST_H_
22 #define _SERVERLIST_H_
29 #include "ui_serverlistdlg.h"
30 #include "ui_networkeditdlg.h"
31 #include "ui_servereditdlg.h"
33 class ServerListDlg : public QDialog {
37 ServerListDlg(QWidget *parent);
38 virtual ~ServerListDlg();
43 void editIdentities(bool end = false);
44 //virtual void reject() { exit(0); }
45 virtual void accept();
48 void requestConnect(QString network);
52 void updateNetworkTree();
53 void on_showOnStartup_stateChanged(int);
54 void on_addButton_clicked();
55 void on_editButton_clicked();
56 void on_deleteButton_clicked();
61 //QVariantMap networks;
62 //QVariantMap identities; <-- this is now stored in global
65 class NetworkEditDlg : public QDialog {
69 NetworkEditDlg(QWidget *parent, QVariantMap network);
71 QVariantMap getNetwork() { return network; }
73 virtual void accept();
76 void on_networkName_textChanged(QString);
77 void on_addServer_clicked();
78 void on_editServer_clicked();
79 void on_deleteServer_clicked();
80 void on_upServer_clicked();
81 void on_downServer_clicked();
82 void on_editIdentities_clicked();
85 void updateServerButtons();
87 Ui::NetworkEditDlg ui;
90 //QVariantMap identities;
93 QVariantMap createDefaultNetwork();
94 QString checkValidity();
97 class ServerEditDlg : public QDialog {
101 ServerEditDlg(QWidget *parent, QVariantMap server = QVariantMap());
103 QVariantMap getServer();
106 void on_serverAddress_textChanged();
109 Ui::ServerEditDlg ui;