X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fcorehighlightsettingspage.h;h=9ef0bc21c559f95da40f133c5087a1234e94a022;hp=2820850aca4b15e970d2ae6748047b030ef36c47;hb=6a51298c1f18613e9b64ee746e7f846dfcd05290;hpb=ebe14ade2f3496aefc8926ce704a161c4451fedd diff --git a/src/qtui/settingspages/corehighlightsettingspage.h b/src/qtui/settingspages/corehighlightsettingspage.h index 2820850a..9ef0bc21 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.h +++ b/src/qtui/settingspages/corehighlightsettingspage.h @@ -34,40 +34,49 @@ class CoreHighlightSettingsPage : public SettingsPage Q_OBJECT public: - CoreHighlightSettingsPage(QWidget *parent = 0); + explicit CoreHighlightSettingsPage(QWidget *parent = nullptr); - bool hasDefaults() const; + bool hasDefaults() const override; public slots: - void save(); - void load(); - void defaults(); + void save() override; + void load() override; + void defaults() override; void revert(); void clientConnected(); private slots: void widgetHasChanged(); - void addNewRow(const QString &name = tr("highlight rule"), bool regex = false, bool cs = false, bool enable = true, - bool inverse = false, const QString &sender = "", const QString &chanName = "", bool self = false); - void removeSelectedRows(); - void selectRow(QTableWidgetItem *item); - void tableChanged(QTableWidgetItem *item); + void addNewHighlightRow(bool enable = true, const QString &name = tr("highlight rule"), bool regex = false, + bool cs = false, const QString &sender = "", const QString &chanName = "", + bool self = false); + void addNewIgnoredRow(bool enable = true, const QString &name = tr("highlight rule"), bool regex = false, + bool cs = false, const QString &sender = "", const QString &chanName = "", bool self = false); + void removeSelectedHighlightRows(); + void removeSelectedIgnoredRows(); + void selectHighlightRow(QTableWidgetItem *item); + void selectIgnoredRow(QTableWidgetItem *item); + void highlightTableChanged(QTableWidgetItem *item); + void ignoredTableChanged(QTableWidgetItem *item); private: Ui::CoreHighlightSettingsPage ui; HighlightRuleManager::HighlightRuleList highlightList; + HighlightRuleManager::HighlightRuleList ignoredList; enum column { - NameColumn = 0, - RegExColumn = 1, - CsColumn = 2, - EnableColumn = 3, - InverseColumn = 4, - SenderColumn = 5, - ChanColumn = 6, - ColumnCount = 7 + EnableColumn = 0, + NameColumn = 1, + RegExColumn = 2, + CsColumn = 3, + SenderColumn = 4, + ChanColumn = 5, + ColumnCount = 6 }; - void emptyTable(); + void emptyHighlightTable(); + void emptyIgnoredTable(); + + void setupRuleTable(QTableWidget *highlightTable) const; bool _initialized; };