1 /***************************************************************************
2 * Copyright (C) 2005/06 by The Quassel 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) any later version. *
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 _IDENTITIES_H_
22 #define _IDENTITIES_H_
27 #include "ui_identitiesdlg.h"
28 #include "ui_identitieseditdlg.h"
29 #include "ui_nickeditdlg.h"
31 class IdentitiesDlg : public QDialog {
35 IdentitiesDlg(QWidget *parent, QString selectedId = QString());
37 QVariantMap getIdentities() { return identities; }
38 QMap<QString, QString> getNameMapping() { return nameMapping; }
41 virtual void accept();
44 void autoAwayChecked();
45 void identityChanged(QString);
46 void nickSelectionChanged();
54 void editIdentities();
56 void globalDataUpdated(QString);
60 QVariantMap identities;
61 QMap<QString, QString> nameMapping;
64 QString checkValidity();
65 QVariantMap createDefaultIdentity();
66 QString getCurIdentity();
68 void updateIdentity(QString);
71 class NickEditDlg : public QDialog {
75 NickEditDlg(QWidget *parent, QString nick = QString());
80 void textChanged(QString);
87 class IdentitiesEditDlg : public QDialog {
91 IdentitiesEditDlg(QWidget *parent, QVariantMap identities, QMap<QString, QString> mapping, QVariantMap templ, QString selected = QString());
93 QVariantMap getIdentities() { return identities; }
94 QMap<QString, QString> getMapping() { return mapping; }
95 QString getSelectedIdentity() { return ui.identList->currentItem()->text(); }
97 //virtual void accept();
100 void selectionChanged();
103 void duplicateIdentity();
104 void renameIdentity();
105 void deleteIdentity();
108 Ui::IdentitiesEditDlg ui;
110 QVariantMap identities;
111 QVariantMap identTemplate;
112 QMap<QString, QString> mapping;
117 class RenameIdentityDlg : public QDialog {
121 RenameIdentityDlg(QWidget *parent, QList<QString> reserved, QString name = QString());
126 void textChanged(QString);
130 QList<QString> reserved;