X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fchannellistdlg.h;h=cfa45a3df8bde4103caa06ea520a3d5c47462f76;hp=e8a01ff34d8e7caa4c3ec5d8df43cac216c7a834;hb=158443f71d48215eea8b47b836b61afd77654b78;hpb=68878dc8366f2f4a0afe132847aad9a51a80cdbf diff --git a/src/qtui/channellistdlg.h b/src/qtui/channellistdlg.h index e8a01ff3..cfa45a3d 100644 --- a/src/qtui/channellistdlg.h +++ b/src/qtui/channellistdlg.h @@ -36,12 +36,27 @@ class ChannelListDlg : public QDialog Q_OBJECT public: - ChannelListDlg(QWidget *parent = 0); + ChannelListDlg(QWidget *parent = nullptr); void setNetwork(NetworkId netId); -protected slots: + /** + * Set the channel search string, enabling advanced mode if needed + * + * Sets the channel name search text to the specified string, enabling advanced mode. If search + * string is empty, advanced mode will be automatically hidden. + * + * @param channelFilters Partial channel name to search for, or empty to not filter by name + */ + void setChannelFilters(const QString &channelFilters); + +public slots: + /** + * Request a channel listing using any parameters set in the UI + */ void requestSearch(); + +protected slots: void receiveChannelList(const NetworkId &netId, const QStringList &channelFilters, const QList &channelList); void reportFinishedList(); void joinChannel(const QModelIndex &); @@ -56,14 +71,19 @@ private: void enableQuery(bool enable); void setAdvancedMode(bool advanced); + /** + * Update the focus of input widgets according to dialog state + */ + void updateInputFocus(); + Ui::ChannelListDlg ui; - bool _listFinished; + bool _listFinished{true}; NetworkId _netId; IrcListModel _ircListModel; QSortFilterProxyModel _sortFilter; - QSpacerItem *_simpleModeSpacer; - bool _advancedMode; + QSpacerItem *_simpleModeSpacer{nullptr}; + bool _advancedMode{false}; };