]> cloud.milkyroute.net Git - dolphin.git/blob - src/search/selectors/dateselector.h
Clazy fix
[dolphin.git] / src / search / selectors / dateselector.h
1 /*
2 SPDX-FileCopyrightText: 2025 Felix Ernst <felixernst@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7 #ifndef DATESELECTOR_H
8 #define DATESELECTOR_H
9
10 #include "../updatablestateinterface.h"
11
12 #include <QToolButton>
13
14 class KDatePickerPopup;
15
16 namespace Search
17 {
18
19 class DateSelector : public QToolButton, public UpdatableStateInterface
20 {
21 Q_OBJECT
22
23 public:
24 explicit DateSelector(std::shared_ptr<const DolphinQuery> dolphinQuery, QWidget *parent = nullptr);
25
26 /** Causes configurationChanged() to be emitted with a DolphinQuery object that does not contain any restriction settable by this class. */
27 void removeRestriction();
28
29 Q_SIGNALS:
30 /** Is emitted whenever settings have changed and a new search might be necessary. */
31 void configurationChanged(const Search::DolphinQuery &dolphinQuery);
32
33 private:
34 void updateState(const std::shared_ptr<const DolphinQuery> &dolphinQuery) override;
35
36 private:
37 KDatePickerPopup *m_datePickerPopup = nullptr;
38 };
39
40 }
41
42 #endif // DATESELECTOR_H