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 "Utils/Settings/SayonaraClass.h"
28 #include "Utils/Pimpl.h"
29 
30 class QString;
31 class QWidget;
32 
34  public QAction,
35  public SayonaraClass
36 {
37  Q_OBJECT
38  PIMPL(PreferenceAction)
39 
40  public:
41  PreferenceAction(const QString& display_name, const QString& identifier, QWidget* parent);
42  virtual ~PreferenceAction();
43 
44  virtual QString label() const;
45  virtual QString identifier() const=0;
46 
47  protected:
48  virtual QString display_name() const=0;
49  void language_changed();
50 };
51 
53  public PreferenceAction
54 {
55  public:
56  LibraryPreferenceAction(QWidget* parent);
57  QString display_name() const override;
58  QString identifier() const override;
59 };
60 
62  public PreferenceAction
63 {
64  public:
65  PlaylistPreferenceAction(QWidget* parent);
66 
67  QString display_name() const override;
68  QString identifier() const override;
69 };
70 
72  public PreferenceAction
73 {
74  public:
75  SearchPreferenceAction(QWidget* parent);
76  QString display_name() const override;
77  QString identifier() const override;
78 };
79 
81  public PreferenceAction
82 {
83  public:
84  CoverPreferenceAction(QWidget* parent);
85  QString display_name() const override;
86  QString identifier() const override;
87 };
88 
89 
91  public PreferenceAction
92 {
93  public:
94  PlayerPreferencesAction(QWidget* parent);
95  QString display_name() const override;
96  QString identifier() const override;
97 };
98 
99 
100 #endif // PREFERENCEACTION_H
The SayonaraClass class provides access to Settings and notifications.
Definition: SayonaraClass.h:29
Definition: PreferenceAction.h:80
Definition: PreferenceAction.h:33
Definition: PreferenceAction.h:71
Definition: PreferenceAction.h:52
Definition: PreferenceAction.h:90
Definition: PreferenceAction.h:61