1 | /* |
2 | SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org> |
3 | |
4 | SPDX-License-Identifier: LGPL-2.0-or-later |
5 | */ |
6 | |
7 | #include "qtclipboard_p.h" |
8 | |
9 | #include <QClipboard> |
10 | #include <QGuiApplication> |
11 | |
12 | QtClipboard::QtClipboard(QObject *parent) |
13 | : KSystemClipboard(parent) |
14 | { |
15 | connect(qGuiApp->clipboard(), signal: &QClipboard::changed, context: this, slot: &QtClipboard::changed); |
16 | } |
17 | |
18 | void QtClipboard::setMimeData(QMimeData *mime, QClipboard::Mode mode) |
19 | { |
20 | qGuiApp->clipboard()->setMimeData(data: mime, mode); |
21 | } |
22 | |
23 | void QtClipboard::clear(QClipboard::Mode mode) |
24 | { |
25 | qGuiApp->clipboard()->clear(mode); |
26 | } |
27 | |
28 | const QMimeData *QtClipboard::mimeData(QClipboard::Mode mode) const |
29 | { |
30 | return qGuiApp->clipboard()->mimeData(mode); |
31 | } |
32 | |