Sayonara Player
GUI_LibraryPreferences.h
1 /* GUI_LibraryPreferences.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_LIBRARYPREFERENCES_H
22 #define GUI_LIBRARYPREFERENCES_H
23 
24 #include "Interfaces/PreferenceDialog/PreferenceWidget.h"
25 #include "Utils/Pimpl.h"
26 
28 
30  public Preferences::Base
31 {
32  Q_OBJECT
34  UI_CLASS(GUI_LibraryPreferences)
35 
36 public:
37  explicit GUI_LibraryPreferences(const QString& identifier);
38  virtual ~GUI_LibraryPreferences();
39 
40  bool commit() override;
41  void revert() override;
42 
43  QString action_name() const override;
44 
45 protected:
46  void init_ui() override;
47  void retranslate_ui() override;
48  void showEvent(QShowEvent* e) override;
49  QString error_string() const override;
50 
51 private slots:
52  void new_clicked();
53  void edit_clicked();
54  void delete_clicked();
55 
56  void up_clicked();
57  void down_clicked();
58 
59  void edit_dialog_accepted();
60  void current_index_changed(const QModelIndex& idx);
61 
62 private:
63  int current_row() const;
64 };
65 
66 
67 
68 #endif // GUI_LIBRARYPREFERENCES_H
Definition: GUI_PreferenceDialog.h:28
Definition: GUI_LibraryPreferences.h:29