Content Hub
0.0.1
A session-wide content-exchange service
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Properties
Friends
item.h
Go to the documentation of this file.
1
/*
2
* Copyright © 2013 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: Thomas Voß <thomas.voss@canonical.com>
17
*/
18
#ifndef COM_UBUNTU_CONTENT_ITEM_H_
19
#define COM_UBUNTU_CONTENT_ITEM_H_
20
21
#include <QtDBus>
22
#include <QObject>
23
#include <QSharedPointer>
24
#include <QUrl>
25
26
namespace
com
27
{
28
namespace
ubuntu
29
{
30
namespace
content
31
{
32
33
class
Item
:
public
QObject
34
{
35
Q_OBJECT
36
Q_PROPERTY(QUrl
url
READ
url
())
37
Q_PROPERTY(QString
name
READ
name
WRITE
setName
)
38
39
public
:
40
Item
(
const
QUrl& = QUrl(),
QObject
* =
nullptr
);
41
Item
(
const
Item
&);
42
virtual
~Item
();
43
44
Item
&
operator=
(
const
Item
&);
45
bool
operator==
(
const
Item
&)
const
;
46
47
Q_INVOKABLE
const
QUrl&
url
()
const
;
48
Q_INVOKABLE
const
QString&
name
()
const
;
49
Q_INVOKABLE
void
setName
(
const
QString &name)
const
;
50
51
private
:
52
struct
Private;
53
QSharedPointer<Private> d;
54
};
55
56
}
57
}
58
}
59
60
Q_DECL_EXPORT
61
QDBusArgument &
operator<<
(QDBusArgument &argument,
62
const
com::ubuntu::content::Item
&item);
63
64
Q_DECL_EXPORT
65
const
QDBusArgument &
operator>>
(
const
QDBusArgument &argument,
66
com::ubuntu::content::Item
&item);
67
68
Q_DECLARE_METATYPE(
com::ubuntu::content::Item
)
69
70
71
#endif // COM_UBUNTU_CONTENT_ITEM_H_
com::ubuntu::content::Item::~Item
virtual ~Item()
com::ubuntu::content::Item::operator=
Item & operator=(const Item &)
operator<<
Q_DECL_EXPORT QDBusArgument & operator<<(QDBusArgument &argument, const com::ubuntu::content::Item &item)
com::ubuntu::content::Item::name
Q_INVOKABLE const QString & name() const
com
Definition:
hub.h:28
QObject
com::ubuntu::content::Item::url
Q_INVOKABLE const QUrl & url() const
com::ubuntu::content::Item::operator==
bool operator==(const Item &) const
com::ubuntu::content::Item
Definition:
item.h:33
com::ubuntu::content::Item::setName
Q_INVOKABLE void setName(const QString &name) const
com::ubuntu::content::Item::Item
Item(const QUrl &=QUrl(), QObject *=nullptr)
operator>>
Q_DECL_EXPORT const QDBusArgument & operator>>(const QDBusArgument &argument, com::ubuntu::content::Item &item)
include
com
ubuntu
content
item.h
Generated on Mon Nov 10 2014 16:41:49 for Content Hub by
1.8.8