| 1 | // SPDX-License-Identifier: LGPL-2.1-or-later |
| 2 | // SPDX-FileCopyrightText: 2009 Jeremy Whiting <jpwhiting@kde.org> |
| 3 | // SPDX-FileCopyrightText: 2009 Frederik Gladhorn <gladhorn@kde.org> |
| 4 | // SPDX-FileCopyrightText: 2021 Dan Leinir Turthra Jensen <admin@leinir.dk> |
| 5 | // SPDX-FileCopyrightText: 2024 Harald Sitter <sitter@kde.org> |
| 6 | |
| 7 | #include "searchpreset.h" |
| 8 | |
| 9 | using namespace KNSCore; |
| 10 | |
| 11 | class KNSCore::SearchPresetPrivate |
| 12 | { |
| 13 | public: |
| 14 | SearchRequest request; |
| 15 | QString displayName; |
| 16 | QString iconName; |
| 17 | SearchPreset::Type type; |
| 18 | QString providerId; // not all providers can handle all search requests. |
| 19 | }; |
| 20 | |
| 21 | KNSCore::SearchPreset::SearchPreset(SearchPresetPrivate *dptr) |
| 22 | : d(dptr) |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | SearchRequest KNSCore::SearchPreset::request() const |
| 27 | { |
| 28 | return d->request; |
| 29 | } |
| 30 | |
| 31 | QString KNSCore::SearchPreset::displayName() const |
| 32 | { |
| 33 | return d->displayName; |
| 34 | } |
| 35 | |
| 36 | QString KNSCore::SearchPreset::iconName() const |
| 37 | { |
| 38 | return d->iconName; |
| 39 | } |
| 40 | |
| 41 | KNSCore::SearchPreset::Type KNSCore::SearchPreset::type() const |
| 42 | { |
| 43 | return d->type; |
| 44 | } |
| 45 | |
| 46 | QString KNSCore::SearchPreset::providerId() const |
| 47 | { |
| 48 | return d->providerId; |
| 49 | } |
| 50 | |