Sayonara Player
Loading...
Searching...
No Matches
src
Gui
Utils
PreferenceAction.h
1
/* PreferenceAction.h */
2
3
/* Copyright (C) 2011-2024 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
28
class
QPushButton;
29
30
namespace
Gui
31
{
38
class
PreferenceAction :
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
62
class
LibraryPreferenceAction :
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
78
class
PlaylistPreferenceAction :
79
public
PreferenceAction
80
{
81
Q_OBJECT
82
public
:
83
PlaylistPreferenceAction(QWidget* parent);
84
~PlaylistPreferenceAction()
override
;
85
86
QString displayName()
const override
;
87
QString identifier()
const override
;
88
};
89
94
class
SearchPreferenceAction :
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
110
class
CoverPreferenceAction :
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
126
class
PlayerPreferencesAction :
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
142
class
StreamRecorderPreferenceAction :
143
public
PreferenceAction
144
{
145
Q_OBJECT
146
public
:
147
StreamRecorderPreferenceAction(QWidget* parent);
148
~StreamRecorderPreferenceAction()
override
;
149
150
QString displayName()
const override
;
151
QString identifier()
const override
;
152
};
153
154
class
ShortcutPreferenceAction :
155
public
Gui::PreferenceAction
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
Gui::PreferenceAction
A PreferenceAction can be added to each widget supporting QActions. When triggering this action,...
Definition
PreferenceAction.h:40
Generated on Wed Mar 12 2025 00:00:00 for Sayonara Player by
1.13.2