buffersettings.cpp
client.cpp
clientbacklogmanager.cpp
+ clientidentity.cpp
clientirclisthelper.cpp
clientsettings.cpp
clientsyncer.cpp
client.h
clientbacklogmanager.h
clientcoreinfo.h
+ clientidentity.h
clientirclisthelper.h
clientsyncer.h
irclistmodel.h
#include "bufferviewmanager.h"
#include "clientbacklogmanager.h"
#include "clientirclisthelper.h"
-#include "identity.h"
+#include "clientidentity.h"
#include "ircchannel.h"
#include "ircuser.h"
#include "message.h"
p->attachSignal(this, SIGNAL(sendInput(BufferInfo, QString)));
p->attachSignal(this, SIGNAL(requestNetworkStates()));
- p->attachSignal(this, SIGNAL(requestCreateIdentity(const Identity &)), SIGNAL(createIdentity(const Identity &)));
+ p->attachSignal(this, SIGNAL(requestCreateIdentity(const Identity &, const QVariantMap &)), SIGNAL(createIdentity(const Identity &, const QVariantMap &)));
p->attachSignal(this, SIGNAL(requestRemoveIdentity(IdentityId)), SIGNAL(removeIdentity(IdentityId)));
p->attachSlot(SIGNAL(identityCreated(const Identity &)), this, SLOT(coreIdentityCreated(const Identity &)));
p->attachSlot(SIGNAL(identityRemoved(IdentityId)), this, SLOT(coreIdentityRemoved(IdentityId)));
return instance()->_identities.keys();
}
-const Identity * Client::identity(IdentityId id) {
+const Identity *Client::identity(IdentityId id) {
if(instance()->_identities.contains(id)) return instance()->_identities[id];
else return 0;
}
-void Client::createIdentity(const Identity &id) {
- emit instance()->requestCreateIdentity(id);
+void Client::createIdentity(const CertIdentity &id) {
+ QVariantMap additional;
+ additional["KeyPem"] = id.sslKey().toPem();
+ additional["CertPem"] = id.sslCert().toPem();
+ emit instance()->requestCreateIdentity(id, additional);
}
void Client::updateIdentity(IdentityId id, const QVariantMap &ser) {
}
Q_ASSERT(_networks.isEmpty());
- QHash<IdentityId, Identity*>::iterator idIter = _identities.begin();
+ QHash<IdentityId, Identity *>::iterator idIter = _identities.begin();
while(idIter != _identities.end()) {
+ emit identityRemoved(idIter.key());
Identity *id = idIter.value();
- emit identityRemoved(id->id());
idIter = _identities.erase(idIter);
id->deleteLater();
}
class AbstractMessageProcessor;
class Identity;
+class CertIdentity;
class Network;
class AbstractUi;
static const Network * network(NetworkId);
static QList<IdentityId> identityIds();
- static const Identity * identity(IdentityId);
+ static const Identity *identity(IdentityId);
//! Request creation of an identity with the given data.
/** The request will be sent to the core, and will be propagated back to all the clients
* with a new valid IdentityId.
* \param identity The identity template for the new identity. It does not need to have a valid ID.
*/
- static void createIdentity(const Identity &identity);
+ static void createIdentity(const CertIdentity &identity);
//! Request update of an identity with the given data.
/** The request will be sent to the core, and will be propagated back to all the clients.
void identityRemoved(IdentityId id);
//! Sent to the core when an identity shall be created. Should not be used elsewhere.
- void requestCreateIdentity(const Identity &);
+ void requestCreateIdentity(const Identity &, const QVariantMap &);
//! Sent to the core when an identity shall be removed. Should not be used elsewhere.
void requestRemoveIdentity(IdentityId);
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 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 *
+ * (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 *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include "clientidentity.h"
+
+#include "client.h"
+#include "signalproxy.h"
+
+CertIdentity::CertIdentity(IdentityId id, QObject *parent)
+ : Identity(id, parent),
+ _certManager(0),
+ _isDirty(false)
+{
+}
+
+CertIdentity::CertIdentity(const Identity &other, QObject *parent)
+ : Identity(other, parent),
+ _certManager(0),
+ _isDirty(false)
+{
+}
+
+CertIdentity::CertIdentity(const CertIdentity &other, QObject *parent)
+ : Identity(other, parent),
+ _certManager(0),
+ _isDirty(other._isDirty),
+ _sslKey(other._sslKey),
+ _sslCert(other._sslCert)
+{
+}
+
+void CertIdentity::enableEditSsl(bool enable) {
+ if(!enable || _certManager)
+ return;
+
+ _certManager = new ClientCertManager(id(), this);
+ if(isValid()) { // this means we are not a newly created Identity but have a proper Id
+ Client::signalProxy()->synchronize(_certManager);
+ connect(_certManager, SIGNAL(updated(const QVariantMap &)), this, SLOT(markClean()));
+ connect(_certManager, SIGNAL(initDone()), this, SLOT(markClean()));
+ }
+}
+
+void CertIdentity::setSslKey(const QSslKey &key) {
+ if(key.toPem() == _sslKey.toPem())
+ return;
+ _sslKey = key;
+ _isDirty = true;
+}
+
+void CertIdentity::setSslCert(const QSslCertificate &cert) {
+ if(cert.toPem() == _sslCert.toPem())
+ return;
+ _sslCert = cert;
+ _isDirty = true;
+}
+
+void CertIdentity::requestUpdateSslSettings() {
+ if(!_certManager)
+ return;
+
+ _certManager->requestUpdate(_certManager->toVariantMap());
+}
+
+void CertIdentity::markClean() {
+ _isDirty = false;
+ emit sslSettingsUpdated();
+}
+
+// ========================================
+// ClientCertManager
+// ========================================
+void ClientCertManager::setSslKey(const QByteArray &encoded) {
+ QSslKey key(encoded, QSsl::Rsa);
+ if(key.isNull())
+ key = QSslKey(encoded, QSsl::Dsa);
+ _certIdentity->setSslKey(key);
+}
+
+void ClientCertManager::setSslCert(const QByteArray &encoded) {
+ _certIdentity->setSslCert(QSslCertificate(encoded));
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 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 *
+ * (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 *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef CLIENTIDENTITY_H
+#define CLIENTIDENTITY_H
+
+#include "identity.h"
+
+class ClientCertManager;
+
+class CertIdentity : public Identity {
+ Q_OBJECT
+
+public:
+ CertIdentity(IdentityId id = 0, QObject *parent = 0);
+ CertIdentity(const Identity &other, QObject *parent = 0);
+ CertIdentity(const CertIdentity &other, QObject *parent = 0);
+
+ void enableEditSsl(bool enable = true);
+ inline bool isDirty() const { return _isDirty; }
+
+ inline const QSslKey &sslKey() const { return _sslKey; }
+ inline const QSslCertificate &sslCert() const { return _sslCert; }
+
+ void setSslKey(const QSslKey &key);
+ void setSslCert(const QSslCertificate &cert);
+
+public slots:
+ void requestUpdateSslSettings();
+
+signals:
+ void sslSettingsUpdated();
+
+private slots:
+ void markClean();
+
+private:
+ ClientCertManager *_certManager;
+ bool _isDirty;
+ QSslKey _sslKey;
+ QSslCertificate _sslCert;
+};
+
+// ========================================
+// ClientCertManager
+// ========================================
+class ClientCertManager : public CertManager {
+ Q_OBJECT
+
+public:
+ ClientCertManager(IdentityId id, CertIdentity *parent) : CertManager(id, parent), _certIdentity(parent) {}
+
+ virtual inline const QSslKey &sslKey() const { return _certIdentity->sslKey(); }
+ virtual inline const QSslCertificate &sslCert() const { return _certIdentity->sslCert(); }
+
+public slots:
+ virtual void setSslKey(const QByteArray &encoded);
+ virtual void setSslCert(const QByteArray &encoded);
+
+private:
+ CertIdentity *_certIdentity;
+};
+
+#endif //CLIENTIDENTITY_H
/*** setters ***/
-// NOTE: DO NOT USE ON SYNCHRONIZED OBJECTS!
void Identity::setId(IdentityId _id) {
_identityId = _id;
- setObjectName(QString::number(id().toInt()));
+ emit idSet(_id);
+ renameObject(QString::number(id().toInt()));
}
void Identity::setIdentityName(const QString &identityName) {
id.fromVariantMap(i);
return in;
}
+
#ifndef IDENTITY_H
#define IDENTITY_H
+#include <QByteArray>
#include <QDataStream>
#include <QMetaType>
#include <QString>
public:
Identity(IdentityId id = 0, QObject *parent = 0);
Identity(const Identity &other, QObject *parent = 0);
+ inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
+
void setToDefaults();
bool operator==(const Identity &other);
Q_DECLARE_METATYPE(Identity)
-#endif
+#ifdef HAVE_SSL
+#include <QSslKey>
+#include <QSslCertificate>
+
+class CertManager : public SyncableObject {
+ Q_OBJECT
+ Q_PROPERTY(QByteArray sslKey READ sslKeyPem WRITE setSslKey STORED false)
+ Q_PROPERTY(QByteArray sslCert READ sslCertPem WRITE setSslCert STORED false)
+
+public:
+ CertManager(IdentityId id, QObject *parent = 0) : SyncableObject(QString::number(id.toInt()), parent) {}
+ inline virtual const QMetaObject *syncMetaObject() const { return &staticMetaObject; }
+
+ virtual const QSslKey &sslKey() const = 0;
+ inline QByteArray sslKeyPem() const { return sslKey().toPem(); }
+ virtual const QSslCertificate &sslCert() const = 0;
+ inline QByteArray sslCertPem() const { return sslCert().toPem(); }
+
+public slots:
+ inline virtual void setSslKey(const QByteArray &encoded) { emit sslKeySet(encoded); }
+ inline virtual void setSslCert(const QByteArray &encoded) { emit sslCertSet(encoded); }
+
+signals:
+ void sslKeySet(const QByteArray &);
+ void sslCertSet(const QByteArray &);
+};
+
+#endif // HAVE_SSL
+
+#endif // IDENTITY_H
void SignalProxy::objectRenamed(const QString &newname, const QString &oldname) {
SyncableObject *syncObject = qobject_cast<SyncableObject *>(sender());
- const QMetaObject *meta = syncObject->metaObject();
+ const QMetaObject *meta = syncObject->syncMetaObject();
const QByteArray className(meta->className());
objectRenamed(className, newname, oldname);
{
}
+SyncableObject::SyncableObject(const QString &objectName, QObject *parent)
+ : QObject(parent),
+ _initialized(false),
+ _allowClientUpdates(false)
+{
+ setObjectName(objectName);
+}
+
SyncableObject::SyncableObject(const SyncableObject &other, QObject *parent)
: QObject(parent),
_initialized(other._initialized),
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _SYNCABLEOBJECT_H_
-#define _SYNCABLEOBJECT_H_
+#ifndef SYNCABLEOBJECT_H
+#define SYNCABLEOBJECT_H
#include <QDataStream>
#include <QMetaType>
public:
SyncableObject(QObject *parent = 0);
+ SyncableObject(const QString &objectName, QObject *parent = 0);
SyncableObject(const SyncableObject &other, QObject *parent = 0);
//! Stores the object's state into a QVariantMap.
public slots:
virtual void setInitialized();
void requestUpdate(const QVariantMap &properties);
- void update(const QVariantMap &properties);
+ virtual void update(const QVariantMap &properties);
protected:
void renameObject(const QString &newName);
corebufferviewconfig.cpp
corebufferviewmanager.cpp
corecoreinfo.cpp
+ coreidentity.cpp
coreircchannel.cpp
coreirclisthelper.cpp
corenetwork.cpp
corebufferviewconfig.h
corebufferviewmanager.h
corecoreinfo.h
+ coreidentity.h
coreircchannel.h
coreirclisthelper.h
corenetwork.h
cd $TARGET_DIR
-CURRENT_VERSION=`ls | sort -n | tail -n1`
+CURRENT_VERSION=$(ls | sort -n | tail -n1)
if [ ! $CURRENT_VERSION ]; then
echo "no previous schema found to upgrade from"
((NEW_VERSION=$CURRENT_VERSION + 1))
mkdir $NEW_VERSION
-svn add $NEW_VERSION
-find $CURRENT_VERSION -depth 1 \! -name "upgrade_*" \! -name ".*" -exec svn mv {} $NEW_VERSION \;
-svn cp ${CURRENT_VERSION}/upgrade_999_version.sql $NEW_VERSION
+git add $NEW_VERSION
+find $CURRENT_VERSION -depth 1 \! -name "upgrade_*" \! -name ".*" -exec git mv {} $NEW_VERSION \;
+cp ${CURRENT_VERSION}/upgrade_999_version.sql $NEW_VERSION
+git add ${NEW_VERSION}/upgrade_999_version.sql
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 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 *
+ * (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 *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#include "coreidentity.h"
+
+#include "coresession.h"
+#include "coreusersettings.h"
+#include "signalproxy.h"
+
+CoreIdentity::CoreIdentity(IdentityId id, SignalProxy *proxy, CoreSession *parent)
+ : Identity(id, parent),
+ _certManager(new CoreCertManager(this)),
+ _coreSession(parent)
+{
+ proxy->synchronize(_certManager);
+ connect(this, SIGNAL(idSet(IdentityId)), _certManager, SLOT(setId(IdentityId)));
+}
+
+CoreIdentity::CoreIdentity(const Identity &other, SignalProxy *proxy, CoreSession *parent)
+ : Identity(other, parent),
+ _certManager(new CoreCertManager(this)),
+ _coreSession(parent)
+{
+ proxy->synchronize(_certManager);
+ connect(this, SIGNAL(idSet(IdentityId)), _certManager, SLOT(setId(IdentityId)));
+}
+
+void CoreIdentity::update(const QVariantMap &properties) {
+ SyncableObject::update(properties);
+ save();
+}
+
+void CoreIdentity::save() {
+ CoreUserSettings s(_coreSession->user());
+ s.storeIdentity(*this);
+}
+
+void CoreIdentity::setSslKey(const QByteArray &encoded) {
+ QSslKey key(encoded, QSsl::Rsa);
+ if(key.isNull())
+ key = QSslKey(encoded, QSsl::Dsa);
+ setSslKey(key);
+}
+
+void CoreIdentity::setSslCert(const QByteArray &encoded) {
+ setSslCert(QSslCertificate(encoded));
+}
+
+
+// ========================================
+// CoreCertManager
+// ========================================
+CoreCertManager::CoreCertManager(CoreIdentity *identity)
+ : CertManager(identity->id(), identity),
+ _identity(identity)
+{
+ setAllowClientUpdates(true);
+}
+
+void CoreCertManager::setSslKey(const QByteArray &encoded) {
+ identity()->setSslKey(encoded);
+ CertManager::setSslKey(encoded);
+}
+
+void CoreCertManager::setSslCert(const QByteArray &encoded) {
+ identity()->setSslCert(encoded);
+ CertManager::setSslCert(encoded);
+}
+
+void CoreCertManager::setId(IdentityId id) {
+ renameObject(QString::number(id.toInt()));
+}
--- /dev/null
+/***************************************************************************
+ * Copyright (C) 2005-08 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 *
+ * (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 *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
+ * GNU General Public License for more details. *
+ * *
+ * 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., *
+ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
+ ***************************************************************************/
+
+#ifndef COREIDENTITY_H
+#define COREIDENTITY_H
+
+#include "identity.h"
+
+#include <QSslKey>
+#include <QSslCertificate>
+
+class CoreCertManager;
+class CoreSession;
+class SignalProxy;
+
+class CoreIdentity : public Identity {
+ Q_OBJECT
+
+public:
+ CoreIdentity(IdentityId id, SignalProxy *proxy, CoreSession *parent);
+ CoreIdentity(const Identity &other, SignalProxy *proxy, CoreSession *parent);
+
+ inline const QSslKey &sslKey() const { return _sslKey; }
+ inline void setSslKey(const QSslKey &key) { _sslKey = key; }
+ void setSslKey(const QByteArray &encoded);
+ inline const QSslCertificate &sslCert() const { return _sslCert; }
+ inline void setSslCert(const QSslCertificate &cert) { _sslCert = cert; }
+ void setSslCert(const QByteArray &encoded);
+
+public slots:
+ virtual void update(const QVariantMap &properties);
+ void save();
+
+private:
+ QSslKey _sslKey;
+ QSslCertificate _sslCert;
+
+ CoreCertManager *_certManager;
+ CoreSession *_coreSession;
+};
+
+
+// ========================================
+// CoreCertManager
+// ========================================
+class CoreCertManager : public CertManager {
+ Q_OBJECT
+
+public:
+ CoreCertManager(CoreIdentity *identity);
+
+ inline CoreIdentity *identity() const { return _identity; }
+ virtual inline const QSslKey &sslKey() const { return identity()->sslKey(); }
+ virtual inline const QSslCertificate &sslCert() const { return identity()->sslCert(); }
+
+public slots:
+ virtual void setSslKey(const QByteArray &encoded);
+ virtual void setSslCert(const QByteArray &encoded);
+
+ void setId(IdentityId id);
+
+private:
+ CoreIdentity *_identity;
+};
+
+#endif //COREIDENTITY_H
#include "core.h"
#include "coresession.h"
-#include "identity.h"
+#include "coreidentity.h"
#include "ircserverhandler.h"
#include "userinputhandler.h"
qWarning() << "Server list empty, ignoring connect request!";
return;
}
- Identity *identity = identityPtr();
+ CoreIdentity *identity = identityPtr();
if(!identity) {
qWarning() << "Invalid identity configures, ignoring connect request!";
return;
return;
#endif
- Identity *identity = identityPtr();
+ CoreIdentity *identity = identityPtr();
if(!identity) {
qCritical() << "Identity invalid!";
disconnectFromIrc();
#include "coresession.h"
-class Identity;
+class CoreIdentity;
class IrcServerHandler;
class UserInputHandler;
class CtcpHandler;
~CoreNetwork();
inline virtual const QMetaObject *syncMetaObject() const { return &Network::staticMetaObject; }
- inline Identity *identityPtr() const { return coreSession()->identity(identity()); }
+ inline CoreIdentity *identityPtr() const { return coreSession()->identity(identity()); }
inline CoreSession *coreSession() const { return _coreSession; }
inline IrcServerHandler *ircServerHandler() const { return _ircServerHandler; }
#include "coreirclisthelper.h"
#include "storage.h"
+#include "coreidentity.h"
#include "corenetwork.h"
#include "ircuser.h"
#include "ircchannel.h"
-#include "identity.h"
#include "util.h"
#include "coreusersettings.h"
p->attachSignal(this, SIGNAL(identityCreated(const Identity &)));
p->attachSignal(this, SIGNAL(identityRemoved(IdentityId)));
- p->attachSlot(SIGNAL(createIdentity(const Identity &)), this, SLOT(createIdentity(const Identity &)));
+ p->attachSlot(SIGNAL(createIdentity(const Identity &, const QVariantMap &)), this, SLOT(createIdentity(const Identity &, const QVariantMap &)));
p->attachSlot(SIGNAL(removeIdentity(IdentityId)), this, SLOT(removeIdentity(IdentityId)));
p->attachSignal(this, SIGNAL(networkCreated(NetworkId)));
return 0;
}
-Identity *CoreSession::identity(IdentityId id) const {
+CoreIdentity *CoreSession::identity(IdentityId id) const {
if(_identities.contains(id)) return _identities[id];
return 0;
}
CoreUserSettings s(user());
foreach(IdentityId id, s.identityIds()) {
- Identity *i = new Identity(s.identity(id), this);
- if(!i->isValid()) {
- qWarning() << "Invalid identity! Removing...";
- s.removeIdentity(id);
- delete i;
- continue;
- }
- if(_identities.contains(i->id())) {
- qWarning() << "Duplicate identity, ignoring!";
- delete i;
- continue;
- }
- connect(i, SIGNAL(updated(const QVariantMap &)), this, SLOT(identityUpdated(const QVariantMap &)));
- _identities[i->id()] = i;
- signalProxy()->synchronize(i);
+ createIdentity(s.identity(id));
}
if(!_identities.count()) {
- Identity i(1);
- i.setToDefaults();
- i.setIdentityName(tr("Default Identity"));
- createIdentity(i);
+ Identity identity;
+ identity.setToDefaults();
+ identity.setIdentityName(tr("Default Identity"));
+ createIdentity(identity);
}
foreach(NetworkInfo info, Core::networks(user())) {
/*** Identity Handling ***/
-void CoreSession::createIdentity(const Identity &id) {
- // find free ID
- int i;
- for(i = 1; i <= _identities.count(); i++) {
- if(!_identities.keys().contains(i)) break;
+void CoreSession::createIdentity(const Identity &identity, const QVariantMap &additional) {
+ if(_identities.contains(identity.id())) {
+ qWarning() << "duplicate Identity:" << identity.id();
+ return;
}
- //qDebug() << "found free id" << i;
- Identity *newId = new Identity(id, this);
- newId->setId(i);
- _identities[i] = newId;
- signalProxy()->synchronize(newId);
- CoreUserSettings s(user());
- s.storeIdentity(*newId);
- connect(newId, SIGNAL(updated(const QVariantMap &)), this, SLOT(identityUpdated(const QVariantMap &)));
- emit identityCreated(*newId);
+
+ int id = identity.id().toInt();
+ bool newId = !identity.isValid();
+ CoreIdentity *coreIdentity = new CoreIdentity(identity, signalProxy(), this);
+ if(additional.contains("KeyPem"))
+ coreIdentity->setSslKey(additional["KeyPem"].toByteArray());
+ if(additional.contains("CertPem"))
+ coreIdentity->setSslCert(additional["CertPem"].toByteArray());
+ if(newId) {
+ // find free ID
+ for(id = 1; id <= _identities.count(); id++) {
+ if(!_identities.keys().contains(id))
+ break;
+ }
+ coreIdentity->setId(id);
+ coreIdentity->save();
+ }
+
+ _identities[id] = coreIdentity;
+ qDebug() << id << coreIdentity->id();
+ signalProxy()->synchronize(coreIdentity);
+
+ if(newId)
+ emit identityCreated(*coreIdentity);
}
void CoreSession::removeIdentity(IdentityId id) {
}
}
-void CoreSession::identityUpdated(const QVariantMap &data) {
- IdentityId id = data.value("identityId", 0).value<IdentityId>();
- if(!id.isValid() || !_identities.contains(id)) {
- qWarning() << "Update request for unknown identity received!";
- return;
- }
- CoreUserSettings s(user());
- s.storeIdentity(*_identities.value(id));
-}
-
/*** Network Handling ***/
void CoreSession::createNetwork(const NetworkInfo &info_) {
class CoreBufferViewManager;
class CoreIrcListHelper;
class Identity;
+class CoreIdentity;
class NetworkConnection;
class CoreNetwork;
struct NetworkInfo;
inline UserId user() const { return _user; }
CoreNetwork *network(NetworkId) const;
NetworkConnection *networkConnection(NetworkId) const;
- Identity *identity(IdentityId) const;
+ CoreIdentity *identity(IdentityId) const;
QVariant sessionState();
//! Create an identity and propagate the changes to the clients.
/** \param identity The identity to be created.
*/
- void createIdentity(const Identity &identity);
+ void createIdentity(const Identity &identity, const QVariantMap &additional = QVariantMap());
//! Remove identity and propagate that fact to the clients.
/** \param identity The identity to be removed.
*/
void createNetwork(const NetworkInfo &info);
- //! Remove identity and propagate that fact to the clients.
- /** \param identity The identity to be removed.
+ //! Remove network and propagate that fact to the clients.
+ /** \param network The id of the network to be removed.
*/
void removeNetwork(NetworkId network);
void destroyNetwork(NetworkId);
- void identityUpdated(const QVariantMap &);
-
void storeBufferLastSeenMsg(BufferId buffer, const MsgId &msgId);
void scriptRequest(QString script);
// QHash<NetworkId, NetworkConnection *> _connections;
QHash<NetworkId, CoreNetwork *> _networks;
// QHash<NetworkId, CoreNetwork *> _networksToRemove;
- QHash<IdentityId, Identity *> _identities;
+ QHash<IdentityId, CoreIdentity *> _identities;
BufferSyncer *_bufferSyncer;
CoreBacklogManager *_backlogManager;
#include "coresession.h"
#include "coreirclisthelper.h"
-#include "identity.h"
+#include "coreidentity.h"
#include "ctcphandler.h"
#include "ircuser.h"
#include "util.h"
#include "ctcphandler.h"
-#include "identity.h"
+#include "coreidentity.h"
#include "ircuser.h"
#include <QDebug>
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
+#include "identitiessettingspage.h"
+
#include <QInputDialog>
+#include <QFileDialog>
+#include <QDesktopServices>
#include <QMessageBox>
-
-#include "identitiessettingspage.h"
+#include <QSslKey>
#include "client.h"
#include "iconloader.h"
+#include "signalproxy.h"
IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent)
- : SettingsPage(tr("General"), tr("Identities"), parent) {
+ : SettingsPage(tr("General"), tr("Identities"), parent),
+ _editSsl(false)
+{
ui.setupUi(this);
ui.renameIdentity->setIcon(BarIcon("edit-rename"));
connect(ui.nicknameList, SIGNAL(itemSelectionChanged()), this, SLOT(setWidgetStates()));
+#ifdef HAVE_SSL
+ ui.keyAndCertSettings->setCurrentIndex(1);
+#else
+ ui.keyAndCertSettings->setCurrentIndex(0);
+#endif
+
// we would need this if we enabled drag and drop in the nicklist...
//connect(ui.nicknameList, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(setWidgetStates()));
//connect(ui.nicknameList->model(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(nicklistHasChanged()));
void IdentitiesSettingsPage::save() {
setEnabled(false);
- QList<Identity *> toCreate, toUpdate;
+ QList<CertIdentity *> toCreate, toUpdate;
// we need to remove our temporarily created identities.
// these are going to be re-added after the core has propagated them back...
- QHash<IdentityId, Identity *>::iterator i = identities.begin();
+ QHash<IdentityId, CertIdentity *>::iterator i = identities.begin();
while(i != identities.end()) {
if((*i)->id() < 0) {
- Identity *temp = *i;
+ CertIdentity *temp = *i;
i = identities.erase(i);
toCreate.append(temp);
ui.identityList->removeItem(ui.identityList->findData(temp->id().toInt()));
} else {
- if(**i != *Client::identity((*i)->id())) {
+ if(**i != *Client::identity((*i)->id()) || (*i)->isDirty()) {
toUpdate.append(*i);
}
++i;
} else {
if(currentId != 0) {
changedIdentities.removeAll(currentId);
- Identity temp(currentId, this);
+ CertIdentity temp(currentId, this);
saveToIdentity(&temp);
temp.setIdentityName(identities[currentId]->identityName());
- if(temp != *Client::identity(currentId)) changedIdentities.append(currentId);
+ if(temp != *Client::identity(currentId) || temp.isDirty())
+ changedIdentities.append(currentId);
}
return changedIdentities.count();
}
}
void IdentitiesSettingsPage::clientIdentityCreated(IdentityId id) {
- insertIdentity(new Identity(*Client::identity(id), this));
+ CertIdentity *identity = new CertIdentity(*Client::identity(id), this);
+ identity->enableEditSsl(_editSsl);
+ insertIdentity(identity);
+ connect(identity, SIGNAL(sslSettingsUpdated()), this, SLOT(clientIdentityUpdated()));
connect(Client::identity(id), SIGNAL(updatedRemotely()), this, SLOT(clientIdentityUpdated()));
}
qWarning() << "Unknown identity to update:" << clientIdentity->identityName();
return;
}
- Identity *identity = identities[clientIdentity->id()];
- if(identity->identityName() != clientIdentity->identityName()) renameIdentity(identity->id(), clientIdentity->identityName());
+
+ CertIdentity *identity = identities[clientIdentity->id()];
+
+ if(identity->identityName() != clientIdentity->identityName())
+ renameIdentity(identity->id(), clientIdentity->identityName());
+
identity->update(*clientIdentity);
- if(identity->id() == currentId) displayIdentity(identity, true);
+
+ if(identity->id() == currentId)
+ displayIdentity(identity, true);
}
void IdentitiesSettingsPage::clientIdentityRemoved(IdentityId id) {
}
}
-void IdentitiesSettingsPage::insertIdentity(Identity *identity) {
+void IdentitiesSettingsPage::insertIdentity(CertIdentity *identity) {
IdentityId id = identity->id();
identities[id] = identity;
if(id == 1) {
}
}
-void IdentitiesSettingsPage::displayIdentity(Identity *id, bool dontsave) {
+void IdentitiesSettingsPage::displayIdentity(CertIdentity *id, bool dontsave) {
if(currentId != 0 && !dontsave && identities.contains(currentId)) {
saveToIdentity(identities[currentId]);
}
ui.kickReason->setText(id->kickReason());
ui.partReason->setText(id->partReason());
ui.quitReason->setText(id->quitReason());
+ showKeyState(id->sslKey());
+ showCertState(id->sslCert());
}
}
-void IdentitiesSettingsPage::saveToIdentity(Identity *id) {
+void IdentitiesSettingsPage::saveToIdentity(CertIdentity *id) {
id->setRealName(ui.realName->text());
QStringList nicks;
for(int i = 0; i < ui.nicknameList->count(); i++) {
id->setKickReason(ui.kickReason->text());
id->setPartReason(ui.partReason->text());
id->setQuitReason(ui.quitReason->text());
+ id->setSslKey(QSslKey(ui.keyTypeLabel->property("sslKey").toByteArray(), (QSsl::KeyAlgorithm)(ui.keyTypeLabel->property("sslKeyType").toInt())));
+ id->setSslCert(QSslCertificate(ui.certOrgLabel->property("sslCert").toByteArray()));
}
void IdentitiesSettingsPage::on_addIdentity_clicked() {
if(!identities.keys().contains(-id.toInt())) break;
}
id = -id.toInt();
- Identity *newId = new Identity(id, this);
+ CertIdentity *newId = new CertIdentity(id, this);
+ newId->enableEditSsl(_editSsl);
if(dlg.duplicateId() != 0) {
// duplicate
newId->update(*identities[dlg.duplicateId()]);
}
}
+void IdentitiesSettingsPage::on_continueUnsecured_clicked() {
+ _editSsl = true;
+
+ QHash<IdentityId, CertIdentity *>::iterator idIter;
+ for(idIter = identities.begin(); idIter != identities.end(); idIter++) {
+ idIter.value()->enableEditSsl();
+ }
+
+ ui.keyAndCertSettings->setCurrentIndex(2);
+}
+
+void IdentitiesSettingsPage::on_clearOrLoadKeyButton_clicked() {
+ QSslKey key;
+
+ if(ui.keyTypeLabel->property("sslKey").toByteArray().isEmpty()) {
+ QString keyFileName = QFileDialog::getOpenFileName(this, tr("Load a Key"), QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
+ QFile keyFile(keyFileName);
+ keyFile.open(QIODevice::ReadOnly);
+ QByteArray keyRaw = keyFile.read(2 << 20);
+ keyFile.close();
+
+ for(int i = 0; i < 2; i++) {
+ for(int j = 0; j < 2; j++) {
+ key = QSslKey(keyRaw, (QSsl::KeyAlgorithm)j, (QSsl::EncodingFormat)i);
+ if(!key.isNull())
+ goto showKey;
+ }
+ }
+ }
+
+ showKey:
+ showKeyState(key);
+ widgetHasChanged();
+}
+
+void IdentitiesSettingsPage::showKeyState(const QSslKey &key) {
+ if(key.isNull()) {
+ ui.keyTypeLabel->setText(tr("No Key loaded"));
+ ui.clearOrLoadKeyButton->setText(tr("Load"));
+ } else {
+ switch(key.algorithm()) {
+ case QSsl::Rsa:
+ ui.keyTypeLabel->setText(tr("RSA"));
+ break;
+ case QSsl::Dsa:
+ ui.keyTypeLabel->setText(tr("DSA"));
+ break;
+ default:
+ ui.keyTypeLabel->setText(tr("No Key Loaded"));
+ }
+ ui.clearOrLoadKeyButton->setText(tr("Clear"));
+ }
+ ui.keyTypeLabel->setProperty("sslKey", key.toPem());
+ ui.keyTypeLabel->setProperty("sslKeyType", (int)key.algorithm());
+}
+
+void IdentitiesSettingsPage::on_clearOrLoadCertButton_clicked() {
+ QSslCertificate cert;
+
+ if(ui.certOrgLabel->property("sslCert").toByteArray().isEmpty()) {
+ QString certFileName = QFileDialog::getOpenFileName(this, tr("Load a Certificate"), QDesktopServices::storageLocation(QDesktopServices::HomeLocation));
+ QFile certFile(certFileName);
+ certFile.open(QIODevice::ReadOnly);
+ QByteArray certRaw = certFile.read(2 << 20);
+ certFile.close();
+
+ for(int i = 0; i < 2; i++) {
+ cert = QSslCertificate(certRaw, (QSsl::EncodingFormat)i);
+ if(cert.isValid())
+ break;
+ }
+ }
+
+ showCertState(cert);
+ widgetHasChanged();
+}
+
+void IdentitiesSettingsPage::showCertState(const QSslCertificate &cert) {
+ if(!cert.isValid()) {
+ ui.certOrgLabel->setText(tr("No Certificate loaded"));
+ ui.certCNameLabel->setText(tr("No Certificate loaded"));
+ ui.clearOrLoadCertButton->setText(tr("Load"));
+ } else {
+ ui.certOrgLabel->setText(cert.subjectInfo(QSslCertificate::Organization));
+ ui.certCNameLabel->setText(cert.subjectInfo(QSslCertificate::CommonName));
+ ui.clearOrLoadCertButton->setText(tr("Clear"));
+ }
+ ui.certOrgLabel->setProperty("sslCert", cert.toPem());
+ }
+
/*****************************************************************************************/
-CreateIdentityDlg::CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent) : QDialog(parent) {
+CreateIdentityDlg::CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent)
+ : QDialog(parent)
+{
ui.setupUi(this);
ui.identityList->setModel(model); // now we use the identity list of the main page... Trolltech <3
/*********************************************************************************************/
-SaveIdentitiesDlg::SaveIdentitiesDlg(const QList<Identity *> &toCreate, const QList<Identity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent)
- : QDialog(parent) { //, toCreate(tocreate), toUpdate(toupdate), toRemove(toremove) {
+SaveIdentitiesDlg::SaveIdentitiesDlg(const QList<CertIdentity *> &toCreate, const QList<CertIdentity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent)
+ : QDialog(parent)
+{
ui.setupUi(this);
ui.abort->setIcon(SmallIcon("dialog-cancel"));
connect(Client::instance(), SIGNAL(identityCreated(IdentityId)), this, SLOT(clientEvent()));
connect(Client::instance(), SIGNAL(identityRemoved(IdentityId)), this, SLOT(clientEvent()));
- foreach(Identity *id, toCreate) {
+ foreach(CertIdentity *id, toCreate) {
Client::createIdentity(*id);
}
- foreach(Identity *id, toUpdate) {
+ foreach(CertIdentity *id, toUpdate) {
const Identity *cid = Client::identity(id->id());
if(!cid) {
qWarning() << "Invalid client identity!";
}
connect(cid, SIGNAL(updatedRemotely()), this, SLOT(clientEvent()));
Client::updateIdentity(id->id(), id->toVariantMap());
+ id->requestUpdateSslSettings();
}
foreach(IdentityId id, toRemove) {
Client::removeIdentity(id);
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
***************************************************************************/
-#ifndef _IDENTITIESSETTINGSPAGE_H_
-#define _IDENTITIESSETTINGSPAGE_H_
+#ifndef IDENTITIESSETTINGSPAGE_H
+#define IDENTITIESSETTINGSPAGE_H
-#include "identity.h"
+#include "clientidentity.h"
#include "settingspage.h"
#include "ui_identitiessettingspage.h"
class IdentitiesSettingsPage : public SettingsPage {
Q_OBJECT
- public:
- IdentitiesSettingsPage(QWidget *parent = 0);
+public:
+ IdentitiesSettingsPage(QWidget *parent = 0);
- bool aboutToSave();
+ bool aboutToSave();
- public slots:
- void save();
- void load();
+public slots:
+ void save();
+ void load();
- private slots:
- void coreConnectionStateChanged(bool);
- void clientIdentityCreated(IdentityId);
- void clientIdentityUpdated();
- void clientIdentityRemoved(IdentityId);
+private slots:
+ void coreConnectionStateChanged(bool);
+ void clientIdentityCreated(IdentityId);
+ void clientIdentityUpdated();
+ void clientIdentityRemoved(IdentityId);
- void on_identityList_currentIndexChanged(int index);
+ void on_identityList_currentIndexChanged(int index);
- void on_addIdentity_clicked();
- void on_deleteIdentity_clicked();
- void on_renameIdentity_clicked();
+ void on_addIdentity_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();
+ void on_addNick_clicked();
+ void on_deleteNick_clicked();
+ void on_renameNick_clicked();
+ void on_nickUp_clicked();
+ void on_nickDown_clicked();
- void widgetHasChanged();
- void setWidgetStates();
+ void on_continueUnsecured_clicked();
+ void on_clearOrLoadKeyButton_clicked();
+ void on_clearOrLoadCertButton_clicked();
+ void widgetHasChanged();
+ void setWidgetStates();
- private:
- Ui::IdentitiesSettingsPage ui;
+private:
+ Ui::IdentitiesSettingsPage ui;
- QHash<IdentityId, Identity *> identities;
- IdentityId currentId;
+ QHash<IdentityId, CertIdentity *> identities;
+ IdentityId currentId;
- QList<IdentityId> changedIdentities; // for setting the widget changed state
- QList<IdentityId> deletedIdentities;
+ QList<IdentityId> changedIdentities; // for setting the widget changed state
+ QList<IdentityId> deletedIdentities;
- void insertIdentity(Identity *identity);
- void removeIdentity(Identity *identity);
- void renameIdentity(IdentityId id, const QString &newName);
- void displayIdentity(Identity *, bool dontsave = false);
- void saveToIdentity(Identity *);
+ bool _editSsl;
- bool testHasChanged();
+ void insertIdentity(CertIdentity *identity);
+ void removeIdentity(Identity *identity);
+ void renameIdentity(IdentityId id, const QString &newName);
+ void displayIdentity(CertIdentity *, bool dontsave = false);
+ void saveToIdentity(CertIdentity *);
+
+ void showKeyState(const QSslKey &key);
+ void showCertState(const QSslCertificate &cert);
+
+ bool testHasChanged();
};
class CreateIdentityDlg : public QDialog {
Q_OBJECT
- public:
- CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = 0);
+public:
+ CreateIdentityDlg(QAbstractItemModel *model, QWidget *parent = 0);
- QString identityName() const;
- IdentityId duplicateId() const;
+ QString identityName() const;
+ IdentityId duplicateId() const;
- private slots:
- void on_identityName_textChanged(const QString &text);
+private slots:
+ void on_identityName_textChanged(const QString &text);
- private:
- Ui::CreateIdentityDlg ui;
+private:
+ Ui::CreateIdentityDlg ui;
};
class SaveIdentitiesDlg : public QDialog {
Q_OBJECT
- public:
- SaveIdentitiesDlg(const QList<Identity *> &toCreate, const QList<Identity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent = 0);
-
- private slots:
- void clientEvent();
-
- private:
- Ui::SaveIdentitiesDlg ui;
+public:
+ SaveIdentitiesDlg(const QList<CertIdentity *> &toCreate, const QList<CertIdentity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent = 0);
- //QList<Identity *> toCreate, toUpdate;
- //QList<IdentityId> toRemove;
+private slots:
+ void clientEvent();
- int numevents, rcvevents;
+private:
+ Ui::SaveIdentitiesDlg ui;
+ int numevents, rcvevents;
};
class NickEditDlg : public QDialog {
Q_OBJECT
- public:
- NickEditDlg(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
+public:
+ NickEditDlg(const QString &oldnick, const QStringList &existing = QStringList(), QWidget *parent = 0);
- QString nick() const;
+ QString nick() const;
- private slots:
- void on_nickEdit_textChanged(const QString &);
+private slots:
+ void on_nickEdit_textChanged(const QString &);
- private:
- Ui::NickEditDlg ui;
+private:
+ Ui::NickEditDlg ui;
- QString oldNick;
- QStringList existing;
+ QString oldNick;
+ QStringList existing;
};
<rect>
<x>0</x>
<y>0</y>
- <width>602</width>
- <height>450</height>
+ <width>430</width>
+ <height>492</height>
</rect>
</property>
<property name="windowTitle" >
<string/>
</property>
- <layout class="QVBoxLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout_13" >
<item>
- <layout class="QVBoxLayout" >
+ <layout class="QHBoxLayout" >
<item>
- <layout class="QHBoxLayout" >
+ <widget class="QComboBox" name="identityList" >
+ <property name="insertPolicy" >
+ <enum>QComboBox::InsertAtBottom</enum>
+ </property>
+ <property name="duplicatesEnabled" >
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="renameIdentity" >
+ <property name="toolTip" >
+ <string>Rename Identity</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/22x22/actions/oxygen/22x22/actions/edit-rename.png</normaloff>:/22x22/actions/oxygen/22x22/actions/edit-rename.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="addIdentity" >
+ <property name="toolTip" >
+ <string>Add Identity</string>
+ </property>
+ <property name="text" >
+ <string>Add...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/22x22/actions/oxygen/22x22/actions/list-add-user.png</normaloff>:/22x22/actions/oxygen/22x22/actions/list-add-user.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ <property name="toolButtonStyle" >
+ <enum>Qt::ToolButtonIconOnly</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="deleteIdentity" >
+ <property name="toolTip" >
+ <string>Remove Identity</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</normaloff>:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>22</width>
+ <height>22</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QTabWidget" name="tabWidget" >
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="generalTab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>399</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>General</string>
+ </attribute>
+ <layout class="QVBoxLayout" >
<item>
- <widget class="QComboBox" name="identityList" >
- <property name="insertPolicy" >
- <enum>QComboBox::InsertAtBottom</enum>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="label" >
+ <property name="text" >
+ <string>Real Name:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="realName" >
+ <property name="whatsThis" >
+ <string>The "Real Name" is shown in /whois.</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox" >
+ <property name="title" >
+ <string>Nicknames</string>
</property>
- <property name="duplicatesEnabled" >
- <bool>true</bool>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QListWidget" name="nicknameList" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+ <horstretch>1</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="showDropIndicator" stdset="0" >
+ <bool>true</bool>
+ </property>
+ <property name="dragEnabled" >
+ <bool>false</bool>
+ </property>
+ <property name="dragDropMode" >
+ <enum>QAbstractItemView::NoDragDrop</enum>
+ </property>
+ <property name="selectionBehavior" >
+ <enum>QAbstractItemView::SelectRows</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QVBoxLayout" >
+ <item>
+ <widget class="QPushButton" name="addNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Add Nickname</string>
+ </property>
+ <property name="text" >
+ <string>&Add...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/list-add.png</normaloff>:/16x16/actions/oxygen/16x16/actions/list-add.png</iconset>
+ </property>
+ <property name="iconSize" >
+ <size>
+ <width>16</width>
+ <height>16</height>
+ </size>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="deleteNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Remove Nickname</string>
+ </property>
+ <property name="text" >
+ <string>Remove</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/edit-delete.png</normaloff>:/16x16/actions/oxygen/16x16/actions/edit-delete.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="renameNick" >
+ <property name="sizePolicy" >
+ <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="toolTip" >
+ <string>Rename Identity</string>
+ </property>
+ <property name="text" >
+ <string>Re&name...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/edit-rename.png</normaloff>:/16x16/actions/oxygen/16x16/actions/edit-rename.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QToolButton" name="nickUp" >
+ <property name="toolTip" >
+ <string>Move upwards in list</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/go-up.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-up.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QToolButton" name="nickDown" >
+ <property name="toolTip" >
+ <string>Move downwards in list</string>
+ </property>
+ <property name="text" >
+ <string>...</string>
+ </property>
+ <property name="icon" >
+ <iconset>
+ <normaloff>:/16x16/actions/oxygen/16x16/actions/go-down.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-down.png</iconset>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>0</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>124</width>
+ <height>76</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="awayTab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>399</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>A&way</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_4" >
+ <item>
+ <widget class="QGroupBox" name="groupBox_2" >
+ <property name="title" >
+ <string>Default Away Settings</string>
</property>
+ <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="awayNick" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Nick to be used when being away</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0" >
+ <widget class="QCheckBox" name="awayReasonEnabled" >
+ <property name="toolTip" >
+ <string>Default away reason</string>
+ </property>
+ <property name="text" >
+ <string>Away Reason</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="awayReason" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Default away reason</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="awayNickEnabled" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Nick to be used when being away</string>
+ </property>
+ <property name="text" >
+ <string>Away Nick</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QToolButton" name="renameIdentity" >
+ <widget class="QGroupBox" name="detachAwayEnabled" >
<property name="toolTip" >
- <string>Rename Identity</string>
+ <string>Set away when all clients have detached from the core</string>
</property>
- <property name="text" >
- <string>...</string>
+ <property name="title" >
+ <string>Away On Detach</string>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/22x22/actions/oxygen/22x22/actions/edit-rename.png</normaloff>:/22x22/actions/oxygen/22x22/actions/edit-rename.png</iconset>
+ <property name="checkable" >
+ <bool>true</bool>
</property>
- <property name="iconSize" >
- <size>
- <width>22</width>
- <height>22</height>
- </size>
+ <property name="checked" >
+ <bool>false</bool>
</property>
+ <layout class="QVBoxLayout" name="verticalLayout" >
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout" >
+ <item>
+ <widget class="QCheckBox" name="detachAwayReasonEnabled" >
+ <property name="toolTip" >
+ <string>Override default away reason for auto-away on detach</string>
+ </property>
+ <property name="text" >
+ <string>Away Reason</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLineEdit" name="detachAwayReason" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ <property name="toolTip" >
+ <string>Override default away reason for auto-away on detach</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QToolButton" name="addIdentity" >
- <property name="toolTip" >
- <string>Add Identity</string>
+ <widget class="QGroupBox" name="autoAwayEnabled" >
+ <property name="enabled" >
+ <bool>false</bool>
</property>
- <property name="text" >
- <string>Add...</string>
+ <property name="toolTip" >
+ <string>Not implemented yet</string>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/22x22/actions/oxygen/22x22/actions/list-add-user.png</normaloff>:/22x22/actions/oxygen/22x22/actions/list-add-user.png</iconset>
+ <property name="title" >
+ <string>Away On Idle</string>
</property>
- <property name="iconSize" >
- <size>
- <width>22</width>
- <height>22</height>
- </size>
+ <property name="checkable" >
+ <bool>true</bool>
</property>
- <property name="toolButtonStyle" >
- <enum>Qt::ToolButtonIconOnly</enum>
+ <property name="checked" >
+ <bool>false</bool>
</property>
+ <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <item>
+ <layout class="QHBoxLayout" >
+ <item>
+ <widget class="QLabel" name="autoAwayLabel_1" >
+ <property name="text" >
+ <string>Set away after</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QSpinBox" name="autoAwayTime" />
+ </item>
+ <item>
+ <widget class="QLabel" name="autoAwayLabel_2" >
+ <property name="text" >
+ <string>minutes of being idle</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QGridLayout" >
+ <item row="0" column="0" >
+ <widget class="QCheckBox" name="autoAwayReasonEnabled" >
+ <property name="text" >
+ <string>Away Reason</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="autoAwayReason" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
</widget>
</item>
<item>
- <widget class="QToolButton" name="deleteIdentity" >
- <property name="toolTip" >
- <string>Remove Identity</string>
- </property>
- <property name="text" >
- <string>...</string>
+ <spacer>
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</normaloff>:/22x22/actions/oxygen/22x22/actions/list-remove-user.png</iconset>
- </property>
- <property name="iconSize" >
+ <property name="sizeHint" stdset="0" >
<size>
- <width>22</width>
- <height>22</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
- </widget>
+ </spacer>
</item>
</layout>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget" >
- <property name="currentIndex" >
- <number>0</number>
- </property>
- <widget class="QWidget" name="generalTab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>570</width>
- <height>355</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>General</string>
- </attribute>
- <layout class="QVBoxLayout" >
+ </widget>
+ <widget class="QWidget" name="advancedTab" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>400</width>
+ <height>399</height>
+ </rect>
+ </property>
+ <attribute name="title" >
+ <string>Advanced</string>
+ </attribute>
+ <layout class="QVBoxLayout" name="verticalLayout_12" >
+ <item>
+ <layout class="QHBoxLayout" >
<item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QLabel" name="label" >
- <property name="text" >
- <string>Real Name:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="realName" >
- <property name="whatsThis" >
- <string>The "Real Name" is shown in /whois.</string>
- </property>
- </widget>
- </item>
- </layout>
+ <widget class="QLabel" name="label_2" >
+ <property name="text" >
+ <string>Ident:</string>
+ </property>
+ </widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox" >
- <property name="title" >
- <string>Nicknames</string>
+ <widget class="QLineEdit" name="ident" >
+ <property name="whatsThis" >
+ <string>The "ident" is part of your hostmask and, together with your host, uniquely identifies you within the IRC network.</string>
</property>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QListWidget" name="nicknameList" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
- <horstretch>1</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="showDropIndicator" stdset="0" >
- <bool>true</bool>
- </property>
- <property name="dragEnabled" >
- <bool>false</bool>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_3" >
+ <property name="title" >
+ <string>Messages</string>
+ </property>
+ <layout class="QVBoxLayout" >
+ <item>
+ <layout class="QGridLayout" >
+ <item row="1" column="0" >
+ <widget class="QLabel" name="label_3" >
+ <property name="text" >
+ <string>Part Reason:</string>
</property>
- <property name="dragDropMode" >
- <enum>QAbstractItemView::NoDragDrop</enum>
+ </widget>
+ </item>
+ <item row="1" column="1" >
+ <widget class="QLineEdit" name="partReason" />
+ </item>
+ <item row="0" column="1" >
+ <widget class="QLineEdit" name="kickReason" />
+ </item>
+ <item row="2" column="0" >
+ <widget class="QLabel" name="label_5" >
+ <property name="text" >
+ <string>Quit Reason:</string>
</property>
- <property name="selectionBehavior" >
- <enum>QAbstractItemView::SelectRows</enum>
+ </widget>
+ </item>
+ <item row="2" column="1" >
+ <widget class="QLineEdit" name="quitReason" />
+ </item>
+ <item row="0" column="0" >
+ <widget class="QLabel" name="label_4" >
+ <property name="text" >
+ <string>Kick Reason:</string>
</property>
</widget>
</item>
- <item>
- <layout class="QVBoxLayout" >
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QStackedWidget" name="keyAndCertSettings" >
+ <property name="styleSheet" >
+ <string notr="true" />
+ </property>
+ <property name="lineWidth" >
+ <number>0</number>
+ </property>
+ <property name="currentIndex" >
+ <number>0</number>
+ </property>
+ <widget class="QWidget" name="pageNoSsl" >
+ <layout class="QVBoxLayout" name="verticalLayout_8" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox_6" >
+ <property name="title" >
+ <string/>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_9" >
<item>
- <widget class="QPushButton" name="addNick" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" >
- <string>Add Nickname</string>
- </property>
+ <widget class="QLabel" name="label_8" >
<property name="text" >
- <string>&Add...</string>
+ <string>You need an SSL Capable Client to edit your Cores SSL Key and Certificate</string>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/list-add.png</normaloff>:/16x16/actions/oxygen/16x16/actions/list-add.png</iconset>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
</property>
- <property name="iconSize" >
- <size>
- <width>16</width>
- <height>16</height>
- </size>
+ <property name="wordWrap" >
+ <bool>true</bool>
</property>
</widget>
</item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="pageUnsecure" >
+ <layout class="QVBoxLayout" name="verticalLayout_7" >
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox_5" >
+ <property name="title" >
+ <string/>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_6" >
<item>
- <widget class="QPushButton" name="deleteNick" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" >
- <string>Remove Nickname</string>
- </property>
+ <widget class="QLabel" name="label_7" >
<property name="text" >
- <string>Remove</string>
- </property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/edit-delete.png</normaloff>:/16x16/actions/oxygen/16x16/actions/edit-delete.png</iconset>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="renameNick" >
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Fixed" hsizetype="Preferred" >
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="toolTip" >
- <string>Rename Identity</string>
+ <string>Warning: you are not connected with a secured connection to the Quassel Core!
+Proceeding will cause an unencrypted transfer of your SSL Key and SSL Certificate!</string>
</property>
- <property name="text" >
- <string>Re&name...</string>
+ <property name="alignment" >
+ <set>Qt::AlignCenter</set>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/edit-rename.png</normaloff>:/16x16/actions/oxygen/16x16/actions/edit-rename.png</iconset>
+ <property name="wordWrap" >
+ <bool>true</bool>
</property>
</widget>
</item>
<item>
- <layout class="QHBoxLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout_2" >
<item>
- <spacer>
+ <spacer name="horizontalSpacer" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>0</width>
+ <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
- <widget class="QToolButton" name="nickUp" >
- <property name="toolTip" >
- <string>Move upwards in list</string>
- </property>
+ <widget class="QPushButton" name="continueUnsecured" >
<property name="text" >
- <string>...</string>
- </property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/go-up.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-up.png</iconset>
+ <string>continue</string>
</property>
</widget>
</item>
<item>
- <widget class="QToolButton" name="nickDown" >
- <property name="toolTip" >
- <string>Move downwards in list</string>
+ <spacer name="horizontalSpacer_3" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
</property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <widget class="QWidget" name="pageEditSsl" >
+ <property name="geometry" >
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>360</width>
+ <height>173</height>
+ </rect>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_11" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
+ <property name="margin" >
+ <number>0</number>
+ </property>
+ <item>
+ <widget class="QGroupBox" name="groupBox_4" >
+ <property name="styleSheet" >
+ <string notr="true" />
+ </property>
+ <property name="title" >
+ <string>Use SSL Key</string>
+ </property>
+ <property name="checkable" >
+ <bool>false</bool>
+ </property>
+ <property name="checked" >
+ <bool>false</bool>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_5" >
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_3" >
+ <item>
+ <widget class="QLabel" name="label_6" >
<property name="text" >
- <string>...</string>
+ <string>Key Type:</string>
</property>
- <property name="icon" >
- <iconset>
- <normaloff>:/16x16/actions/oxygen/16x16/actions/go-down.png</normaloff>:/16x16/actions/oxygen/16x16/actions/go-down.png</iconset>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="keyTypeLabel" >
+ <property name="text" >
+ <string>No Key loaded</string>
</property>
</widget>
</item>
<item>
- <spacer>
+ <spacer name="horizontalSpacer_2" >
<property name="orientation" >
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0" >
<size>
- <width>0</width>
+ <width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
+ <item>
+ <widget class="QPushButton" name="clearOrLoadKeyButton" >
+ <property name="text" >
+ <string>Load</string>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>124</width>
- <height>76</height>
- </size>
- </property>
- </spacer>
- </item>
</layout>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="awayTab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>570</width>
- <height>355</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>A&way</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_4" >
- <item>
- <widget class="QGroupBox" name="groupBox_2" >
- <property name="title" >
- <string>Default Away Settings</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
- <item>
- <layout class="QGridLayout" >
- <item row="0" column="1" >
- <widget class="QLineEdit" name="awayNick" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string>Nick to be used when being away</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0" >
- <widget class="QCheckBox" name="awayReasonEnabled" >
- <property name="toolTip" >
- <string>Default away reason</string>
- </property>
- <property name="text" >
- <string>Away Reason</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="awayReason" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string>Default away reason</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0" >
- <widget class="QCheckBox" name="awayNickEnabled" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string>Nick to be used when being away</string>
- </property>
- <property name="text" >
- <string>Away Nick</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="detachAwayEnabled" >
- <property name="toolTip" >
- <string>Set away when all clients have detached from the core</string>
- </property>
- <property name="title" >
- <string>Away On Detach</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <property name="checked" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout" >
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout" >
- <item>
- <widget class="QCheckBox" name="detachAwayReasonEnabled" >
- <property name="toolTip" >
- <string>Override default away reason for auto-away on detach</string>
- </property>
- <property name="text" >
- <string>Away Reason</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="detachAwayReason" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string>Override default away reason for auto-away on detach</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="autoAwayEnabled" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- <property name="toolTip" >
- <string>Not implemented yet</string>
- </property>
- <property name="title" >
- <string>Away On Idle</string>
- </property>
- <property name="checkable" >
- <bool>true</bool>
- </property>
- <property name="checked" >
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QLabel" name="autoAwayLabel_1" >
- <property name="text" >
- <string>Set away after</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QSpinBox" name="autoAwayTime" />
- </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox_7" >
+ <property name="title" >
+ <string>Use SSL Certificate</string>
+ </property>
+ <layout class="QHBoxLayout" name="horizontalLayout_6" >
+ <property name="spacing" >
+ <number>0</number>
+ </property>
<item>
- <widget class="QLabel" name="autoAwayLabel_2" >
- <property name="text" >
- <string>minutes of being idle</string>
+ <layout class="QVBoxLayout" name="verticalLayout_10" >
+ <property name="spacing" >
+ <number>0</number>
</property>
- </widget>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_4" >
+ <property name="spacing" >
+ <number>8</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_9" >
+ <property name="text" >
+ <string>Organisation:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="certOrgLabel" >
+ <property name="text" >
+ <string>No Certificate loaded</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_4" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout_5" >
+ <property name="spacing" >
+ <number>8</number>
+ </property>
+ <item>
+ <widget class="QLabel" name="label_10" >
+ <property name="text" >
+ <string>CommonName:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="certCNameLabel" >
+ <property name="text" >
+ <string>No Certificate loaded</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_5" >
+ <property name="orientation" >
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </item>
+ </layout>
</item>
<item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QGridLayout" >
- <item row="0" column="0" >
- <widget class="QCheckBox" name="autoAwayReasonEnabled" >
- <property name="text" >
- <string>Away Reason</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="autoAwayReason" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
- </widget>
+ <layout class="QVBoxLayout" name="verticalLayout_14" >
+ <item>
+ <widget class="QPushButton" name="clearOrLoadCertButton" >
+ <property name="text" >
+ <string>Load</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
</item>
</layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="advancedTab" >
- <property name="geometry" >
- <rect>
- <x>0</x>
- <y>0</y>
- <width>570</width>
- <height>355</height>
- </rect>
- </property>
- <attribute name="title" >
- <string>Advanced</string>
- </attribute>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QHBoxLayout" >
- <item>
- <widget class="QLabel" name="label_2" >
- <property name="text" >
- <string>Ident:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QLineEdit" name="ident" >
- <property name="whatsThis" >
- <string>The "ident" is part of your hostmask and, together with your host, uniquely identifies you within the IRC network.</string>
- </property>
</widget>
</item>
</layout>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3" >
- <property name="title" >
- <string>Messages</string>
- </property>
- <layout class="QVBoxLayout" >
- <item>
- <layout class="QGridLayout" >
- <item row="1" column="0" >
- <widget class="QLabel" name="label_3" >
- <property name="text" >
- <string>Part Reason:</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1" >
- <widget class="QLineEdit" name="partReason" />
- </item>
- <item row="0" column="1" >
- <widget class="QLineEdit" name="kickReason" />
- </item>
- <item row="2" column="0" >
- <widget class="QLabel" name="label_5" >
- <property name="text" >
- <string>Quit Reason:</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1" >
- <widget class="QLineEdit" name="quitReason" />
- </item>
- <item row="0" column="0" >
- <widget class="QLabel" name="label_4" >
- <property name="text" >
- <string>Kick Reason:</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer>
- <property name="orientation" >
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0" >
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
+ </widget>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer" >
+ <property name="orientation" >
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0" >
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
</item>
</layout>
</widget>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
- <x>126</x>
- <y>327</y>
+ <x>157</x>
+ <y>382</y>
</hint>
<hint type="destinationlabel" >
- <x>315</x>
- <y>328</y>
+ <x>454</x>
+ <y>382</y>
</hint>
</hints>
</connection>
<slot>setEnabled(bool)</slot>
<hints>
<hint type="sourcelabel" >
- <x>33</x>
- <y>214</y>
+ <x>64</x>
+ <y>256</y>
</hint>
<hint type="destinationlabel" >
- <x>204</x>
- <y>218</y>
+ <x>343</x>
+ <y>256</y>
</hint>
</hints>
</connection>
#include "buffermodel.h"
#include "buffersettings.h"
#include "iconloader.h"
-#include "identity.h"
+#include "clientidentity.h"
#include "network.h"
#include "util.h"
//! This is the fallback version number in case we can't autogenerate one
baseVersion = "0.3.1";
-protocolVersion = 8; //< Version of the client/core protocol
-coreNeedsProtocol = 8; //< Minimum protocol version the core needs
-clientNeedsProtocol = 8; //< Minimum protocol version the client needs
+protocolVersion = 9; //< Version of the client/core protocol
+coreNeedsProtocol = 9; //< Minimum protocol version the core needs
+clientNeedsProtocol = 9; //< Minimum protocol version the client needs
distCommittish = $Format:%H$
distCommitDate = $Format:%at$