Qt ForkAwesome
0.2.2
Library that bundles ForkAwesome for use within Qt applications
Loading...
Searching...
No Matches
utils.cpp
Go to the documentation of this file.
1
#include "
./utils.h
"
2
#include "
./icon.h
"
3
4
#include <QHash>
5
#include <QString>
6
7
namespace
QtForkAwesome
{
8
15
Icon
iconFromId
(
const
QString &
id
)
16
{
17
static
const
auto
mapping = QHash<QString, Icon>({
18
#include "private/idmapping.h"
19
});
20
const
auto
icon = mapping.find(
id
);
21
return
icon != mapping.cend() ? *icon :
Icon::Invalid
;
22
}
23
24
}
// namespace QtForkAwesome
icon.h
QtForkAwesome
Contains classes provided by the QtForkAwesome library.
Definition
renderer.h:20
QtForkAwesome::Icon
Icon
The Icon enum specifies a ForkAwesome icon for calling QtForkAwesome::Renderer::render().
Definition
icon.h:11
QtForkAwesome::Icon::Invalid
@ Invalid
QtForkAwesome::iconFromId
QT_FORK_AWESOME_EXPORT Icon iconFromId(const QString &id)
Returns a QtForkAwesome::Icon for the specified icon id.
Definition
utils.cpp:15
utils.h
Generated on Wed Oct 16 2024 13:35:19 for Qt ForkAwesome by
1.12.0