Sayonara Player
PreferenceAction.h
1 /* PreferenceAction.h */
2 
3 /* Copyright (C) 2011-2019 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/Pimpl.h"
25 
26 #include <QAction>
27 
28 class QPushButton;
30  public QAction
31 {
32  Q_OBJECT
33  PIMPL(PreferenceAction)
34 
35  public:
36  PreferenceAction(const QString& display_name, const QString& identifier, QWidget* parent);
37  virtual ~PreferenceAction();
38 
39  virtual QString label() const;
40  virtual QString identifier() const=0;
41 
42  virtual QPushButton* create_button(QWidget* parent);
43 
44  protected:
45  virtual QString display_name() const=0;
46  void language_changed();
47 };
48 
50  public PreferenceAction
51 {
52  Q_OBJECT
53  public:
54  LibraryPreferenceAction(QWidget* parent);
56 
57  QString display_name() const override;
58  QString identifier() const override;
59 };
60 
62  public PreferenceAction
63 {
64  Q_OBJECT
65  public:
66  PlaylistPreferenceAction(QWidget* parent);
68 
69  QString display_name() const override;
70  QString identifier() const override;
71 };
72 
74  public PreferenceAction
75 {
76  Q_OBJECT
77  public:
78  SearchPreferenceAction(QWidget* parent);
80 
81  QString display_name() const override;
82  QString identifier() const override;
83 };
84 
86  public PreferenceAction
87 {
88  Q_OBJECT
89  public:
90  CoverPreferenceAction(QWidget* parent);
92 
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);
105 
106  QString display_name() const override;
107  QString identifier() const override;
108 };
109 
110 
112  public PreferenceAction
113 {
114  Q_OBJECT
115  public:
116  StreamRecorderPreferenceAction(QWidget* parent);
118 
119  QString display_name() const override;
120  QString identifier() const override;
121 };
122 
123 #endif // PREFERENCEACTION_H
Definition: PreferenceAction.h:111
Definition: PreferenceAction.h:85
Definition: PreferenceAction.h:29
Definition: PreferenceAction.h:73
Definition: PreferenceAction.h:49
Definition: PreferenceAction.h:98
Definition: PreferenceAction.h:61