X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fcorehighlightsettingspage.h;h=5859d00ce87f23445675639982df5c531fc48088;hb=777d91165d4548099d63f5ed216a2c457fee4029;hp=393f31ad9ee4a79eb2f49a2d8e3be4694f11e759;hpb=60ae6c56db55ea84c59ad1e589a0ff54abc057e1;p=quassel.git diff --git a/src/qtui/settingspages/corehighlightsettingspage.h b/src/qtui/settingspages/corehighlightsettingspage.h index 393f31ad..5859d00c 100644 --- a/src/qtui/settingspages/corehighlightsettingspage.h +++ b/src/qtui/settingspages/corehighlightsettingspage.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005-2016 by the Quassel Project * + * Copyright (C) 2005-2018 by the Quassel Project * * devel@quassel-irc.org * * * * This program is free software; you can redistribute it and/or modify * @@ -18,14 +18,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef _COREHIGHLIGHTSETTINGSPAGE_H_ -#define _COREHIGHLIGHTSETTINGSPAGE_H_ +#pragma once #include #include -#include +#include "highlightrulemanager.h" #include "settingspage.h" + #include "ui_corehighlightsettingspage.h" class CoreHighlightSettingsPage : public SettingsPage @@ -37,6 +37,8 @@ public: bool hasDefaults() const override; + bool isSelectable() const override; + public slots: void save() override; void load() override; @@ -45,6 +47,7 @@ public slots: void clientConnected(); private slots: + void coreConnectionStateChanged(bool state); void widgetHasChanged(); void addNewHighlightRow(bool enable = true, const QString &name = tr("highlight rule"), bool regex = false, bool cs = false, const QString &sender = "", const QString &chanName = "", @@ -53,15 +56,24 @@ private slots: bool cs = false, const QString &sender = "", const QString &chanName = "", bool self = false); void removeSelectedHighlightRows(); void removeSelectedIgnoredRows(); + void highlightNicksChanged(const int index); void selectHighlightRow(QTableWidgetItem *item); void selectIgnoredRow(QTableWidgetItem *item); void highlightTableChanged(QTableWidgetItem *item); void ignoredTableChanged(QTableWidgetItem *item); + /** Import local Highlight rules into the Core Highlight rules + * + * Iterates through all local highlight rules, converting each into core-side highlight rules. + */ + void importRules(); + private: Ui::CoreHighlightSettingsPage ui; + HighlightRuleManager::HighlightRuleList highlightList; HighlightRuleManager::HighlightRuleList ignoredList; + enum column { EnableColumn = 0, NameColumn = 1, @@ -79,6 +91,3 @@ private: bool _initialized; }; - - -#endif