File indexing completed on 2024-12-08 12:18:38
0001 /* 0002 SPDX-FileCopyrightText: 2020 David Edmundson <davidedmundson@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #include "qtclipboard_p.h" 0008 0009 #include <QClipboard> 0010 #include <QGuiApplication> 0011 0012 QtClipboard::QtClipboard(QObject *parent) 0013 : KSystemClipboard(parent) 0014 { 0015 connect(qGuiApp->clipboard(), &QClipboard::changed, this, &QtClipboard::changed); 0016 } 0017 0018 void QtClipboard::setMimeData(QMimeData *mime, QClipboard::Mode mode) 0019 { 0020 qGuiApp->clipboard()->setMimeData(mime, mode); 0021 } 0022 0023 void QtClipboard::clear(QClipboard::Mode mode) 0024 { 0025 qGuiApp->clipboard()->clear(mode); 0026 } 0027 0028 const QMimeData *QtClipboard::mimeData(QClipboard::Mode mode) const 0029 { 0030 return qGuiApp->clipboard()->mimeData(mode); 0031 }