Pimcommon

genericplugininterface.h
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "pimcommonakonadi_export.h"
10#include <Akonadi/Item>
11#include <PimCommon/AbstractGenericPluginInterface>
12
13namespace PimCommon
14{
15class GenericPluginInterfacePrivate;
16/**
17 * @brief The GenericPluginInterface class
18 * @author Laurent Montel <montel@kde.org>
19 */
20class PIMCOMMONAKONADI_EXPORT GenericPluginInterface : public AbstractGenericPluginInterface
21{
22 Q_OBJECT
23public:
24 explicit GenericPluginInterface(QObject *parent = nullptr);
25 ~GenericPluginInterface() override;
26
27 enum RequireType {
28 None = 0,
29 CurrentItems = 1,
30 Items = 2,
31 CurrentCollection = 3,
32 Collections = 4,
33 };
34 Q_ENUM(RequireType)
35 Q_DECLARE_FLAGS(RequireTypes, RequireType)
36
37 void setActionTypes(const QList<ActionType> &type);
38 void addActionType(ActionType type);
39 [[nodiscard]] QList<ActionType> actionTypes() const;
40
41 virtual void setCurrentItems(const Akonadi::Item::List &items);
42 virtual void setItems(const Akonadi::Item::List &items);
43 virtual void setCurrentCollection(const Akonadi::Collection &col);
44 virtual void setCollections(const Akonadi::Collection::List &cols);
45
46 virtual GenericPluginInterface::RequireTypes requiresFeatures() const;
47
48 virtual void updateActions(int numberOfSelectedItems, int numberOfSelectedCollections);
49
50private:
51 std::unique_ptr<GenericPluginInterfacePrivate> const d;
52};
53}
54Q_DECLARE_TYPEINFO(PimCommon::ActionType, Q_RELOCATABLE_TYPE);
The GenericPluginInterface class.
folderdialogacltab.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:17:23 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.