Kgapi

searchquery.h
1/*
2 * SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
3 * SPDX-FileCopyrightText: 2019 David Barchiesi <david@barchie.si>
4 *
5 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
6 */
7
8#pragma once
9
10#include "kgapidrive_export.h"
11
12#include <QSharedDataPointer>
13#include <QVariant>
14
15namespace KGAPI2
16{
17namespace Drive
18{
19
20/**
21 * SearchQuery class should be used as a base class for building file/team search queries.
22 */
23class KGAPIDRIVE_EXPORT SearchQuery
24{
25public:
26 enum CompareOperator { Contains, Equals, NotEquals, Less, LessOrEqual, Greater, GreaterOrEqual, In, Has };
27
28 enum LogicOperator { And, Or };
29
30 SearchQuery(LogicOperator op = And);
31 SearchQuery(const SearchQuery &other);
33
34 SearchQuery &operator=(const SearchQuery &other);
35
36 void addQuery(const QString &field, CompareOperator op, const QString &value);
37 void addQuery(const SearchQuery &query);
38
39 [[nodiscard]] bool isEmpty() const;
40
41 [[nodiscard]] QString serialize() const;
42
43private:
44 class Private;
46};
47}
48}
SearchQuery class should be used as a base class for building file/team search queries.
Definition searchquery.h:24
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:36:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.