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>
12namespace MessageList
13{
14namespace Core
15{
16class FilterListWidgetItem : public QListWidgetItem
17{
18public:
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
28private:
29 QString mIdentifier;
30 QString mIconName;
31};
32
33class MESSAGELIST_TESTS_EXPORT ConfigureFiltersListWidget : public QListWidget
34{
35 Q_OBJECT
36public:
37 explicit ConfigureFiltersListWidget(QWidget *parent = nullptr);
38 ~ConfigureFiltersListWidget() override;
39
40protected:
41 void paintEvent(QPaintEvent *event) override;
42};
43
44class MESSAGELIST_TESTS_EXPORT ConfigureFiltersWidget : public QWidget
45{
46 Q_OBJECT
47public:
48 explicit ConfigureFiltersWidget(QWidget *parent = nullptr);
49 ~ConfigureFiltersWidget() override;
50
51private:
52 MESSAGELIST_NO_EXPORT void updateFilterInfo(const QString &identifier, const QString &newName, const QString &newIconName = {});
53 MESSAGELIST_NO_EXPORT void slotCustomContextMenuRequested(const QPoint &pos);
54 MESSAGELIST_NO_EXPORT void removeFilterInfo(const QString &identifier);
55 MESSAGELIST_NO_EXPORT void slotConfigureFilter(QListWidgetItem *item);
56 MESSAGELIST_NO_EXPORT void init();
57 ConfigureFiltersListWidget *const mListFiltersWidget;
58};
59}
60}
QCA_EXPORT void init()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 11:58:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.