TDE
0.1.0
Loading...
Searching...
No Matches
icon.hpp
Go to the documentation of this file.
1
12
#pragma once
13
14
#include <cstdint>
15
#include <qicon.h>
16
#include <qmap.h>
17
#include <qpixmap.h>
18
19
#include "
tde/common.hpp
"
20
21
namespace
tde::widgets {
22
27
enum class
IconType
: uint8_t
28
{
29
DEFAULT,
30
HELP_ABOUT,
31
};
32
37
class
TDE_PUBLIC
IconFactory
38
{
39
public
:
40
inline
static
const
QMap<IconType, QString> ICON_MAP = {
41
{ IconType::DEFAULT,
":/tde/icons/default.svg"
},
42
{ IconType::HELP_ABOUT,
":/tde/icons/help-about.svg"
},
43
};
51
static
QIcon icon(
IconType
type);
52
59
static
QIcon icon(
const
QString& path);
60
67
static
QPixmap pixmap(
IconType
type);
68
76
static
QPixmap pixmap(
IconType
type,
const
QSize& size);
77
84
static
QPixmap pixmap(
const
QString& path);
85
};
86
87
}
tde::widgets::IconFactory
Icon factory to load icons.
Definition
icon.hpp:38
common.hpp
Some utility macros.
tde::widgets::IconType
IconType
Embedded icon type.
Definition
icon.hpp:28
include
tde
widgets
icon.hpp
Generated by
1.9.8