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_
28
#include "ui_identitiesdlg.h"
29
#include "ui_identitieseditdlg.h"
30
#include "ui_nickeditdlg.h"
32
class IdentitiesDlg : public QDialog {
36
IdentitiesDlg(QWidget *parent, QString selectedId = QString());
38
VarMap getIdentities() { return identities; }
39
QMap<QString, QString> getNameMapping() { return nameMapping; }
42
virtual void accept();
45
void autoAwayChecked();
46
void identityChanged(QString);
47
void nickSelectionChanged();
55
void editIdentities();
57
void globalDataUpdated(UserId, QString);
62
QMap<QString, QString> nameMapping;
65
QString checkValidity();
66
VarMap createDefaultIdentity();
67
QString getCurIdentity();
69
void updateIdentity(QString);
72
class NickEditDlg : public QDialog {
76
NickEditDlg(QWidget *parent, QString nick = QString());
81
void textChanged(QString);
88
class IdentitiesEditDlg : public QDialog {
92
IdentitiesEditDlg(QWidget *parent, VarMap identities, QMap<QString, QString> mapping, VarMap templ, QString selected = QString());
94
VarMap getIdentities() { return identities; }
95
QMap<QString, QString> getMapping() { return mapping; }
96
QString getSelectedIdentity() { return ui.identList->currentItem()->text(); }
98
//virtual void accept();
101
void selectionChanged();
104
void duplicateIdentity();
105
void renameIdentity();
106
void deleteIdentity();
109
Ui::IdentitiesEditDlg ui;
112
VarMap identTemplate;
113
QMap<QString, QString> mapping;
118
class RenameIdentityDlg : public QDialog {
122
RenameIdentityDlg(QWidget *parent, QList<QString> reserved, QString name = QString());
127
void textChanged(QString);
131
QList<QString> reserved;