Loading...
Searching...
No Matches
item.h
Go to the documentation of this file.
/*
* Copyright © 2013 Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authored by: Thomas Voß <thomas.voss@canonical.com>
*/
#ifndef COM_LOMIRI_CONTENT_ITEM_H_
#define COM_LOMIRI_CONTENT_ITEM_H_
#include <QtDBus>
#include <QObject>
#include <QSharedPointer>
#include <QUrl>
namespace com
{
namespace lomiri
{
namespace content
{
class Item : public QObject
{
Q_OBJECT
Q_PROPERTY(QUrl url READ url() WRITE setUrl)
Q_PROPERTY(QString name READ name WRITE setName)
Q_PROPERTY(QString text READ text WRITE setText)
Q_PROPERTY(QByteArray stream READ stream WRITE setStream)
Q_PROPERTY(QString streamType READ streamType WRITE setStreamType)
public:
Item(const QUrl& = QUrl(), QObject* = nullptr);
Item(const Item&);
virtual ~Item();
Item& operator=(const Item&);
bool operator==(const Item&) const;
Q_INVOKABLE const QUrl& url() const;
Q_INVOKABLE void setUrl(const QUrl &url) const;
Q_INVOKABLE const QString& name() const;
Q_INVOKABLE void setName(const QString &name) const;
Q_INVOKABLE const QString text() const;
Q_INVOKABLE void setText(const QString &text) const;
Q_INVOKABLE const QByteArray& stream() const;
Q_INVOKABLE void setStream(const QByteArray &stream) const;
Q_INVOKABLE const QString& streamType() const;
Q_INVOKABLE void setStreamType(const QString &type) const;
private:
struct Private;
QSharedPointer<Private> d;
};
}
}
}
Q_DECL_EXPORT
QDBusArgument &operator<<(QDBusArgument &argument,
const com::lomiri::content::Item &item);
Q_DECL_EXPORT
const QDBusArgument &operator>>(const QDBusArgument &argument,
com::lomiri::content::Item &item);
Q_DECLARE_METATYPE(com::lomiri::content::Item)
#endif // COM_LOMIRI_CONTENT_ITEM_H_
QObject
com::lomiri::content::Item::name
setUrlQString name
Definition item.h:37
com::lomiri::content::Item::setText
Q_INVOKABLE void setText(const QString &text) const
com::lomiri::content::Item::Item
Item(const QUrl &=QUrl(), QObject *=nullptr)
com::lomiri::content::Item::text
QString text
Definition item.h:38
com::lomiri::content::Item::setName
Q_INVOKABLE void setName(const QString &name) const
com::lomiri::content::Item::url
QUrl url
Definition item.h:36
com::lomiri::content::Item::setUrl
Q_INVOKABLE void setUrl(const QUrl &url) const
com::lomiri::content::Item::streamType
QString streamType
Definition item.h:40
com::lomiri::content::Item::setStream
Q_INVOKABLE void setStream(const QByteArray &stream) const
com::lomiri::content::Item::setStreamType
Q_INVOKABLE void setStreamType(const QString &type) const
com::lomiri::content::Item::stream
QByteArray stream
Definition item.h:39
com::lomiri::content
Definition hub.h:36
com::lomiri
Definition hub.h:34
com
Definition hub.h:32