Mailcommon

filterselectiondialog.h
1 /*
2  SPDX-FileCopyrightText: 2013-2022 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include <QDialog>
10 
11 #include <QVector>
12 
13 class QPushButton;
14 
15 class QListWidget;
16 class QWidget;
17 
18 namespace MailCommon
19 {
20 class MailFilter;
21 
22 class FilterSelectionDialog : public QDialog
23 {
24  Q_OBJECT
25 
26 public:
27  explicit FilterSelectionDialog(QWidget *parent = nullptr);
28  ~FilterSelectionDialog() override;
29  void setFilters(const QVector<MailFilter *> &filters);
30  Q_REQUIRED_RESULT QVector<MailFilter *> selectedFilters() const;
31 
32 public Q_SLOTS:
33  void slotUnselectAllButton();
34  void slotSelectAllButton();
35  void reject() override;
36 
37 private:
38  void writeConfig();
39  void readConfig();
40  QListWidget *const filtersListWidget;
41  QVector<MailFilter *> originalFilters;
42  QPushButton *const selectAllButton;
43  QPushButton *const unselectAllButton;
44  QPushButton *mOkButton = nullptr;
45 };
46 }
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
void readConfig()
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.