2021-03-03 14:24:24 +00:00
|
|
|
/*
|
|
|
|
SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
#include <QScopedPointer>
|
2021-10-14 16:18:48 +01:00
|
|
|
#include <QClipboard>
|
|
|
|
#include <memory>
|
2021-03-03 14:24:24 +00:00
|
|
|
|
2021-10-14 16:18:48 +01:00
|
|
|
class DataControlDevice;
|
|
|
|
class DataControlDeviceManager;
|
2021-03-03 14:24:24 +00:00
|
|
|
class QMimeData;
|
|
|
|
|
|
|
|
class DataControl : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
DataControl(QObject *parent = nullptr);
|
|
|
|
~DataControl() override;
|
|
|
|
|
2021-10-14 16:18:48 +01:00
|
|
|
const QMimeData *mimeData(QClipboard::Mode mode) const;
|
|
|
|
void setMimeData(QMimeData *mime, QClipboard::Mode mode);
|
|
|
|
void clear(QClipboard::Mode mode);
|
2021-03-03 14:24:24 +00:00
|
|
|
|
|
|
|
Q_SIGNALS:
|
2021-10-14 16:18:48 +01:00
|
|
|
void changed(QClipboard::Mode mode);
|
2021-03-03 14:24:24 +00:00
|
|
|
|
|
|
|
private:
|
2021-10-14 16:18:48 +01:00
|
|
|
std::unique_ptr<DataControlDeviceManager> m_manager;
|
|
|
|
std::unique_ptr<DataControlDevice> m_device;
|
2021-03-03 14:24:24 +00:00
|
|
|
};
|