/***************************************************************************
- * 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 *
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#ifndef _COREHIGHLIGHTSETTINGSPAGE_H_
-#define _COREHIGHLIGHTSETTINGSPAGE_H_
+#pragma once
#include <QVariantList>
#include <QTableWidgetItem>
-#include <highlightrulemanager.h>
+#include "highlightrulemanager.h"
#include "settingspage.h"
+
#include "ui_corehighlightsettingspage.h"
class CoreHighlightSettingsPage : public SettingsPage
bool hasDefaults() const override;
+ bool isSelectable() const override;
+
public slots:
void save() override;
void load() override;
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 = "",
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,
bool _initialized;
};
-
-
-#endif