1 /***************************************************************************
2 * Copyright (C) 2005-08 by the Quassel IRC Team *
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 _NETWORKSSETTINGSPAGE_H_
22 #define _NETWORKSSETTINGSPAGE_H_
26 #include "settingspage.h"
27 #include "ui_networkssettingspage.h"
28 #include "ui_networkeditdlgnew.h"
33 class NetworksSettingsPage : public SettingsPage {
37 NetworksSettingsPage(QWidget *parent = 0);
46 void widgetHasChanged();
47 void setWidgetStates();
48 void coreConnectionStateChanged(bool);
50 void displayNetwork(NetworkId, bool dontsave = false);
52 void clientNetworkAdded(NetworkId);
53 void clientNetworkUpdated();
55 void clientIdentityAdded(IdentityId);
56 void clientIdentityRemoved(IdentityId);
57 void clientIdentityUpdated();
59 void on_networkList_itemSelectionChanged();
60 void on_addNetwork_clicked();
63 Ui::NetworksSettingsPage ui;
66 QHash<NetworkId, NetworkInfo> networkInfos;
68 QIcon connectedIcon, disconnectedIcon;
71 bool testHasChanged();
72 void insertNetwork(NetworkId);
73 QListWidgetItem *networkItem(NetworkId) const;
76 class NetworkEditDlgNew : public QDialog {
80 NetworkEditDlgNew(const QString &old, const QStringList &existing = QStringList(), QWidget *parent = 0);
82 QString networkName() const;
85 void on_networkEdit_textChanged(const QString &);
88 Ui::NetworkEditDlgNew ui;
95 class ServerEditDlgNew : public QDialog {
99 ServerEditDlgNew(const QVariantMap &serverData = QVariantMap(), QWidget *parent = 0);
101 QVariantMap serverData() const;
104 QVariantMap _serverData;