File indexing completed on 2025-03-09 04:54:36
0001 /* 0002 SPDX-FileCopyrightText: 2021-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "messageviewer_export.h" 0010 #include <Akonadi/Item> 0011 #include <QList> 0012 #include <QObject> 0013 class QAction; 0014 class KActionCollection; 0015 namespace MessageViewer 0016 { 0017 class MessageViewerCheckBeforeDeletingParameters; 0018 class MessageViewerCheckBeforeDeletingInterfacePrivate; 0019 /** 0020 * @brief The MessageViewerCheckBeforeDeletingInterface class 0021 * @author Laurent Montel <montel@kde.org> 0022 */ 0023 class MESSAGEVIEWER_EXPORT MessageViewerCheckBeforeDeletingInterface : public QObject 0024 { 0025 Q_OBJECT 0026 public: 0027 explicit MessageViewerCheckBeforeDeletingInterface(QObject *parent = nullptr); 0028 ~MessageViewerCheckBeforeDeletingInterface() override; 0029 0030 void setParentWidget(QWidget *parent); 0031 [[nodiscard]] QWidget *parentWidget() const; 0032 0033 [[nodiscard]] virtual Akonadi::Item::List exec(const Akonadi::Item::List &list) = 0; 0034 0035 void setParameters(const MessageViewer::MessageViewerCheckBeforeDeletingParameters ¶ms); 0036 [[nodiscard]] MessageViewer::MessageViewerCheckBeforeDeletingParameters parameters() const; 0037 0038 [[nodiscard]] virtual QList<QAction *> actions() const; 0039 0040 virtual void createActions(KActionCollection *ac); 0041 0042 Q_SIGNALS: 0043 void configure(QWidget *parent); 0044 0045 public Q_SLOTS: 0046 virtual void reloadConfig(); 0047 0048 private: 0049 std::unique_ptr<MessageViewerCheckBeforeDeletingInterfacePrivate> const d; 0050 }; 0051 }