Sayonara Player
GUI_DateSearchConfig.h
1 /* GUI_DateSearchConfig.h */
2 
3 /* Copyright (C) 2011-2017 Lucio Carreras
4  *
5  * This file is part of sayonara player
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11 
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16 
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
21 #ifndef GUI_DATESEARCHCONFIG_H
22 #define GUI_DATESEARCHCONFIG_H
23 
24 #include "GUI/Helper/SayonaraWidget/SayonaraDialog.h"
25 #include "Helper/Pimpl.h"
26 
27 namespace Library { class DateFilter; }
28 namespace Ui{ class GUI_DateSearchConfig; }
29 
31  public SayonaraDialog
32 {
33 public:
34 
35  enum class Result
36  {
37  Cancelled,
38  Replace,
39  New
40  };
41 
42  explicit GUI_DateSearchConfig(QWidget* parent=nullptr);
44 
45  void set_filter(const Library::DateFilter& filter);
46  Library::DateFilter get_edited_filter() const;
47  Result get_result() const;
48 
49 
50 protected slots:
51  void language_changed() override;
52 
53  void ok_clicked();
54  void save_as_clicked();
55  void cancel_clicked();
56 
57 
58 private:
60 
61  Ui::GUI_DateSearchConfig* ui=nullptr;
62 
63 private:
64  void commit();
65 };
66 
67 #endif // GUI_DATESEARCHCONFIG_H
Definition: GUI_SomaFM.h:34
Definition: GUI_DateSearchConfig.h:30
Dialog with Settings connection. Also contains triggers for language_changed() and skin_changed()...
Definition: SayonaraDialog.h:33
Definition: DatabaseAlbums.h:29
Definition: ui_GUI_DateSearchConfig.h:332
The DateFilter class.
Definition: DateFilter.h:38