libquentier 0.5.0
The library for rich desktop clients of Evernote service
Loading...
Searching...
No Matches
NoteSearchQuery.h
1/*
2 * Copyright 2016-2020 Dmitry Ivanov
3 *
4 * This file is part of libquentier
5 *
6 * libquentier is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published by
8 * the Free Software Foundation, version 3 of the License.
9 *
10 * libquentier is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public License
16 * along with libquentier. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef LIB_QUENTIER_LOCAL_STORAGE_NOTE_SEARCH_QUERY_H
20#define LIB_QUENTIER_LOCAL_STORAGE_NOTE_SEARCH_QUERY_H
21
22#include <quentier/types/ErrorString.h>
23
24#include <QSharedDataPointer>
25
26namespace quentier {
27
28QT_FORWARD_DECLARE_CLASS(NoteSearchQueryData)
29
30class QUENTIER_EXPORT NoteSearchQuery : public Printable
31{
32public:
34 NoteSearchQuery(const NoteSearchQuery & other);
36 NoteSearchQuery & operator=(const NoteSearchQuery & other);
37 NoteSearchQuery & operator=(NoteSearchQuery && other);
38 virtual ~NoteSearchQuery();
39
40 bool isEmpty() const;
41
42 void clear();
43
47 const QString queryString() const;
48
49 bool setQueryString(const QString & queryString, ErrorString & error);
50
56 const QString notebookModifier() const;
57
58 bool hasAnyModifier() const;
59
60 const QStringList & tagNames() const;
61 const QStringList & negatedTagNames() const;
62 bool hasAnyTag() const;
63 bool hasNegatedAnyTag() const;
64
65 const QStringList & titleNames() const;
66 const QStringList & negatedTitleNames() const;
67 bool hasAnyTitleName() const;
68 bool hasNegatedAnyTitleName() const;
69
70 const QVector<qint64> & creationTimestamps() const;
71 const QVector<qint64> & negatedCreationTimestamps() const;
72 bool hasAnyCreationTimestamp() const;
73 bool hasNegatedAnyCreationTimestamp() const;
74
75 const QVector<qint64> & modificationTimestamps() const;
76 const QVector<qint64> & negatedModificationTimestamps() const;
77 bool hasAnyModificationTimestamp() const;
78 bool hasNegatedAnyModificationTimestamp() const;
79
80 const QStringList & resourceMimeTypes() const;
81 const QStringList & negatedResourceMimeTypes() const;
82 bool hasAnyResourceMimeType() const;
83 bool hasNegatedAnyResourceMimeType() const;
84
85 const QVector<qint64> & subjectDateTimestamps() const;
86 const QVector<qint64> & negatedSubjectDateTimestamps() const;
87 bool hasAnySubjectDateTimestamp() const;
88 bool hasNegatedAnySubjectDateTimestamp() const;
89
90 const QVector<double> & latitudes() const;
91 const QVector<double> & negatedLatitudes() const;
92 bool hasAnyLatitude() const;
93 bool hasNegatedAnyLatitude() const;
94
95 const QVector<double> & longitudes() const;
96 const QVector<double> & negatedLongitudes() const;
97 bool hasAnyLongitude() const;
98 bool hasNegatedAnyLongitude() const;
99
100 const QVector<double> & altitudes() const;
101 const QVector<double> & negatedAltitudes() const;
102 bool hasAnyAltitude() const;
103 bool hasNegatedAnyAltitude() const;
104
105 const QStringList & authors() const;
106 const QStringList & negatedAuthors() const;
107 bool hasAnyAuthor() const;
108 bool hasNegatedAnyAuthor() const;
109
110 const QStringList & sources() const;
111 const QStringList & negatedSources() const;
112 bool hasAnySource() const;
113 bool hasNegatedAnySource() const;
114
115 const QStringList & sourceApplications() const;
116 const QStringList & negatedSourceApplications() const;
117 bool hasAnySourceApplication() const;
118 bool hasNegatedAnySourceApplication() const;
119
120 const QStringList & contentClasses() const;
121 const QStringList & negatedContentClasses() const;
122 bool hasAnyContentClass() const;
123 bool hasNegatedAnyContentClass() const;
124
125 const QStringList & placeNames() const;
126 const QStringList & negatedPlaceNames() const;
127 bool hasAnyPlaceName() const;
128 bool hasNegatedAnyPlaceName() const;
129
130 const QStringList & applicationData() const;
131 const QStringList & negatedApplicationData() const;
132 bool hasAnyApplicationData() const;
133 bool hasNegatedAnyApplicationData() const;
134
135 const QVector<qint64> & reminderOrders() const;
136 const QVector<qint64> & negatedReminderOrders() const;
137 bool hasAnyReminderOrder() const;
138 bool hasNegatedAnyReminderOrder() const;
139
140 const QVector<qint64> & reminderTimes() const;
141 const QVector<qint64> & negatedReminderTimes() const;
142 bool hasAnyReminderTime() const;
143 bool hasNegatedAnyReminderTime() const;
144
145 const QVector<qint64> & reminderDoneTimes() const;
146 const QVector<qint64> & negatedReminderDoneTimes() const;
147 bool hasAnyReminderDoneTime() const;
148 bool hasNegatedAnyReminderDoneTime() const;
149
150 bool hasUnfinishedToDo() const;
151 bool hasNegatedUnfinishedToDo() const;
152
153 bool hasFinishedToDo() const;
154 bool hasNegatedFinishedToDo() const;
155
156 bool hasAnyToDo() const;
157 bool hasNegatedAnyToDo() const;
158
159 bool hasEncryption() const;
160 bool hasNegatedEncryption() const;
161
162 const QStringList & contentSearchTerms() const;
163 const QStringList & negatedContentSearchTerms() const;
164 bool hasAnyContentSearchTerms() const;
165
166 bool isMatcheable() const;
167
168 virtual QTextStream & print(QTextStream & strm) const override;
169
170private:
171 QSharedDataPointer<NoteSearchQueryData> d;
172};
173
174} // namespace quentier
175
176#endif // LIB_QUENTIER_LOCAL_STORAGE_NOTE_SEARCH_QUERY_H
The ErrorString class encapsulates two (or more) strings which are meant to contain translatable (bas...
Definition ErrorString.h:44
Definition NoteSearchQuery.h:31
const QString queryString() const
const QString notebookModifier() const
The Printable class is the interface for Quentier's internal classes which should be able to write th...
Definition Printable.h:38