Kgapi

filesearchquery.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 "searchquery.h"
13
14#include <QSharedDataPointer>
15#include <QVariant>
16
17namespace KGAPI2
18{
19namespace Drive
20{
21
22/**
23 * FileSearchQuery class allows simply building even complex file search queries
24 * for FileFetchJob.
25 *
26 * See https://developers.google.com/drive/web/search-parameters for allowed
27 * combinations of fields, compare operators, and value types.
28 *
29 * @since 2.3
30 */
31class KGAPIDRIVE_EXPORT FileSearchQuery : public SearchQuery
32{
33public:
34 enum Field {
35 Title,
36 FullText,
37 MimeType,
38 ModifiedDate,
39 LastViewedByMeDate,
40 Trashed,
41 Starred,
42 Parents,
43 Owners,
44 Writers,
45 Readers,
46 SharedWithMe,
47 /*Properties FIXME: Not supported atm */
48 };
49
50 using SearchQuery::SearchQuery;
51
52 using SearchQuery::addQuery;
53 void addQuery(Field field, CompareOperator op, const QVariant &value);
54
55private:
56 [[nodiscard]] QString fieldToString(Field field);
57 [[nodiscard]] QString valueToString(FileSearchQuery::Field field, const QVariant &var);
58};
59}
60}
FileSearchQuery class allows simply building even complex file search queries for FileFetchJob.
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 Fri Nov 22 2024 12:08:13 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.