/* SPDX-FileCopyrightText: 2023 Marco Martin SPDX-License-Identifier: LGPL-2.0-or-later */ #ifndef PLASMOIDATTACHED_P_H #define PLASMOIDATTACHED_P_H #include #include #include // // W A R N I N G // ------------- // // This file is not part of the public Plasma API. It exists purely as an // implementation detail. This header file may change from version to // version without notice, or even be removed. // // We mean it. // namespace Plasma { class Applet; class Containment; } namespace PlasmaQuick { // Class used exclusively to generate the Plasmoid.* attached proeprties, which are Applet instances class PlasmoidAttached : public QObject { Q_OBJECT public: /** TODO: When the migration to the new action api is done, remove this enum */ enum ActionPriority { LowPriorityAction = QAction::LowPriority, NormalPriorityAction = QAction::NormalPriority, HighPriorityAction = QAction::HighPriority, }; Q_ENUM(ActionPriority) PlasmoidAttached(QObject *parent = nullptr); ~PlasmoidAttached() override; ////NEEDED BY QML TO CREATE ATTACHED PROPERTIES static Plasma::Applet *qmlAttachedProperties(QObject *object); }; // Class used exclusively to generate the Plasmoid.* attached proeprties, which are Applet instances class ContainmentAttached : public QObject { Q_OBJECT public: ContainmentAttached(QObject *parent = nullptr); ~ContainmentAttached() override; ////NEEDED BY QML TO CREATE ATTACHED PROPERTIES static Plasma::Containment *qmlAttachedProperties(QObject *object); }; } QML_DECLARE_TYPEINFO(PlasmaQuick::PlasmoidAttached, QML_HAS_ATTACHED_PROPERTIES) QML_DECLARE_TYPEINFO(PlasmaQuick::ContainmentAttached, QML_HAS_ATTACHED_PROPERTIES) #endif