2
* Copyright 2016 Canonical Ltd.
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 3.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Author: Arthur Mello <arthur.mello@canonical.com>
19
#ifndef UCCONTENTHUB_P_H
20
#define UCCONTENTHUB_P_H
22
#include <QtCore/QObject>
24
#include <UbuntuToolkit/ubuntutoolkitglobal.h>
32
class UBUNTUTOOLKIT_EXPORT UCContentHub : public QObject
36
Q_PROPERTY(bool canPaste READ canPaste NOTIFY canPasteChanged)
39
UCContentHub(QObject* parent = 0);
42
Q_INVOKABLE void requestPaste(QQuickItem *targetItem);
45
QString getAppProfile();
46
QMimeData* deserializeMimeData(const QByteArray &serializedMimeData);
49
void pasteSelected(QQuickItem *targetItem, const QString &data);
50
void canPasteChanged();
53
void onPasteSelected(QString appId, QByteArray mimedata, bool pasteAsRichText);
54
void onPasteboardChanged();
57
bool checkPasteFormats();
59
QDBusInterface *m_dbusIface;
60
QDBusInterface *m_contentHubIface;
63
QQuickItem *m_targetItem;
68
#endif // UCCONTENTHUB_P_H