Sayonara Player
PreferenceAction.h
1/* PreferenceAction.h */
2
3/* Copyright (C) 2011-2020 Michael Lugmair (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
28class QPushButton;
29
30namespace Gui
31{
39 public QAction
40 {
41 Q_OBJECT
42 PIMPL(PreferenceAction)
43
44 public:
45 PreferenceAction(const QString& displayName, const QString& identifier, QWidget* parent);
46 virtual ~PreferenceAction();
47
48 virtual QString label() const;
49 virtual QString identifier() const=0;
50
51 virtual QPushButton* createButton(QWidget* parent);
52
53 protected:
54 virtual QString displayName() const=0;
55 void language_changed();
56 };
57
63 public PreferenceAction
64 {
65 Q_OBJECT
66 public:
67 LibraryPreferenceAction(QWidget* parent);
68 ~LibraryPreferenceAction() override;
69
70 QString displayName() 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 displayName() const override;
87 QString identifier() const override;
88 };
89
95 public PreferenceAction
96 {
97 Q_OBJECT
98 public:
99 SearchPreferenceAction(QWidget* parent);
100 ~SearchPreferenceAction() override;
101
102 QString displayName() const override;
103 QString identifier() const override;
104 };
105
111 public PreferenceAction
112 {
113 Q_OBJECT
114 public:
115 CoverPreferenceAction(QWidget* parent);
116 ~CoverPreferenceAction() override;
117
118 QString displayName() const override;
119 QString identifier() const override;
120 };
121
127 public PreferenceAction
128 {
129 Q_OBJECT
130 public:
131 PlayerPreferencesAction(QWidget* parent);
132 ~PlayerPreferencesAction() override;
133
134 QString displayName() 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 displayName() const override;
151 QString identifier() const override;
152 };
153
154
156 {
157 Q_OBJECT
158
159 public:
160 ShortcutPreferenceAction(QWidget* parent);
161 ~ShortcutPreferenceAction() override;
162
163 QString identifier() const override;
164 QString displayName() const override;
165 };
166}
167
168#endif // PREFERENCEACTION_H
The CoverPreferenceAction class.
Definition: PreferenceAction.h:112
The LibraryPreferenceAction class.
Definition: PreferenceAction.h:64
The PlayerPreferencesAction class.
Definition: PreferenceAction.h:128
The PlaylistPreferenceAction class.
Definition: PreferenceAction.h:80
A PreferenceAction can be added to each widget supporting QActions. When triggering this action,...
Definition: PreferenceAction.h:40
The SearchPreferenceAction class.
Definition: PreferenceAction.h:96
Definition: PreferenceAction.h:156
The StreamRecorderPreferenceAction class.
Definition: PreferenceAction.h:144