X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fignorelistsettingspage.h;h=832eb410d359e4efce150c6f4b09c4b095ac01e9;hp=7dc687a7dc7ef397ec42ebc89a106671a0e92166;hb=c1cf157116de7fc3da96203aa6f03c38c7ebb650;hpb=30b159cb876a9495de42e9a3e70ca050516f0805 diff --git a/src/qtui/settingspages/ignorelistsettingspage.h b/src/qtui/settingspages/ignorelistsettingspage.h index 7dc687a7..832eb410 100644 --- a/src/qtui/settingspages/ignorelistsettingspage.h +++ b/src/qtui/settingspages/ignorelistsettingspage.h @@ -21,14 +21,15 @@ #ifndef IGNORELISTSETTINGSPAGE_H #define IGNORELISTSETTINGSPAGE_H -#include #include +#include +#include "clientignorelistmanager.h" +#include "ignorelistmodel.h" #include "settingspage.h" -#include "ui_ignorelistsettingspage.h" + #include "ui_ignorelisteditdlg.h" -#include "ignorelistmodel.h" -#include "clientignorelistmanager.h" +#include "ui_ignorelistsettingspage.h" class QEvent; class QPainter; @@ -40,20 +41,19 @@ class IgnoreListDelegate : public QStyledItemDelegate Q_OBJECT public: - IgnoreListDelegate(QWidget *parent = nullptr) : QStyledItemDelegate(parent) {} - void paint(QPainter *painter, const QStyleOptionViewItem &option, - const QModelIndex &index) const override; - bool editorEvent(QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, - const QModelIndex &index) override; + IgnoreListDelegate(QWidget* parent = nullptr) + : QStyledItemDelegate(parent) + {} + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override; + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override; }; - class IgnoreListEditDlg : public QDialog { Q_OBJECT public: - IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem &item, QWidget *parent = nullptr, bool enabled = false); + IgnoreListEditDlg(const IgnoreListManager::IgnoreListItem& item, QWidget* parent = nullptr, bool enabled = false); inline IgnoreListManager::IgnoreListItem ignoreListItem() { return _ignoreListItem; } void enableOkButton(bool state); @@ -71,35 +71,33 @@ private: QButtonGroup _scopeButtonGroup; }; - class IgnoreListSettingsPage : public SettingsPage { Q_OBJECT public: - IgnoreListSettingsPage(QWidget *parent = nullptr); + IgnoreListSettingsPage(QWidget* parent = nullptr); ~IgnoreListSettingsPage() override; inline bool hasDefaults() const override { return false; } inline bool needsCoreConnection() const override { return true; } - void editIgnoreRule(const QString &ignoreRule); + void editIgnoreRule(const QString& ignoreRule); public slots: void save() override; void load() override; void defaults() override; - void newIgnoreRule(const QString &rule = {}); + void newIgnoreRule(const QString& rule = {}); private slots: void enableDialog(bool); void deleteSelectedIgnoreRule(); void editSelectedIgnoreRule(); - void selectionChanged(const QItemSelection &selection, const QItemSelection &); + void selectionChanged(const QItemSelection& selection, const QItemSelection&); private: - IgnoreListDelegate *_delegate; + IgnoreListDelegate* _delegate; Ui::IgnoreListSettingsPage ui; IgnoreListModel _ignoreListModel; }; - -#endif //IGNORELISTSETTINGSPAGE_H +#endif // IGNORELISTSETTINGSPAGE_H