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
26
namespace
com
27
{
28
namespace
lomiri
29
{
30
namespace
content
31
{
32
33
class
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:
41
enum
State
42
{
43
created
,
44
charged
,
45
saved
,
46
collected
47
};
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_
QObject
com::lomiri::content::Hub
Definition
hub.h:42
com::lomiri::content::Paste
Definition
paste.h:34
com::lomiri::content::Paste::~Paste
virtual ~Paste()
com::lomiri::content::Paste::operator=
Paste & operator=(const Paste &)=delete
com::lomiri::content::Paste::Private
friend struct Private
Definition
paste.h:60
com::lomiri::content::Paste::id
virtual Q_INVOKABLE int id() const
com::lomiri::content::Paste::source
virtual Q_INVOKABLE QString source() const
com::lomiri::content::Paste::State
State
Definition
paste.h:42
com::lomiri::content::Paste::saved
@ saved
Definition
paste.h:45
com::lomiri::content::Paste::created
@ created
Definition
paste.h:43
com::lomiri::content::Paste::charged
@ charged
Definition
paste.h:44
com::lomiri::content::Paste::collected
@ collected
Definition
paste.h:46
com::lomiri::content::Paste::Paste
Paste(const Paste &)=delete
com::lomiri::content::Paste::mimeData
virtual Q_INVOKABLE QMimeData * mimeData()
com::lomiri::content::Paste::source
QString source
Definition
paste.h:38
com
Definition
hub.h:32
include
com
lomiri
content
paste.h
Generated on Thu Mar 13 2025 07:32:45 for Lomiri Content Hub by
1.9.8