Kgapi

searchquery.h
1 /*
2  * Copyright (C) 2014 Daniel Vrátil <[email protected]>
3  * Copyright (C) 2019 David Barchiesi <[email protected]>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) version 3, or any
9  * later version accepted by the membership of KDE e.V. (or its
10  * successor approved by the membership of KDE e.V.), which shall
11  * act as a proxy defined in Section 6 of version 3 of the license.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library. If not, see <https://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef KGAPI2_DRIVE_SEARCHQUERY_H
23 #define KGAPI2_DRIVE_SEARCHQUERY_H
24 
25 #include "kgapidrive_export.h"
26 
27 #include <QVariant>
28 #include <QSharedDataPointer>
29 
30 namespace KGAPI2
31 {
32 namespace Drive
33 {
34 
38 class KGAPIDRIVE_EXPORT SearchQuery
39 {
40 public:
41  enum CompareOperator {
42  Contains,
43  Equals,
44  NotEquals,
45  Less,
46  LessOrEqual,
47  Greater,
48  GreaterOrEqual,
49  In,
50  Has
51  };
52 
53  enum LogicOperator {
54  And,
55  Or
56  };
57 
58  SearchQuery(LogicOperator op = And);
59  SearchQuery(const SearchQuery &other);
60  ~SearchQuery();
61 
62  SearchQuery &operator=(const SearchQuery &other);
63 
64  void addQuery(const QString &field, CompareOperator op, const QString &value);
65  void addQuery(const SearchQuery &query);
66 
67  bool isEmpty() const;
68 
69  QString serialize() const;
70 
71  private:
72  class Private;
74 };
75 }
76 }
77 
78 #endif // KGAPI2_DRIVE_SEARCHQUERY_H
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:30
SearchQuery class should be used as a base class for building file/team search queries.
Definition: searchquery.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat May 30 2020 22:38:44 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.