Sayonara Player
PreferenceAction.h
1 /* PreferenceAction.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 PREFERENCEACTION_H
22 #define PREFERENCEACTION_H
23 
24 #include "Utils/Settings/SayonaraClass.h"
25 #include "Utils/Pimpl.h"
26 
27 #include <QAction>
28 
29 class QPushButton;
31  public QAction,
32  public SayonaraClass
33 {
34  Q_OBJECT
35  PIMPL(PreferenceAction)
36 
37  public:
38  PreferenceAction(const QString& display_name, const QString& identifier, QWidget* parent);
39  virtual ~PreferenceAction();
40 
41  virtual QString label() const;
42  virtual QString identifier() const=0;
43 
44  virtual QPushButton* create_button(QWidget* parent);
45 
46  protected:
47  virtual QString display_name() const=0;
48  void language_changed();
49 };
50 
52  public PreferenceAction
53 {
54  Q_OBJECT
55  public:
56  LibraryPreferenceAction(QWidget* parent);
58 
59  QString display_name() const override;
60  QString identifier() const override;
61 };
62 
64  public PreferenceAction
65 {
66  Q_OBJECT
67  public:
68  PlaylistPreferenceAction(QWidget* parent);
70 
71  QString display_name() const override;
72  QString identifier() const override;
73 };
74 
76  public PreferenceAction
77 {
78  Q_OBJECT
79  public:
80  SearchPreferenceAction(QWidget* parent);
82 
83  QString display_name() const override;
84  QString identifier() const override;
85 };
86 
88  public PreferenceAction
89 {
90  Q_OBJECT
91  public:
92  CoverPreferenceAction(QWidget* parent);
94 
95  QString display_name() const override;
96  QString identifier() const override;
97 };
98 
99 
101  public PreferenceAction
102 {
103  Q_OBJECT
104  public:
105  PlayerPreferencesAction(QWidget* parent);
107 
108  QString display_name() const override;
109  QString identifier() const override;
110 };
111 
112 
114  public PreferenceAction
115 {
116  Q_OBJECT
117  public:
118  StreamRecorderPreferenceAction(QWidget* parent);
120 
121  QString display_name() const override;
122  QString identifier() const override;
123 };
124 
125 #endif // PREFERENCEACTION_H
Definition: PreferenceAction.h:113
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:29
Definition: PreferenceAction.h:87
Definition: PreferenceAction.h:30
Definition: PreferenceAction.h:75
Definition: PreferenceAction.h:51
Definition: PreferenceAction.h:100
Definition: PreferenceAction.h:63