Messagelib

configurefilterswidget.h
1 /*
2  SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagelist_private_export.h"
10 #include <QListWidget>
11 #include <QWidget>
12 namespace MessageList
13 {
14 namespace Core
15 {
16 class FilterListWidgetItem : public QListWidgetItem
17 {
18 public:
19  explicit FilterListWidgetItem(QListWidget *parent = nullptr);
20  ~FilterListWidgetItem() override;
21 
22  [[nodiscard]] const QString &identifier() const;
23  void setIdentifier(const QString &newIdentifier);
24 
25  [[nodiscard]] const QString &iconName() const;
26  void setIconName(const QString &newIconName);
27 
28 private:
29  QString mIdentifier;
30  QString mIconName;
31 };
32 
33 class MESSAGELIST_TESTS_EXPORT ConfigureFiltersWidget : public QWidget
34 {
35  Q_OBJECT
36 public:
37  explicit ConfigureFiltersWidget(QWidget *parent = nullptr);
38  ~ConfigureFiltersWidget() override;
39 
40 private:
41  void updateFilterInfo(const QString &identifier, const QString &newName, const QString &newIconName = {});
42  void slotCustomContextMenuRequested(const QPoint &pos);
43  void removeFilterInfo(const QString &identifier);
44  void slotConfigureFilter(QListWidgetItem *item);
45  void init();
46  QListWidget *const mListFiltersWidget;
47 };
48 }
49 }
void init(KXmlGuiWindow *window, KGameDifficulty *difficulty=nullptr)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Thu Feb 15 2024 03:55:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.