File indexing completed on 2024-12-01 04:29:20

0001 /*
0002     SPDX-FileCopyrightText: 2018 Nicolas Carion
0003     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 */
0005 
0006 #pragma once
0007 
0008 #include <QObject>
0009 
0010 /** @class ClipboardProxy
0011     @brief Provides an interface to the clipboard, to use directly from QML
0012     Inspired by https://stackoverflow.com/questions/40092352/passing-qclipboard-to-qml
0013  */
0014 class ClipboardProxy : public QObject
0015 {
0016     Q_OBJECT
0017     Q_PROPERTY(QStringList mimeTypes READ mimeTypes NOTIFY changed)
0018 public:
0019     explicit ClipboardProxy(QObject *parent);
0020 
0021     QStringList mimeTypes() const;
0022 
0023 Q_SIGNALS:
0024     void changed();
0025 };