digiKam
rangemodifier.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 : 2009-09-18
7  * Description : a modifier for displaying only a range of a token result
8  *
9  * Copyright (C) 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_RANGE_MODIFIER_H
25 #define DIGIKAM_RANGE_MODIFIER_H
26 
27 // Local includes
28 
29 #include "modifier.h"
30 #include "ruledialog.h"
31 
32 namespace Ui
33 {
34  class RangeModifierDialogWidget;
35 }
36 
37 namespace Digikam
38 {
39 
40 class RangeDialog : public RuleDialog
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit RangeDialog(Rule* const parent);
47  ~RangeDialog() override;
48 
49  Ui::RangeModifierDialogWidget* const ui;
50 
51 private Q_SLOTS:
52 
53  void slotToTheEndChecked(bool checked);
54 
55 private:
56 
57  // Disable
58  explicit RangeDialog(QWidget*) = delete;
59  RangeDialog(const RangeDialog&) = delete;
60  RangeDialog& operator=(const RangeDialog&) = delete;
61 };
62 
63 // --------------------------------------------------------
64 
65 class RangeModifier : public Modifier
66 {
67  Q_OBJECT
68 
69 public:
70 
71  explicit RangeModifier();
72  QString parseOperation(ParseSettings& settings, const QRegularExpressionMatch& match) override;
73 
74 private Q_SLOTS:
75 
76  void slotTokenTriggered(const QString& token) override;
77 
78 private:
79 
80  // Disable
81  explicit RangeModifier(QObject*) = delete;
82  RangeModifier(const RangeModifier&) = delete;
83  RangeModifier& operator=(const RangeModifier&) = delete;
84 };
85 
86 } // namespace Digikam
87 
88 #endif // DIGIKAM_RANGE_MODIFIER_H
Definition: modifier.h:35
Definition: parsesettings.h:43
Definition: rangemodifier.h:41
RangeDialog(Rule *const parent)
Definition: rangemodifier.cpp:44
~RangeDialog() override
Definition: rangemodifier.cpp:59
Ui::RangeModifierDialogWidget *const ui
Definition: rangemodifier.h:49
Definition: rangemodifier.h:66
RangeModifier()
Definition: rangemodifier.cpp:71
QString parseOperation(ParseSettings &settings, const QRegularExpressionMatch &match) override
Definition: rangemodifier.cpp:113
Definition: ruledialog.h:38
Definition: rule.h:42
Definition: datefolderview.cpp:43