-
Notifications
You must be signed in to change notification settings - Fork 0
/
unsubscribeplugininterface.h
39 lines (32 loc) · 1.19 KB
/
unsubscribeplugininterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef _UNSUBSCRIBEPLUGININTERFACE_H_
#define _UNSUBSCRIBEPLUGININTERFACE_H_
#include <MessageViewer/ViewerPluginInterface>
#include "unsubscribemanager.h"
namespace MessageViewer
{
class UnsubscribePluginInterface : public MessageViewer::ViewerPluginInterface
{
Q_OBJECT
public:
explicit UnsubscribePluginInterface(QWidget *parent, KActionCollection *ac = nullptr);
~UnsubscribePluginInterface() override;
[[nodiscard]] QList<QAction *> actions() const override;
void closePlugin() override;
void execute() override;
void setMessageItem(const Akonadi::Item &item) override;
void updateAction(const Akonadi::Item &item) override;
[[nodiscard]] ViewerPluginInterface::SpecificFeatureTypes featureTypes() const override
{
return ViewerPluginInterface::NeedMessage;
}
public slots:
void getOneClickResult(bool isSuccess, const QString &resultString);
private:
UnsubscribeManager mUnsub;
// Whether we're in the middle of a one-click unsubscribe operation
bool mUnsubscribing = true;
QList<QAction *> mActions;
QWidget *mParent;
};
}
#endif