Sayonara Player
Toggle main menu visibility
Loading...
Searching...
No Matches
src
Gui
Utils
GuiUtils.h
1
/* GuiUtils.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 GUI_UTILS_H
22
#define GUI_UTILS_H
23
24
class
QWidget;
25
class
QPixmap;
26
class
QColor;
27
class
QFontMetrics;
28
class
QImage;
29
class
QString;
30
class
QIcon;
31
class
QPoint;
32
class
QMainWindow;
33
class
QScreen;
34
class
QSize;
35
36
template
<
typename
T>
37
class
QList
;
38
39
#include <QPalette>
40
41
namespace
Gui
42
{
43
namespace
Util
44
{
45
enum
IconTheme
46
{
47
Dark,
// MintY icons
48
Internal
// Self painted icons
49
};
50
51
QImage image(
const
QString& iconName, IconTheme themeName);
52
QImage image(
const
QString& iconName, IconTheme themeName,
const
QSize& size,
bool
keepAspectRatio =
true
);
53
54
QScreen* getBiggestScreen();
55
56
QColor color(QPalette::ColorGroup colorGroup, QPalette::ColorRole colorRole);
57
58
void
placeInScreenCenter(QWidget* widget,
float
relativeSizeX,
float
relativeSizeY);
59
60
int
textWidth(
const
QFontMetrics& fm,
const
QString& text);
61
int
textWidth(QWidget* widget,
const
QString& text);
62
63
int
viewRowHeight(
const
QFontMetrics& fontMetrics);
64
}
65
}
66
67
#endif
// GUI_UTILS_H
QList
Definition
EngineUtils.h:33
Generated on
for Sayonara Player by
1.17.0