2
* Copyright (C) 2015 Canonical Ltd
4
* This program is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License version 3 as
6
* published by the Free Software Foundation.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
16
* Authored by: Xavi Garcia <xavi.garcia.mena@canonical.com>
21
#include <unity/util/DefinesPtrs.h>
22
#include <unity/util/NonCopyable.h>
24
#include <unity/scopes/qt/QActionMetadata.h>
25
#include <unity/scopes/qt/QCannedQuery.h>
26
#include <unity/scopes/qt/QResult.h>
40
class QPreviewQueryBase;
41
class QPreviewQueryBaseAPI;
46
class QPreviewQueryBaseImpl
50
NONCOPYABLE(QPreviewQueryBaseImpl);
51
UNITY_DEFINES_PTRS(QPreviewQueryBaseImpl);
54
QPreviewQueryBaseImpl();
55
~QPreviewQueryBaseImpl() = default;
58
\brief Get result for this preview request.
59
\throws unity::LogicException if result was not initialized (the default ctor was used).
62
QResult result() const;
65
\brief Get metadata for this preview request.
66
\return search metadata
67
\throws unity::LogicException if preview metadata was not initialized (the default ctor was used).
69
QActionMetadata action_metadata() const;
72
QPreviewQueryBaseAPI* preview_api_;
75
void init(QPreviewQueryBaseAPI* preview_api);
77
friend class unity::scopes::qt::QPreviewQueryBase;
80
} // namespace internal