Sayonara Player
src
Gui
Preferences
UiPreferences
GUI_FontPreferences.h
1
2
/* Copyright (C) 2011-2019 Lucio Carreras
3
*
4
* This file is part of sayonara player
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
15
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
18
*/
19
20
#ifndef GUI_FONTPREFERENCES_H
21
#define GUI_FONTPREFERENCES_H
22
23
#include "Gui/Utils/Widgets/Widget.h"
24
#include "Utils/Pimpl.h"
25
26
UI_FWD(
GUI_FontPreferences
)
27
28
class
QFont;
29
class
QFontDatabase;
30
31
class
GUI_FontPreferences
:
32
public
Gui::Widget
33
{
34
Q_OBJECT
35
UI_CLASS(
GUI_FontPreferences
)
36
PIMPL(
GUI_FontPreferences
)
37
38
public
:
39
explicit
GUI_FontPreferences
(QWidget* parent=
nullptr
);
40
virtual
~
GUI_FontPreferences
();
41
42
bool
commit();
43
void
revert();
44
45
QString action_name()
const
;
46
47
protected
:
48
void
language_changed()
override
;
49
void
showEvent(QShowEvent* e)
override
;
50
51
protected
slots:
52
void
default_clicked();
53
void
combo_fonts_changed(
const
QFont& font);
54
55
private
:
56
QStringList available_font_sizes(
const
QString& font_name,
const
QString&
style
=QString());
57
QStringList available_font_sizes(
const
QFont& font);
58
59
void
fill_sizes(
const
QStringList& sizes);
60
void
init_ui();
61
};
62
63
#endif // FONTCONFIG_H
Style::style
QString style(bool dark)
fetch the stylesheet file formatted as string
Gui::Widget
Widget with Settings connection. Also contains triggers for language_changed() and skin_changed() \nT...
Definition:
Widget.h:37
GUI_FontPreferences
Definition:
GUI_FontPreferences.h:31
Generated on Sun Nov 17 2019 00:00:00 for Sayonara Player by
1.8.16