on 5b03213 help sign in
unity8/plugins/Unity/socialpreview.h
63 lines 1.6 kB history raw
1/*
2 * Copyright (C) 2013 Canonical, Ltd.
3 *
4 * Authors:
5 * Pawel Stolowski <pawel.stolowski@canonical.com>
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; version 3.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
20#ifndef SOCIALPREVIEW_H
21#define SOCIALPREVIEW_H
23// local
24#include "preview.h"
26// Qt
27#include <QObject>
28#include <QList>
29#include <QMetaType>
31// libunity-core
32#include <UnityCore/SocialPreview.h>
34class Q_DECL_EXPORT SocialPreview: public Preview
36 Q_OBJECT
38 Q_PROPERTY(QString sender READ sender NOTIFY previewChanged)
39 Q_PROPERTY(QString content READ content NOTIFY previewChanged)
40 Q_PROPERTY(QString avatar READ avatar NOTIFY previewChanged)
42public:
43 explicit SocialPreview(QObject *parent = 0);
45 QString sender() const;
46 QString content() const;
47 QString avatar() const;
48 QVariant comments();
50Q_SIGNALS:
51 void previewChanged();
53protected:
54 void setUnityPreview(unity::dash::Preview::Ptr unityPreview) override;
56private:
57 unity::dash::SocialPreview::Ptr m_unitySocialPreview;
58 QList<QObject *> m_comments;
59};
61Q_DECLARE_METATYPE(SocialPreview *)
63#endif