2023-02-21 23:48:49 +01:00
|
|
|
// SPDX-FileCopyrightText: Nheko Contributors
|
2021-04-29 22:52:55 +02:00
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
2021-04-29 21:46:49 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
2023-06-19 01:38:40 +02:00
|
|
|
#include <QQmlEngine>
|
2021-04-29 21:46:49 +02:00
|
|
|
#include <QString>
|
|
|
|
|
2023-07-16 20:32:19 +02:00
|
|
|
class Clipboard : public QObject
|
2021-04-29 21:46:49 +02:00
|
|
|
{
|
2021-09-18 00:22:33 +02:00
|
|
|
Q_OBJECT
|
2023-06-19 01:38:40 +02:00
|
|
|
QML_ELEMENT
|
|
|
|
QML_SINGLETON
|
|
|
|
|
2021-09-18 00:22:33 +02:00
|
|
|
Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged)
|
2021-04-29 21:46:49 +02:00
|
|
|
|
|
|
|
public:
|
2021-09-18 00:22:33 +02:00
|
|
|
Clipboard(QObject *parent = nullptr);
|
2021-04-29 21:46:49 +02:00
|
|
|
|
2021-09-18 00:22:33 +02:00
|
|
|
QString text() const;
|
|
|
|
void setText(QString text_);
|
2021-04-29 21:46:49 +02:00
|
|
|
signals:
|
2021-09-18 00:22:33 +02:00
|
|
|
void textChanged();
|
2021-04-29 21:46:49 +02:00
|
|
|
};
|