Lomiri Content Hub 1.0.0
A session-wide content-exchange service
 
Loading...
Searching...
No Matches
paste.h
Go to the documentation of this file.
1/*
2 * Copyright © 2016 Canonical Ltd.
3 *
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 version 3 as
6 * published by the Free Software Foundation.
7 *
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.
12 *
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/>.
15 *
16 * Authored by: Ken VanDine <ken.vandine@canonical.com>
17 */
18#ifndef COM_LOMIRI_CONTENT_PASTE_H_
19#define COM_LOMIRI_CONTENT_PASTE_H_
20
21#include <QObject>
22#include <QSharedPointer>
23#include <QMimeData>
24#include <QString>
25
26namespace com
27{
28namespace lomiri
29{
30namespace content
31{
32
33class Paste : public QObject
34{
35 Q_OBJECT
36 Q_ENUMS(State)
37 Q_PROPERTY(int id READ id)
38 Q_PROPERTY(QString source READ source)
39
40 public:
48
49 Paste(const Paste&) = delete;
50 virtual ~Paste();
51
52 Paste& operator=(const Paste&) = delete;
53
54 Q_INVOKABLE virtual int id() const;
55 Q_INVOKABLE virtual QMimeData* mimeData();
56 Q_INVOKABLE virtual QString source() const;
57
58 private:
59 struct Private;
60 friend struct Private;
61 friend class Hub;
62 QSharedPointer<Private> d;
63
64 Paste(const QSharedPointer<Private>&, QObject* parent = nullptr);
65};
66}
67}
68}
69
70#endif // COM_LOMIRI_CONTENT_PASTE_H_
Paste & operator=(const Paste &)=delete
friend struct Private
Definition paste.h:60
virtual Q_INVOKABLE int id() const
virtual Q_INVOKABLE QString source() const
Paste(const Paste &)=delete
virtual Q_INVOKABLE QMimeData * mimeData()
Definition hub.h:32