Sayonara Player
GuiUtils.h
1 /* GuiUtils.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 
22 /* GuiUtils.h */
23 
24 #ifndef GuiUtils_H
25 #define GuiUtils_H
26 
27 class QWidget;
28 class QPixmap;
29 class QImage;
30 class QString;
31 class QIcon;
32 class QPoint;
33 class QMainWindow;
34 class QScreen;
35 class QSize;
36 
37 template<typename T>
38 class QList;
39 
40 namespace Gui
41 {
42 
43  namespace Util
44  {
45 
50  enum IconTheme
51  {
52  MintY,
53  NoTheme
54  };
55 
62  QIcon icon(const QString& icon_name, IconTheme theme_name);
63 
64 
74  QPixmap pixmap(const QString& icon_name, IconTheme theme_name);
75  QPixmap pixmap(const QString& icon_name, IconTheme theme_name, QSize sz, bool keep_aspect=true);
76 
84  QImage image(const QString& icon_name, IconTheme theme_name);
85  QImage image(const QString& icon_name, IconTheme theme_name, QSize sz, bool keep_aspect=true);
86 
87 
93  void set_main_window(QMainWindow* window);
94 
100  QMainWindow* main_window();
101  }
102 }
103 
104 #endif // GuiUtils_H
IconTheme
The IconTheme enum.
Definition: GuiUtils.h:50
QImage image(const QString &icon_name, IconTheme theme_name)
see pixmap()
Helper functions.
Definition: GenreView.h:35
QPixmap pixmap(const QString &icon_name, IconTheme theme_name)
fetch a pixmap from resources
QIcon icon(const QString &icon_name, IconTheme theme_name)
fetch a icon from resources
void set_main_window(QMainWindow *window)
set the applications' main window
QMainWindow * main_window()
get the applications' main window
Definition: EngineUtils.h:33