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