KWin
Loading...
Searching...
No Matches
scriptedquicksceneeffect.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
10
11#include <KConfigPropertyMap>
12
13#include <QTimer>
14
15class KConfigLoader;
16class KConfigPropertyMap;
17
18namespace KWin
19{
20
44{
45 Q_OBJECT
46 Q_PROPERTY(QQmlListProperty<QObject> data READ data)
47 Q_CLASSINFO("DefaultProperty", "data")
48
49
52 Q_PROPERTY(KConfigPropertyMap *configuration READ configuration NOTIFY configurationChanged)
53
59 Q_PROPERTY(bool visible READ isVisible WRITE setVisible NOTIFY visibleChanged)
60
61public:
63 ~ScriptedQuickSceneEffect() override;
64
65 void setMetaData(const KPluginMetaData &metaData);
66
67 void reconfigure(ReconfigureFlags flags) override;
68 int requestedEffectChainPosition() const override;
69
70 bool isVisible() const;
71 void setVisible(bool visible);
72
73 QQmlListProperty<QObject> data();
74 KConfigPropertyMap *configuration() const;
75
76 static void data_append(QQmlListProperty<QObject> *objects, QObject *object);
77 static qsizetype data_count(QQmlListProperty<QObject> *objects);
78 static QObject *data_at(QQmlListProperty<QObject> *objects, qsizetype index);
79 static void data_clear(QQmlListProperty<QObject> *objects);
80
81Q_SIGNALS:
84
86 KConfigLoader *m_configLoader = nullptr;
87 KConfigPropertyMap *m_configuration = nullptr;
88 QObjectList m_children;
89 QTimer m_visibleTimer;
90 bool m_isVisible = false;
91 int m_requestedEffectChainPosition = 0;
92};
93
94} // namespace KWin
static qsizetype data_count(QQmlListProperty< QObject > *objects)
void setMetaData(const KPluginMetaData &metaData)
static void data_append(QQmlListProperty< QObject > *objects, QObject *object)
void reconfigure(ReconfigureFlags flags) override
static QObject * data_at(QQmlListProperty< QObject > *objects, qsizetype index)
static void data_clear(QQmlListProperty< QObject > *objects)
#define private
#define explicit