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;
29 
30 namespace Gui
31 {
39  public QAction
40  {
41  Q_OBJECT
42  PIMPL(PreferenceAction)
43 
44  public:
45  PreferenceAction(const QString& display_name, const QString& identifier, QWidget* parent);
46  virtual ~PreferenceAction();
47 
48  virtual QString label() const;
49  virtual QString identifier() const=0;
50 
51  virtual QPushButton* create_button(QWidget* parent);
52 
53  protected:
54  virtual QString display_name() const=0;
55  void language_changed();
56  };
57 
63  public PreferenceAction
64  {
65  Q_OBJECT
66  public:
67  LibraryPreferenceAction(QWidget* parent);
69 
70  QString display_name() const override;
71  QString identifier() const override;
72  };
73 
79  public PreferenceAction
80  {
81  Q_OBJECT
82  public:
83  PlaylistPreferenceAction(QWidget* parent);
85 
86  QString display_name() const override;
87  QString identifier() const override;
88  };
89 
95  public PreferenceAction
96  {
97  Q_OBJECT
98  public:
99  SearchPreferenceAction(QWidget* parent);
101 
102  QString display_name() const override;
103  QString identifier() const override;
104  };
105 
111  public PreferenceAction
112  {
113  Q_OBJECT
114  public:
115  CoverPreferenceAction(QWidget* parent);
117 
118  QString display_name() const override;
119  QString identifier() const override;
120  };
121 
127  public PreferenceAction
128  {
129  Q_OBJECT
130  public:
131  PlayerPreferencesAction(QWidget* parent);
133 
134  QString display_name() const override;
135  QString identifier() const override;
136  };
137 
143  public PreferenceAction
144  {
145  Q_OBJECT
146  public:
147  StreamRecorderPreferenceAction(QWidget* parent);
149 
150  QString display_name() const override;
151  QString identifier() const override;
152  };
153 }
154 
155 #endif // PREFERENCEACTION_H
Gui::StreamRecorderPreferenceAction
The StreamRecorderPreferenceAction class.
Definition: PreferenceAction.h:142
Gui::PreferenceAction
A PreferenceAction can be added to each widget supporting QActions. When triggering this action,...
Definition: PreferenceAction.h:38
Gui::LibraryPreferenceAction
The LibraryPreferenceAction class.
Definition: PreferenceAction.h:62
Gui::PlaylistPreferenceAction
The PlaylistPreferenceAction class.
Definition: PreferenceAction.h:78
Gui::PlayerPreferencesAction
The PlayerPreferencesAction class.
Definition: PreferenceAction.h:126
Gui::CoverPreferenceAction
The CoverPreferenceAction class.
Definition: PreferenceAction.h:110
Gui::SearchPreferenceAction
The SearchPreferenceAction class.
Definition: PreferenceAction.h:94