Loading...
Searching...
No Matches
paste.h
Go to the documentation of this file.
/*
* Copyright © 2016 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: Ken VanDine <ken.vandine@canonical.com>
*/
#ifndef COM_LOMIRI_CONTENT_PASTE_H_
#define COM_LOMIRI_CONTENT_PASTE_H_
#include <QObject>
#include <QSharedPointer>
#include <QMimeData>
#include <QString>
namespace com
{
namespace lomiri
{
namespace content
{
class Paste : public QObject
{
Q_OBJECT
Q_ENUMS(State)
Q_PROPERTY(int id READ id)
Q_PROPERTY(QString source READ source)
public:
enum State
{
created,
charged,
saved,
collected
};
Paste(const Paste&) = delete;
virtual ~Paste();
Paste& operator=(const Paste&) = delete;
Q_INVOKABLE virtual int id() const;
Q_INVOKABLE virtual QMimeData* mimeData();
Q_INVOKABLE virtual QString source() const;
private:
struct Private;
friend struct Private;
friend class Hub;
QSharedPointer<Private> d;
Paste(const QSharedPointer<Private>&, QObject* parent = nullptr);
};
}
}
}
#endif // COM_LOMIRI_CONTENT_PASTE_H_
QObject
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::lomiri::content::Paste::Hub
friend class Hub
Definition paste.h:61
com::lomiri::content
Definition hub.h:36
com::lomiri
Definition hub.h:34
com
Definition hub.h:32