digiKam
searchfields.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2008-01-20
7  * Description : User interface for searches
8  *
9  * Copyright (C) 2008-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2011-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_SEARCH_FIELDS_H
26 #define DIGIKAM_SEARCH_FIELDS_H
27 
28 // Qt includes
29 
30 #include <QObject>
31 #include <QWidget>
32 #include <QMap>
33 
34 // Local includes
35 
36 #include "coredbsearchxml.h"
37 #include "searchutilities.h"
38 #include "visibilitycontroller.h"
39 
40 class QLabel;
41 class QCheckBox;
42 class QGridLayout;
43 class QSpinBox;
44 class QDoubleSpinBox;
45 class QTimeEdit;
46 class QTreeView;
47 class QComboBox;
48 class QLineEdit;
49 
50 namespace Digikam
51 {
52 
53 class DAdjustableLabel;
54 class AbstractAlbumTreeViewSelectComboBox;
55 class SearchFieldGroup;
56 class SqueezedComboBox;
57 class DDateEdit;
58 class ChoiceSearchModel;
59 class ChoiceSearchComboBox;
60 class RatingComboBox;
61 class PickLabelFilter;
62 class ColorLabelFilter;
63 
64 class SearchField : public QObject,
65  public VisibilityObject
66 {
67  Q_OBJECT
68 
69 public:
70 
72  {
75  };
76 
77 public:
78 
79  static SearchField* createField(const QString& fieldName, SearchFieldGroup* const parent);
80 
81  explicit SearchField(QObject* const parent);
82 
83  void setup(QGridLayout* const layout, int row = -1);
84  void setFieldName(const QString& fieldName);
85  void setCategoryLabelVisible(bool visible);
86  void setCategoryLabelVisibleFromPreviousField(SearchField* const previousField);
87 
89 
90  virtual void setText(const QString& label, const QString& detailLabel);
91 
92  virtual bool supportsField(const QString& fieldName);
93  virtual void read(SearchXmlCachingReader& reader) = 0;
94  virtual void write(SearchXmlWriter& writer) = 0;
95  virtual void reset() = 0;
96 
97  void setVisible(bool visible) override;
98  bool isVisible() override;
99 
100 protected Q_SLOTS:
101 
102  void clearButtonClicked();
103 
104 protected:
105 
106  void setValidValueState(bool valueIsValid);
107 
108  virtual void setupValueWidgets(QGridLayout* layout, int row, int column) = 0;
109  virtual void setupLabels(QGridLayout* layout, int line);
110 
111  virtual void setValueWidgetsVisible(bool visible) = 0;
112  virtual QList<QRect> valueWidgetRects() const = 0;
113 
114 protected:
115 
116  QString m_name;
117 
118  QLabel* m_label;
119  QLabel* m_detailLabel;
120 
122 
125 
126 private:
127 
128  // Disable
129  SearchField(const SearchField&) = delete;
130  SearchField& operator=(const SearchField&) = delete;
131 };
132 
133 //-----------------------------------------------------------------------------
134 
136 {
137  Q_OBJECT
138 
139 public:
140 
141  explicit SearchFieldText(QObject* const parent);
142 
143  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
144  void read(SearchXmlCachingReader& reader) override;
145  void write(SearchXmlWriter& writer) override;
146  void setValueWidgetsVisible(bool visible) override;
147  void reset() override;
148  QList<QRect> valueWidgetRects() const override;
149 
150 protected Q_SLOTS:
151 
152  void valueChanged(const QString& text);
153 
154 protected:
155 
156  QLineEdit* m_edit;
157 };
158 
159 //-----------------------------------------------------------------------------
160 
162 {
163  Q_OBJECT
164 
165 public:
166 
167  explicit SearchFieldKeyword(QObject* const parent);
168 
169  void read(SearchXmlCachingReader& reader) override;
170  void write(SearchXmlWriter& writer) override;
171 };
172 
173 //-----------------------------------------------------------------------------
174 
176 {
177  Q_OBJECT
178 
179 public:
180 
181  explicit SearchFieldRangeInt(QObject* const parent);
182 
183  void setBetweenText(const QString& text);
184  void setNoValueText(const QString& text);
185  void setNumberPrefixAndSuffix(const QString& prefix, const QString& suffix);
186  void setBoundary(int min, int max, int step = 1);
187  void enableFractionMagic(const QString& prefix);
188 
189  void setSuggestedValues(const QList<int>& values);
190  void setSuggestedInitialValue(int initialValue);
191  void setSingleSteps(int smaller, int larger);
192  void setInvertStepping(bool invert);
193 
194  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
195  void read(SearchXmlCachingReader& reader) override;
196  void write(SearchXmlWriter& writer) override;
197  void reset() override;
198  void setValueWidgetsVisible(bool visible) override;
199  QList<QRect> valueWidgetRects() const override;
200 
201 protected Q_SLOTS:
202 
203  void valueChanged();
204 
205 protected:
206 
207  int m_min;
208  int m_max;
212  QLabel* m_betweenLabel;
213 
214 private:
215 
216  // Disable
217  SearchFieldRangeInt(const SearchFieldRangeInt&) = delete;
218  SearchFieldRangeInt& operator=(const SearchFieldRangeInt&) = delete;
219 };
220 
221 //-----------------------------------------------------------------------------
222 
224 {
225  Q_OBJECT
226 
227 public:
228 
229  explicit SearchFieldRangeDouble(QObject* const parent);
230 
231  void setBetweenText(const QString& text);
232  void setNoValueText(const QString& text);
233  void setNumberPrefixAndSuffix(const QString& prefix, const QString& suffix);
234  void setBoundary(double min, double max, int decimals, double step);
235  void setFactor(double factor);
236 
237  void setSuggestedValues(const QList<double>& values);
238  void setSuggestedInitialValue(double initialValue);
239  void setSingleSteps(double smaller, double larger);
240  void setInvertStepping(bool invert);
241 
242  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
243  void read(SearchXmlCachingReader& reader) override;
244  void write(SearchXmlWriter& writer) override;
245  void reset() override;
246  void setValueWidgetsVisible(bool visible) override;
247  QList<QRect> valueWidgetRects() const override;
248 
249 protected Q_SLOTS:
250 
251  void valueChanged();
252 
253 protected:
254 
255  double m_min;
256  double m_max;
257  double m_factor;
260  QLabel* m_betweenLabel;
261 
262 private:
263 
264  // Disable
266  SearchFieldRangeDouble& operator=(const SearchFieldRangeDouble&) = delete;
267 };
268 
269 //-----------------------------------------------------------------------------
270 
272 {
273  Q_OBJECT
274 
275 public:
276 
277  enum Type
278  {
280  DateTime
281  };
282 
283 public:
284 
285  SearchFieldRangeDate(QObject* const parent, Type type);
286 
287  void setBetweenText(const QString& between);
288  void setBoundary(const QDateTime& min, const QDateTime& max);
289 
290  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
291  void read(SearchXmlCachingReader& reader) override;
292  void write(SearchXmlWriter& writer) override;
293  void reset() override;
294  void setValueWidgetsVisible(bool visible) override;
295  QList<QRect> valueWidgetRects() const override;
296 
297 protected Q_SLOTS:
298 
299  void valueChanged();
300 
301 protected:
302 
303  QTimeEdit* m_firstTimeEdit;
305  QTimeEdit* m_secondTimeEdit;
307  QLabel* m_betweenLabel;
308 
310 
311 private:
312 
313  // Disable
315  SearchFieldRangeDate& operator=(const SearchFieldRangeDate&) = delete;
316 };
317 
318 //-----------------------------------------------------------------------------
319 
321 {
322  Q_OBJECT
323 
324 public:
325 
326  explicit SearchFieldChoice(QObject* const parent);
327 
328  void setChoice(const QMap<int, QString>& map);
329  void setChoice(const QStringList& choice);
330  void setAnyText(const QString& anyText);
331 
332  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
333  void read(SearchXmlCachingReader& reader) override;
334  void write(SearchXmlWriter& writer) override;
335  void reset() override;
336  void setValueWidgetsVisible(bool visible) override;
337  QList<QRect> valueWidgetRects() const override;
338 
339 protected Q_SLOTS:
340 
341  void checkStateChanged();
342 
343 protected:
344 
345  void updateComboText();
346 
347 protected:
348 
350 
351 #if (QT_VERSION > QT_VERSION_CHECK(5, 99, 0))
353 #else
355 #endif
356 
357  QString m_anyText;
359 
360 private:
361 
362  // Disable
363  SearchFieldChoice(const SearchFieldChoice&) = delete;
364  SearchFieldChoice& operator=(const SearchFieldChoice&) = delete;
365 };
366 
367 //-----------------------------------------------------------------------------
368 
369 class Album;
374 class SqueezedComboBox;
375 
377 {
378  Q_OBJECT
379 
380 public:
381 
382  enum Type
383  {
385  TypeTag
386  };
387 
389  {
392  InTree
393  };
394 
395 public:
396 
397  SearchFieldAlbum(QObject* const parent, Type type);
398 
399  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
400  void read(SearchXmlCachingReader& reader) override;
401  void write(SearchXmlWriter& writer) override;
402  void reset() override;
403  void setValueWidgetsVisible(bool visible) override;
404  QList<QRect> valueWidgetRects() const override;
405 
406 protected Q_SLOTS:
407 
408  void updateState();
409 
410 protected:
411 
412  QWidget* m_wrapperBox;
418 };
419 
420 //-----------------------------------------------------------------------------
421 
423 {
424  Q_OBJECT
425 
426 public:
427 
428  explicit SearchFieldRating(QObject* const parent);
429 
430  void setBetweenText(const QString& text);
431 
432  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
433  void read(SearchXmlCachingReader& reader) override;
434  void write(SearchXmlWriter& writer) override;
435  void reset() override;
436  void setValueWidgetsVisible(bool visible) override;
437  QList<QRect> valueWidgetRects() const override;
438 
439 protected Q_SLOTS:
440 
441  void firstValueChanged();
442  void secondValueChanged();
443 
444 protected:
445 
448  QLabel* m_betweenLabel;
449 
450 private:
451 
452  // Disable
453  SearchFieldRating(const SearchFieldRating&) = delete;
454  SearchFieldRating& operator=(const SearchFieldRating&) = delete;
455 };
456 
457 //-----------------------------------------------------------------------------
458 
460 {
461  Q_OBJECT
462 
463 public:
464 
465  explicit SearchFieldComboBox(QObject* const parent);
466 
467  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
468  void write(SearchXmlWriter& writer) override;
469  void reset() override;
470  void setValueWidgetsVisible(bool visible) override;
471  QList<QRect> valueWidgetRects() const override;
472 
473 protected Q_SLOTS:
474 
475  void indexChanged(int);
476 
477 protected:
478 
479  QComboBox* m_comboBox;
480 };
481 
482 //-----------------------------------------------------------------------------
483 
485 {
486  Q_OBJECT
487 
488 public:
489 
490  explicit SearchFieldCheckBox(QObject* const parent);
491 
492  void setLabel(const QString& text);
493 
494  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
495  void read(SearchXmlCachingReader& reader) override;
496  void write(SearchXmlWriter& writer) override;
497  void reset() override;
498  void setValueWidgetsVisible(bool visible) override;
499  QList<QRect> valueWidgetRects() const override;
500 
501 protected Q_SLOTS:
502 
503  void slotToggled(bool checked);
504 
505 protected:
506 
507  QCheckBox* m_checkBox;
508  QString m_text;
509 };
510 
511 //-----------------------------------------------------------------------------
512 
514 {
515  Q_OBJECT
516 
517 public:
518 
519  explicit SearchFieldColorDepth(QObject* const parent);
520 
521  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
522  void read(SearchXmlCachingReader& reader) override;
523 };
524 
525 //-----------------------------------------------------------------------------
526 
528 {
529  Q_OBJECT
530 
531 public:
532 
533  explicit SearchFieldPageOrientation(QObject* const parent);
534 
535  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
536  void read(SearchXmlCachingReader& reader) override;
537 };
538 
539 //-----------------------------------------------------------------------------
540 
542 {
543  Q_OBJECT
544 
545 public:
546 
547  explicit SearchFieldLabels(QObject* const parent);
548 
549  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
550  void read(SearchXmlCachingReader& reader) override;
551  void write(SearchXmlWriter& writer) override;
552  void reset() override;
553  void setValueWidgetsVisible(bool visible) override;
554  QList<QRect> valueWidgetRects() const override;
555 
556 protected Q_SLOTS:
557 
558  void updateState();
559 
560 protected:
561 
564 };
565 
566 //-----------------------------------------------------------------------------
567 
569 {
570  Q_OBJECT
571 
572 public:
573 
574  explicit SearchFieldMonthDay(QObject* const parent);
575 
576  void setupValueWidgets(QGridLayout* layout, int row, int column) override;
577  void read(SearchXmlCachingReader& reader) override;
578  void write(SearchXmlWriter& writer) override;
579  void reset() override;
580  void setValueWidgetsVisible(bool visible) override;
581  QList<QRect> valueWidgetRects() const override;
582 
583 protected Q_SLOTS:
584 
585  void slotIndexChanged();
586 
587 protected:
588 
589  QLabel* m_dayLabel;
590  QComboBox* m_monthBox;
591  QComboBox* m_dayBox;
592 };
593 
594 } // namespace Digikam
595 
596 #endif // DIGIKAM_SEARCH_FIELDS_H
Definition: albumselectcombobox.h:127
Definition: abstractalbummodel.h:358
Definition: albumselectcombobox.h:167
Abstract base class for all album types.
Definition: album.h:67
Definition: searchutilities.h:49
Definition: choicesearchutilities.h:201
Definition: choicesearchutilities.h:43
Definition: colorlabelfilter.h:42
Definition: searchutilities.h:108
Definition: searchutilities.h:164
Definition: ddateedit.h:52
Definition: picklabelfilter.h:42
Definition: ratingsearchutilities.h:49
Definition: searchfields.h:377
void updateState()
Definition: searchfields_album.cpp:81
TagTreeViewSelectComboBox * m_tagComboBox
Definition: searchfields.h:414
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_album.cpp:86
Type
Definition: searchfields.h:383
@ TypeAlbum
Definition: searchfields.h:384
@ TypeTag
Definition: searchfields.h:385
void reset() override
Definition: searchfields_album.cpp:194
SearchFieldAlbum(QObject *const parent, Type type)
Definition: searchfields_album.cpp:30
SqueezedComboBox * m_operation
Definition: searchfields.h:415
AbstractCheckableAlbumModel * m_model
Definition: searchfields.h:417
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_album.cpp:204
AlbumTreeViewSelectComboBox * m_albumComboBox
Definition: searchfields.h:413
Type m_type
Definition: searchfields.h:416
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_album.cpp:41
void write(SearchXmlWriter &writer) override
Definition: searchfields_album.cpp:143
Operation
Definition: searchfields.h:389
@ All
Definition: searchfields.h:390
@ InTree
Definition: searchfields.h:392
@ OneOf
Definition: searchfields.h:391
QWidget * m_wrapperBox
Definition: searchfields.h:412
QList< QRect > valueWidgetRects() const override
Definition: searchfields_album.cpp:209
Definition: searchfields.h:485
void write(SearchXmlWriter &writer) override
Definition: searchfields_checkbox.cpp:55
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_checkbox.cpp:75
QList< QRect > valueWidgetRects() const override
Definition: searchfields_checkbox.cpp:85
QString m_text
Definition: searchfields.h:508
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_checkbox.cpp:36
void setLabel(const QString &text)
Definition: searchfields_checkbox.cpp:45
SearchFieldCheckBox(QObject *const parent)
Definition: searchfields_checkbox.cpp:30
QCheckBox * m_checkBox
Definition: searchfields.h:507
void reset() override
Definition: searchfields_checkbox.cpp:80
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_checkbox.cpp:64
void slotToggled(bool checked)
Definition: searchfields_checkbox.cpp:93
Definition: searchfields.h:321
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_choice.cpp:43
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_choice.cpp:236
void updateComboText()
Definition: searchfields_choice.cpp:95
QString m_anyText
Definition: searchfields.h:357
void write(SearchXmlWriter &writer) override
Definition: searchfields_choice.cpp:166
ChoiceSearchModel * m_model
Definition: searchfields.h:358
SearchFieldChoice(QObject *const parent)
Definition: searchfields_choice.cpp:30
void setAnyText(const QString &anyText)
Definition: searchfields_choice.cpp:85
QList< QRect > valueWidgetRects() const override
Definition: searchfields_choice.cpp:241
void checkStateChanged()
Definition: searchfields_choice.cpp:90
void reset() override
Definition: searchfields_choice.cpp:231
QVariant::Type m_type
Definition: searchfields.h:354
ChoiceSearchComboBox * m_comboBox
Definition: searchfields.h:349
void setChoice(const QMap< int, QString > &map)
Definition: searchfields_choice.cpp:65
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_choice.cpp:117
Definition: searchfields.h:514
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_colordepth.cpp:35
SearchFieldColorDepth(QObject *const parent)
Definition: searchfields_colordepth.cpp:30
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_colordepth.cpp:45
Definition: searchfields.h:460
QComboBox * m_comboBox
Definition: searchfields.h:479
QList< QRect > valueWidgetRects() const override
Definition: searchfields_combobox.cpp:73
void indexChanged(int)
Definition: searchfields_combobox.cpp:81
SearchFieldComboBox(QObject *const parent)
Definition: searchfields_combobox.cpp:30
void reset() override
Definition: searchfields_combobox.cpp:68
void write(SearchXmlWriter &writer) override
Definition: searchfields_combobox.cpp:46
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_combobox.cpp:63
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_combobox.cpp:36
Definition: searchfieldgroup.h:52
Definition: searchfields.h:162
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_keyword.cpp:35
SearchFieldKeyword(QObject *const parent)
Definition: searchfields_keyword.cpp:30
void write(SearchXmlWriter &writer) override
Definition: searchfields_keyword.cpp:41
Definition: searchfields.h:542
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_labels.cpp:152
PickLabelFilter * m_pickLabelFilter
Definition: searchfields.h:562
QList< QRect > valueWidgetRects() const override
Definition: searchfields_labels.cpp:158
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_labels.cpp:37
void write(SearchXmlWriter &writer) override
Definition: searchfields_labels.cpp:101
SearchFieldLabels(QObject *const parent)
Definition: searchfields_labels.cpp:30
ColorLabelFilter * m_colorLabelFilter
Definition: searchfields.h:563
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_labels.cpp:62
void updateState()
Definition: searchfields_labels.cpp:57
void reset() override
Definition: searchfields_labels.cpp:146
Definition: searchfields.h:569
QComboBox * m_dayBox
Definition: searchfields.h:591
SearchFieldMonthDay(QObject *const parent)
Definition: searchfields_monthday.cpp:30
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_monthday.cpp:110
QList< QRect > valueWidgetRects() const override
Definition: searchfields_monthday.cpp:117
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_monthday.cpp:38
QComboBox * m_monthBox
Definition: searchfields.h:590
void write(SearchXmlWriter &writer) override
Definition: searchfields_monthday.cpp:91
void reset() override
Definition: searchfields_monthday.cpp:104
QLabel * m_dayLabel
Definition: searchfields.h:589
void slotIndexChanged()
Definition: searchfields_monthday.cpp:126
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_monthday.cpp:75
Definition: searchfields.h:528
SearchFieldPageOrientation(QObject *const parent)
Definition: searchfields_pageorientation.cpp:30
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_pageorientation.cpp:45
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_pageorientation.cpp:35
Definition: searchfields.h:272
QLabel * m_betweenLabel
Definition: searchfields.h:307
Type
Definition: searchfields.h:278
@ DateOnly
Definition: searchfields.h:279
@ DateTime
Definition: searchfields.h:280
void setBetweenText(const QString &between)
Definition: searchfields_rangedate.cpp:81
DDateEdit * m_firstDateEdit
Definition: searchfields.h:304
DDateEdit * m_secondDateEdit
Definition: searchfields.h:306
QTimeEdit * m_secondTimeEdit
Definition: searchfields.h:305
void write(SearchXmlWriter &writer) override
Definition: searchfields_rangedate.cpp:167
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_rangedate.cpp:41
void reset() override
Definition: searchfields_rangedate.cpp:243
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_rangedate.cpp:86
QTimeEdit * m_firstTimeEdit
Definition: searchfields.h:303
Type m_type
Definition: searchfields.h:309
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_rangedate.cpp:270
void valueChanged()
Definition: searchfields_rangedate.cpp:309
QList< QRect > valueWidgetRects() const override
Definition: searchfields_rangedate.cpp:289
void setBoundary(const QDateTime &min, const QDateTime &max)
Definition: searchfields_rangedate.cpp:262
SearchFieldRangeDate(QObject *const parent, Type type)
Definition: searchfields_rangedate.cpp:30
Definition: searchfields.h:224
CustomStepsDoubleSpinBox * m_firstBox
Definition: searchfields.h:258
void setSuggestedValues(const QList< double > &values)
Definition: searchfields_rangedouble.cpp:172
void valueChanged()
Definition: searchfields_rangedouble.cpp:196
void setSuggestedInitialValue(double initialValue)
Definition: searchfields_rangedouble.cpp:178
void setBoundary(double min, double max, int decimals, double step)
Definition: searchfields_rangedouble.cpp:151
void setBetweenText(const QString &text)
Definition: searchfields_rangedouble.cpp:132
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_rangedouble.cpp:238
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_rangedouble.cpp:69
void write(SearchXmlWriter &writer) override
Definition: searchfields_rangedouble.cpp:95
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_rangedouble.cpp:43
QList< QRect > valueWidgetRects() const override
Definition: searchfields_rangedouble.cpp:245
void setInvertStepping(bool invert)
Definition: searchfields_rangedouble.cpp:190
QLabel * m_betweenLabel
Definition: searchfields.h:260
SearchFieldRangeDouble(QObject *const parent)
Definition: searchfields_rangedouble.cpp:30
CustomStepsDoubleSpinBox * m_secondBox
Definition: searchfields.h:259
void setFactor(double factor)
Definition: searchfields_rangedouble.cpp:167
void setNoValueText(const QString &text)
Definition: searchfields_rangedouble.cpp:137
void setNumberPrefixAndSuffix(const QString &prefix, const QString &suffix)
Definition: searchfields_rangedouble.cpp:143
double m_min
Definition: searchfields.h:255
double m_max
Definition: searchfields.h:256
void reset() override
Definition: searchfields_rangedouble.cpp:230
double m_factor
Definition: searchfields.h:257
void setSingleSteps(double smaller, double larger)
Definition: searchfields_rangedouble.cpp:184
Definition: searchfields.h:176
void enableFractionMagic(const QString &prefix)
Definition: searchfields_rangeint.cpp:269
void write(SearchXmlWriter &writer) override
Definition: searchfields_rangeint.cpp:156
int m_min
Definition: searchfields.h:207
void setSingleSteps(int smaller, int larger)
Definition: searchfields_rangeint.cpp:292
void setNoValueText(const QString &text)
int m_max
Definition: searchfields.h:208
QLabel * m_betweenLabel
Definition: searchfields.h:212
QList< QRect > valueWidgetRects() const override
Definition: searchfields_rangeint.cpp:387
void setSuggestedValues(const QList< int > &values)
Definition: searchfields_rangeint.cpp:280
bool m_reciprocal
Definition: searchfields.h:209
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_rangeint.cpp:380
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_rangeint.cpp:43
void setNumberPrefixAndSuffix(const QString &prefix, const QString &suffix)
Definition: searchfields_rangeint.cpp:239
void setBoundary(int min, int max, int step=1)
Definition: searchfields_rangeint.cpp:247
CustomStepsIntSpinBox * m_firstBox
Definition: searchfields.h:210
SearchFieldRangeInt(QObject *const parent)
Definition: searchfields_rangeint.cpp:30
void reset() override
Definition: searchfields_rangeint.cpp:372
void setBetweenText(const QString &text)
Definition: searchfields_rangeint.cpp:234
void valueChanged()
Definition: searchfields_rangeint.cpp:304
void setSuggestedInitialValue(int initialValue)
Definition: searchfields_rangeint.cpp:286
void setInvertStepping(bool invert)
Definition: searchfields_rangeint.cpp:298
CustomStepsIntSpinBox * m_secondBox
Definition: searchfields.h:211
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_rangeint.cpp:68
Definition: searchfields.h:423
void reset() override
Definition: searchfields_rating.cpp:188
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_rating.cpp:51
void setBetweenText(const QString &text)
Definition: searchfields_rating.cpp:139
SearchFieldRating(QObject *const parent)
Definition: searchfields_rating.cpp:30
QLabel * m_betweenLabel
Definition: searchfields.h:448
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_rating.cpp:38
QList< QRect > valueWidgetRects() const override
Definition: searchfields_rating.cpp:201
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_rating.cpp:194
void secondValueChanged()
Definition: searchfields_rating.cpp:170
RatingComboBox * m_secondBox
Definition: searchfields.h:447
void write(SearchXmlWriter &writer) override
Definition: searchfields_rating.cpp:98
RatingComboBox * m_firstBox
Definition: searchfields.h:446
void firstValueChanged()
Definition: searchfields_rating.cpp:144
Definition: searchfields.h:136
QLineEdit * m_edit
Definition: searchfields.h:156
void reset() override
Definition: searchfields_text.cpp:63
void write(SearchXmlWriter &writer) override
Definition: searchfields_text.cpp:51
SearchFieldText(QObject *const parent)
Definition: searchfields_text.cpp:30
void valueChanged(const QString &text)
Definition: searchfields_text.cpp:81
void setValueWidgetsVisible(bool visible) override
Definition: searchfields_text.cpp:68
void read(SearchXmlCachingReader &reader) override
Definition: searchfields_text.cpp:45
void setupValueWidgets(QGridLayout *layout, int row, int column) override
Definition: searchfields_text.cpp:36
QList< QRect > valueWidgetRects() const override
Definition: searchfields_text.cpp:73
Definition: searchfields.h:66
virtual bool supportsField(const QString &fieldName)
Definition: searchfields.cpp:110
QList< QRect > widgetRects(WidgetRectType=ValueWidgetRectsOnly) const
Definition: searchfields.cpp:156
void setValidValueState(bool valueIsValid)
Definition: searchfields.cpp:176
virtual QList< QRect > valueWidgetRects() const =0
void setup(QGridLayout *const layout, int row=-1)
Definition: searchfields.cpp:40
bool isVisible() override
Definition: searchfields.cpp:123
bool m_valueIsValid
Definition: searchfields.h:124
QString m_name
Definition: searchfields.h:116
void setVisible(bool visible) override
Definition: searchfields.cpp:115
void clearButtonClicked()
Definition: searchfields.cpp:171
virtual void reset()=0
void setCategoryLabelVisibleFromPreviousField(SearchField *const previousField)
Definition: searchfields.cpp:144
void setCategoryLabelVisible(bool visible)
Definition: searchfields.cpp:130
virtual void setupLabels(QGridLayout *layout, int line)
Definition: searchfields.cpp:91
void setFieldName(const QString &fieldName)
Definition: searchfields.cpp:99
static SearchField * createField(const QString &fieldName, SearchFieldGroup *const parent)
Definition: searchfields_createfield.cpp:30
QLabel * m_label
Definition: searchfields.h:118
virtual void read(SearchXmlCachingReader &reader)=0
AnimatedClearButton * m_clearButton
Definition: searchfields.h:121
virtual void setText(const QString &label, const QString &detailLabel)
Definition: searchfields.cpp:104
WidgetRectType
Definition: searchfields.h:72
@ LabelAndValueWidgetRects
Definition: searchfields.h:73
@ ValueWidgetRectsOnly
Definition: searchfields.h:74
SearchField(QObject *const parent)
Definition: searchfields.cpp:30
virtual void write(SearchXmlWriter &writer)=0
virtual void setValueWidgetsVisible(bool visible)=0
QLabel * m_detailLabel
Definition: searchfields.h:119
virtual void setupValueWidgets(QGridLayout *layout, int row, int column)=0
bool m_categoryLabelVisible
Definition: searchfields.h:123
Definition: coredbsearchxml.h:376
Definition: coredbsearchxml.h:224
Definition: squeezedcombobox.h:51
Definition: albumselectcombobox.h:183
Definition: visibilitycontroller.h:40
Definition: piwigotalker.h:48
QStringView prefix
Definition: itemviewutilities.cpp:593
QStringView suffix
Definition: itemviewutilities.cpp:594
Type
Definition: coredbconstants.h:44
Definition: datefolderview.cpp:43
Type
Definition: gpsitemcontainer.h:45