matrixion/src/Clipboard.h

27 lines
478 B
C
Raw Normal View History

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