KGuiAddons

qtclipboard.cpp
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
12QtClipboard::QtClipboard(QObject *parent)
13 : KSystemClipboard(parent)
14{
15 connect(qGuiApp->clipboard(), &QClipboard::changed, this, &QtClipboard::changed);
16}
17
18void QtClipboard::setMimeData(QMimeData *mime, QClipboard::Mode mode)
19{
20 qGuiApp->clipboard()->setMimeData(mime, mode);
21}
22
23void QtClipboard::clear(QClipboard::Mode mode)
24{
25 qGuiApp->clipboard()->clear(mode);
26}
27
28const QMimeData *QtClipboard::mimeData(QClipboard::Mode mode) const
29{
30 return qGuiApp->clipboard()->mimeData(mode);
31}
This class mimics QClipboard but unlike QClipboard it will continue to get updates even when our wind...
void changed(QClipboard::Mode mode)
QFuture< ArgsType< Signal > > connect(Sender *sender, Signal signal)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.