2 * Copyright (C) 2013 Canonical, Ltd.
5 * Pawel Stolowski <pawel.stolowski@canonical.com>
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.
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.
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/>.
28#include <UnityCore/Preview.h>
30class Q_DECL_EXPORT Result : public QObject
34 Q_PROPERTY(QString uri READ uri CONSTANT)
35 Q_PROPERTY(QString iconHint READ iconHint CONSTANT)
36 Q_PROPERTY(unsigned categoryIndex READ categoryIndex CONSTANT)
37 Q_PROPERTY(unsigned resultType READ resultType CONSTANT)
38 Q_PROPERTY(QString mimeType READ mimeType CONSTANT)
39 Q_PROPERTY(QString title READ title CONSTANT)
40 Q_PROPERTY(QString comment READ comment CONSTANT)
41 Q_PROPERTY(QString dndUri READ dndUri CONSTANT)
42 Q_PROPERTY(QVariant metadata READ metadata CONSTANT)
45 Result(QObject *parent = nullptr);
46 Result(unity::dash::Preview::Ptr preview, QObject *parent = nullptr);
48 void setPreview(unity::dash::Preview::Ptr preview);
51 QString iconHint() const;
52 unsigned categoryIndex() const;
53 unsigned resultType() const;
54 QString mimeType() const;
55 QString title() const;
56 QString comment() const;
57 QString dndUri() const;
58 QVariant metadata() const;
61 /* Keep reference to the original preview to access result attributes via it, rather than keeping copies of them;
62 this will save us a bit on copying, especially as UI is mostly interested in just uri.
64 unity::dash::Preview::Ptr m_preview;
67Q_DECLARE_METATYPE(Result *)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list