Messagelib

configurefilterswidget.h
1 /*
2  SPDX-FileCopyrightText: 2021 Laurent Montel <[email protected]>
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 class QListWidget;
13 namespace MessageList
14 {
15 namespace Core
16 {
17 class FilterListWidgetItem : public QListWidgetItem
18 {
19 public:
20  explicit FilterListWidgetItem(QListWidget *parent = nullptr);
21  ~FilterListWidgetItem() override;
22 
23  Q_REQUIRED_RESULT const QString &identifier() const;
24  void setIdentifier(const QString &newIdentifier);
25 
26  Q_REQUIRED_RESULT const QString &iconName() const;
27  void setIconName(const QString &newIconName);
28 
29 private:
30  QString mIdentifier;
31  QString mIconName;
32 };
33 
34 class MESSAGELIST_TESTS_EXPORT ConfigureFiltersWidget : public QWidget
35 {
36  Q_OBJECT
37 public:
38  explicit ConfigureFiltersWidget(QWidget *parent = nullptr);
39  ~ConfigureFiltersWidget() override;
40 
41 private:
42  void updateFilterInfo(const QString &identifier, const QString &newName, const QString &newIconName = {});
43  void slotCustomContextMenuRequested(const QPoint &pos);
44  void removeFilterInfo(const QString &identifier);
45  void slotConfigureFilter(QListWidgetItem *item);
46  void init();
47  QListWidget *const mListFiltersWidget;
48 };
49 }
50 }
QCA_EXPORT void init()
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 23:04:56 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.