diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-26 20:39:26 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-26 20:39:26 +1000 |
| commit | d65fb180ad5ee41049b9d0f9a962901524636b6a (patch) | |
| tree | df7be08c2ac182e592405883df81e6e054973638 /plugin/src/Caelestia/cutils.hpp | |
| parent | background: add visualiser (diff) | |
| download | caelestia-shell-d65fb180ad5ee41049b9d0f9a962901524636b6a.tar.gz caelestia-shell-d65fb180ad5ee41049b9d0f9a962901524636b6a.tar.bz2 caelestia-shell-d65fb180ad5ee41049b9d0f9a962901524636b6a.zip | |
plugin: add saveItem
Diffstat (limited to 'plugin/src/Caelestia/cutils.hpp')
| -rw-r--r-- | plugin/src/Caelestia/cutils.hpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugin/src/Caelestia/cutils.hpp b/plugin/src/Caelestia/cutils.hpp new file mode 100644 index 0000000..bf7cb22 --- /dev/null +++ b/plugin/src/Caelestia/cutils.hpp @@ -0,0 +1,18 @@ +#pragma once + +#include <qobject.h> +#include <QtQuick/QQuickItem> + +class CUtils : public QObject { + Q_OBJECT; + QML_NAMED_ELEMENT(CUtils); + QML_SINGLETON; + +public: + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path); + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path, const QRect& rect); + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path, QJSValue onSaved); + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path, QJSValue onSaved, QJSValue onFailed); + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path, const QRect& rect, QJSValue onSaved); + Q_INVOKABLE void saveItem(QQuickItem* target, const QUrl& path, const QRect& rect, QJSValue onSaved, QJSValue onFailed); +}; |