Mailcommon

filteractionmissingfolderdialog.h
1 /*
2 
3  SPDX-FileCopyrightText: 2011-2022 Laurent Montel <[email protected]>
4 
5  SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include "mailcommon_private_export.h"
11 #include <Akonadi/Collection>
12 
13 #include <QDialog>
14 
15 class QAbstractItemModel;
16 class QListWidget;
17 class QListWidgetItem;
18 class QModelIndex;
19 class QPushButton;
20 
21 namespace MailCommon
22 {
23 class FolderRequester;
24 }
25 
26 class MAILCOMMON_TESTS_EXPORT FilterActionMissingFolderDialog : public QDialog
27 {
28  Q_OBJECT
29 public:
30  explicit FilterActionMissingFolderDialog(const Akonadi::Collection::List &list,
31  const QString &filtername = QString(),
32  const QString &argStr = QString(),
33  QWidget *parent = nullptr);
34  ~FilterActionMissingFolderDialog() override;
35 
36  Q_REQUIRED_RESULT Akonadi::Collection selectedCollection() const;
37  static Akonadi::Collection::List potentialCorrectFolders(const QString &path, bool &exactPath);
38 
39 private:
40  void slotCurrentItemChanged();
41  void slotFolderChanged(const Akonadi::Collection &col);
42  void slotDoubleItemClicked(QListWidgetItem *item);
43  static void getPotentialFolders(const QAbstractItemModel *model, const QModelIndex &parentIndex, const QString &realPath, Akonadi::Collection::List &list);
44  enum collectionEnum { IdentifyCollection = Qt::UserRole + 1 };
45 
46 private:
47  void writeConfig();
48  void readConfig();
49  MailCommon::FolderRequester *const mFolderRequester;
50  QListWidget *mListwidget = nullptr;
51  QPushButton *mOkButton = nullptr;
52 };
UserRole
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:14 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.