-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdiconic.h
58 lines (49 loc) · 1.37 KB
/
diconic.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#ifndef DICONLOOKUP_H
#define DICONLOOKUP_H
#include "libda_global.h"
#include <QObject>
LDA_BEGIN_NAMESPACE
/**
* @brief Provides icon lookup of libdtk available images/icons
*/
class LIBDA_SHARED_EXPORT DIconic : public QObject
{
Q_OBJECT
public:
explicit DIconic(QObject *parent = nullptr);
~DIconic();
/**
* @brief The IconScopes enum, scope used to perform lookups
* @return Sections you want the lookup be performed in
*/
enum IconScopes {
All,
BuiltIn,
BuiltInIcon,
Assets,
Light,
Dark,
BuiltInText,
Chameleon
};
/**
* @brief Make an icon lookup in the available paths depending of the scope. Not found gives an icon too.
* @param icon_name
* @param scope
* @return QIcon* with the icon or or banned icon if not found.
*/
// The result can depend of the versions, better is to use IconScope::All (cross version)
static QIcon *fromString(const QString icon_name, IconScopes scope = IconScopes::All);
/**
* @brief A list of available icons (and their paths)
* @return QStringList of FPs
*/
static QStringList list();
/**
* @brief A list of path that are available to search an icon
* @return QStringList of dirs for lookups
*/
static QStringList listPaths();
};
LDA_END_NAMESPACE
#endif // DICONLOOKUP_H