Messagelib

filtersavedmanager.h
1/*
2 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6#pragma once
7
8#include <QObject>
9class QMenu;
10namespace MessageList
11{
12namespace Core
13{
14class Filter;
15class FilterSavedManager : public QObject
16{
18public:
19 struct FilterInfo {
20 QString filterName;
21 QString identifier;
22 QString iconName;
23 };
24 ~FilterSavedManager() override;
25
26 void saveFilter(MessageList::Core::Filter *filter, const QString &filtername, const QString &iconName);
27 void loadMenu(QMenu *menu);
28 [[nodiscard]] QList<FilterInfo> filterInfos() const;
29
30 static FilterSavedManager *self();
31
32 void removeFilter(const QString &identifier);
33 void updateFilter(const QString &identifier, const QString &newName, const QString &iconName = {});
34 [[nodiscard]] Filter *loadFilter(const QString &identifier);
35 [[nodiscard]] QStringList existingFilterNames() const;
36
38 void activateFilter(const QString &identifier);
39
40private:
41 explicit FilterSavedManager(QObject *parent = nullptr);
42};
43}
44}
45Q_DECLARE_TYPEINFO(MessageList::Core::FilterSavedManager::FilterInfo, Q_RELOCATABLE_TYPE);
This class is responsible of matching messages that should be displayed in the View.
Definition filter.h:34
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.