X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fnetworkssettingspage.h;h=095e9964a5c921ea8560168fc75c1069c9a1455b;hp=e88f281df09f15ec6509e16a70e0702b26a7cb08;hb=a65f42197839da536975b3e2858eedcef420035f;hpb=d5b5dab4ffbdbf30612f49cb77e000ad07b800c2 diff --git a/src/qtui/settingspages/networkssettingspage.h b/src/qtui/settingspages/networkssettingspage.h index e88f281d..095e9964 100644 --- a/src/qtui/settingspages/networkssettingspage.h +++ b/src/qtui/settingspages/networkssettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2019 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -47,6 +47,7 @@ public: public slots: void save(); void load(); + void bufferList_Open(NetworkId); private slots: void widgetHasChanged(); @@ -58,6 +59,16 @@ private slots: void displayNetwork(NetworkId); void setItemState(NetworkId, QListWidgetItem *item = 0); + /** + * Reset the capability-dependent settings to the default unknown states + * + * For example, this updates the SASL text to indicate the status is unknown. Any actual + * information should be set by setNetworkCapStates() + * + * @see NetworksSettingsPage::setNetworkCapStates() + */ + void resetNetworkCapStates(); + /** * Update the capability-dependent settings according to what the server supports * @@ -100,7 +111,23 @@ private slots: void on_upServer_clicked(); void on_downServer_clicked(); + /** + * Event handler for SASL status Details button + */ + void on_saslStatusDetails_clicked(); + private: + /** + * Status of capability support + */ + enum CapSupportStatus { + Unknown, ///< Old core, or otherwise unknown, can't make assumptions + Disconnected, ///< Disconnected from network, can't determine + MaybeUnsupported, ///< Server does not advertise support at this moment + MaybeSupported ///< Server advertises support at this moment + }; + // Keep in mind networks can add, change, and remove capabilities at any time. + Ui::NetworksSettingsPage ui; NetworkId currentId; @@ -112,6 +139,11 @@ private: QIcon connectedIcon, connectingIcon, disconnectedIcon; + // Status icons + QIcon infoIcon, warningIcon; + + CapSupportStatus _saslStatusSelected; /// Status of SASL support for currently-selected network + void reset(); bool testHasChanged(); QListWidgetItem *insertNetwork(NetworkId); @@ -119,6 +151,13 @@ private: QListWidgetItem *networkItem(NetworkId) const; void saveToNetworkInfo(NetworkInfo &); IdentityId defaultIdentity() const; + + /** + * Update the SASL settings interface according to the given SASL state + * + * @param[in] saslStatus Current status of SASL support. + */ + void setSASLStatus(const CapSupportStatus saslStatus); };