Messagelib

messageviewercheckbeforedeletinginterface.h
1 /*
2  SPDX-FileCopyrightText: 2021-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messageviewer_export.h"
10 #include <Akonadi/Item>
11 #include <QList>
12 #include <QObject>
13 class QAction;
14 class KActionCollection;
15 namespace MessageViewer
16 {
17 class MessageViewerCheckBeforeDeletingParameters;
18 class MessageViewerCheckBeforeDeletingInterfacePrivate;
19 /**
20  * @brief The MessageViewerCheckBeforeDeletingInterface class
21  * @author Laurent Montel <[email protected]>
22  */
23 class MESSAGEVIEWER_EXPORT MessageViewerCheckBeforeDeletingInterface : public QObject
24 {
25  Q_OBJECT
26 public:
27  explicit MessageViewerCheckBeforeDeletingInterface(QObject *parent = nullptr);
29 
30  void setParentWidget(QWidget *parent);
31  Q_REQUIRED_RESULT QWidget *parentWidget() const;
32 
33  Q_REQUIRED_RESULT virtual Akonadi::Item::List exec(const Akonadi::Item::List &list) = 0;
34 
35  void setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters &params);
36  Q_REQUIRED_RESULT MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters() const;
37 
38  Q_REQUIRED_RESULT virtual QList<QAction *> actions() const;
39 
40  virtual void createActions(KActionCollection *ac);
41 
42 Q_SIGNALS:
43  void configure(QWidget *parent);
44 
45 public Q_SLOTS:
46  virtual void reloadConfig();
47 
48 private:
49  std::unique_ptr<MessageViewerCheckBeforeDeletingInterfacePrivate> const d;
50 };
51 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Fri Mar 24 2023 04:08:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.