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/>.
21#include "variantutils.h"
23Result::Result(QObject *parent) :
28Result::Result(unity::dash::Preview::Ptr preview, QObject *parent) :
34void Result::setPreview(unity::dash::Preview::Ptr preview)
39QString Result::uri() const
41 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.uri) : QString::null;
44QString Result::iconHint() const
46 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.icon_hint) : QString::null;
49unsigned Result::categoryIndex() const
51 return m_preview != nullptr ? m_preview->preview_result.category_index : 0;
54unsigned Result::resultType() const
56 return m_preview != nullptr ? m_preview->preview_result.result_type : 0;
59QString Result::mimeType() const
61 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.mimetype) : QString::null;
64QString Result::title() const
66 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.name) : QString::null;
69QString Result::comment() const
71 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.comment) : QString::null;
74QString Result::dndUri() const
76 return m_preview != nullptr ? QString::fromStdString(m_preview->preview_result.dnd_uri) : QString::null;
79QVariant Result::metadata() const
81 return m_preview != nullptr ? convertToQVariantHash(m_preview->preview_result.hints) : QVariant();
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