ImagingTools Core SDK
ISearchResults.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QUrl>
7
8// ACF includes
9#include <iser/ISerializable.h>
10
11
12namespace imtbase
13{
14
15
16class ISearchResults: virtual public iser::ISerializable
17{
18public:
19 struct SearchResult
20 {
21 QByteArray contextId;
22 QByteArray contextTypeId;
23 QString resultName;
24 QString resultDescription;
25 QUrl url;
26
27 bool operator == (const SearchResult& other) const
28 {
29 return (contextId == other.contextId) &&
30 (contextTypeId == other.contextTypeId) &&
31 (resultName == other.resultName) &&
32 (url == other.url) &&
33 (resultDescription == other.resultDescription);
34 }
35 };
36
37 typedef QList<SearchResult> SearchResultList;
38
39 virtual int GetSearchResultsCount() const = 0;
40 virtual SearchResult GetSearchResult(int index) const = 0;
41};
42
43
44} // namespace imtbase
45
46