projects
/
quassel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
modernize: Use override instead of virtual
[quassel.git]
/
src
/
qtui
/
settingspages
/
identitiessettingspage.h
diff --git
a/src/qtui/settingspages/identitiessettingspage.h
b/src/qtui/settingspages/identitiessettingspage.h
index
b2c5021
..
3674c34
100644
(file)
--- a/
src/qtui/settingspages/identitiessettingspage.h
+++ b/
src/qtui/settingspages/identitiessettingspage.h
@@
-1,11
+1,11
@@
/***************************************************************************
/***************************************************************************
- * Copyright (C) 2005-
08 by the Quassel Project
*
+ * Copyright (C) 2005-
2018 by the Quassel Project
*
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* devel@quassel-irc.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
- * (at your option)
any later version.
*
+ * (at your option)
version 3.
*
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
@@
-15,35
+15,38
@@
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
* You should have received a copy of the GNU General Public License *
* along with this program; if not, write to the *
* Free Software Foundation, Inc., *
- * 5
9 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
+ * 5
1 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
***************************************************************************/
***************************************************************************/
-#ifndef _IDENTITIESSETTINGSPAGE_H_
-#define _IDENTITIESSETTINGSPAGE_H_
+#pragma once
-#include "identity.h"
+#include "
client
identity.h"
#include "settingspage.h"
#include "settingspage.h"
+#include "identityeditwidget.h"
+
#include "ui_identitiessettingspage.h"
#include "ui_createidentitydlg.h"
#include "ui_saveidentitiesdlg.h"
#include "ui_identitiessettingspage.h"
#include "ui_createidentitydlg.h"
#include "ui_saveidentitiesdlg.h"
-#include "ui_nickeditdlgnew.h"
class QAbstractItemModel;
class QAbstractItemModel;
-class IdentitiesSettingsPage : public SettingsPage {
- Q_OBJECT
+class IdentitiesSettingsPage : public SettingsPage
+{
+ Q_OBJECT
+
+public:
+ IdentitiesSettingsPage(QWidget *parent = nullptr);
- public:
- IdentitiesSettingsPage(QWidget *parent = 0);
+ inline bool needsCoreConnection() const override { return true; }
- bool aboutToSave();
+ bool aboutToSave()
override
;
-
public slots:
- void save();
- void load();
+public slots:
+ void save()
final override
;
+ void load()
final override
;
-
private slots:
+private slots:
void coreConnectionStateChanged(bool);
void clientIdentityCreated(IdentityId);
void clientIdentityUpdated();
void coreConnectionStateChanged(bool);
void clientIdentityCreated(IdentityId);
void clientIdentityUpdated();
@@
-55,85
+58,71
@@
class IdentitiesSettingsPage : public SettingsPage {
void on_deleteIdentity_clicked();
void on_renameIdentity_clicked();
void on_deleteIdentity_clicked();
void on_renameIdentity_clicked();
- void on_addNick_clicked();
- void on_deleteNick_clicked();
- void on_renameNick_clicked();
- void on_nickUp_clicked();
- void on_nickDown_clicked();
-
+#ifdef HAVE_SSL
+ void continueUnsecured();
+#endif
void widgetHasChanged();
void setWidgetStates();
void widgetHasChanged();
void setWidgetStates();
-
private:
+private:
Ui::IdentitiesSettingsPage ui;
Ui::IdentitiesSettingsPage ui;
- QHash<IdentityId, Identity *> identities;
+ QHash<IdentityId,
Cert
Identity *> identities;
IdentityId currentId;
IdentityId currentId;
- QList<IdentityId> changedIdentities;
// for setting the widget changed state
+ QList<IdentityId> changedIdentities; // for setting the widget changed state
QList<IdentityId> deletedIdentities;
QList<IdentityId> deletedIdentities;
- void insertIdentity(Identity *identity);
+ bool _editSsl;
+
+ void insertIdentity(CertIdentity *identity);
void removeIdentity(Identity *identity);
void renameIdentity(IdentityId id, const QString &newName);
void removeIdentity(Identity *identity);
void renameIdentity(IdentityId id, const QString &newName);
- void displayIdentity(Identity *, bool dontsave = false);
- void saveToIdentity(Identity *);
+
+#ifdef HAVE_SSL
+ QSslKey keyByFilename(const QString &filename);
+ void showKeyState(const QSslKey &key);
+ QSslCertificate certByFilename(const QString &filename);
+ void showCertState(const QSslCertificate &cert);
+#endif
bool testHasChanged();
};
bool testHasChanged();
};
-class CreateIdentityDlg : public QDialog {
- Q_OBJECT
- public:
- CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = 0);
+// ==============================
+// Various Dialogs
+// ==============================
+class CreateIdentityDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = nullptr);
QString identityName() const;
IdentityId duplicateId() const;
QString identityName() const;
IdentityId duplicateId() const;
-
private slots:
+private slots:
void on_identityName_textChanged(const QString &text);
void on_identityName_textChanged(const QString &text);
-
private:
+private:
Ui::CreateIdentityDlg ui;
};
Ui::CreateIdentityDlg ui;
};
-class SaveIdentitiesDlg : public QDialog {
- Q_OBJECT
- public:
- SaveIdentitiesDlg(QList<Identity *> toCreate, QList<Identity *> toUpdate, QList<IdentityId> toRemove, QWidget *parent = 0);
+class SaveIdentitiesDlg : public QDialog
+{
+ Q_OBJECT
+
+public:
+ SaveIdentitiesDlg(const QList<CertIdentity *> &toCreate, const QList<CertIdentity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent = nullptr);
-
private slots:
+private slots:
void clientEvent();
void clientEvent();
-
private:
+private:
Ui::SaveIdentitiesDlg ui;
Ui::SaveIdentitiesDlg ui;
- QList<Identity *> toCreate, toUpdate;
- QList<IdentityId> toRemove;
-
int numevents, rcvevents;
int numevents, rcvevents;
-
};
};
-
-class NickEditDlgNew : public QDialog {
- Q_OBJECT
-
- public:
- NickEditDlgNew(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
-
- QString nick() const;
-
- private slots:
- void on_nickEdit_textChanged(const QString &);
-
- private:
- Ui::NickEditDlgNew ui;
-
- QString oldNick;
- QStringList existing;
-
-};
-
-#endif