X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fnetworkssettingspage.h;h=73bee52c1eedbac9e9a4e0d3f75b82e852c98625;hb=HEAD;hp=fe82c500b72e95fb98d6abaf6a095435115a26d6;hpb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;p=quassel.git diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h index fe82c500..99fe92e5 100644 --- a/src/qtui/settingspages/networkssettingspage.h +++ b/src/qtui/settingspages/networkssettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2018 by the Quassel Project * + * Copyright (C) 2005-2022 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -27,6 +27,7 @@ #include "network.h" #include "settingspage.h" +#include "ui_capseditdlg.h" #include "ui_networkadddlg.h" #include "ui_networkeditdlg.h" #include "ui_networkssettingspage.h" @@ -92,9 +93,7 @@ private slots: */ void clientNetworkCapsUpdated(); -#ifdef HAVE_SSL void sslUpdated(); -#endif void on_networkList_itemSelectionChanged(); void on_addNetwork_clicked(); @@ -116,6 +115,16 @@ private slots: */ void on_saslStatusDetails_clicked(); + /** + * Event handler for Features status Details button + */ + void on_enableCapsStatusDetails_clicked(); + + /** + * Event handler for Features Advanced edit button + */ + void on_enableCapsAdvanced_clicked(); + private: /** * Status of capability support @@ -134,16 +143,15 @@ private: NetworkId currentId; QHash networkInfos; bool _ignoreWidgetChanges{false}; -#ifdef HAVE_SSL CertIdentity* _cid{nullptr}; -#endif QIcon connectedIcon, connectingIcon, disconnectedIcon; // Status icons - QIcon infoIcon, warningIcon; + QIcon infoIcon, successIcon, unavailableIcon, questionIcon; - CapSupportStatus _saslStatusSelected; /// Status of SASL support for currently-selected network + CapSupportStatus _capSaslStatusSelected; ///< Status of SASL support for selected network + bool _capSaslStatusUsingExternal{false}; ///< Whether SASL support status is for SASL EXTERNAL void reset(); bool testHasChanged(); @@ -153,12 +161,20 @@ private: void saveToNetworkInfo(NetworkInfo&); IdentityId defaultIdentity() const; + /** + * Get whether or not the displayed network's identity has SSL certs associated with it + * + * @return True if the currently displayed network has SSL certs set, otherwise false + */ + bool displayedNetworkHasCertId() const; + /** * Update the SASL settings interface according to the given SASL state * - * @param[in] saslStatus Current status of SASL support. + * @param saslStatus Current status of SASL support. + * @param usingSASLExternal If true, SASL support status is for SASL EXTERNAL, else SASL PLAIN */ - void setSASLStatus(const CapSupportStatus saslStatus); + void setCapSASLStatus(const CapSupportStatus saslStatus, bool usingSASLExternal = false); }; class NetworkAddDlg : public QDialog @@ -233,6 +249,25 @@ private: Ui::ServerEditDlg ui; }; +class CapsEditDlg : public QDialog +{ + Q_OBJECT + +public: + CapsEditDlg(const QString& oldSkipCapsString, QWidget* parent = nullptr); + + QString skipCapsString() const; + +private slots: + void defaultSkipCaps(); + void on_skipCapsEdit_textChanged(const QString&); + +private: + Ui::CapsEditDlg ui; + + QString oldSkipCapsString; +}; + class SaveNetworksDlg : public QDialog { Q_OBJECT