some refactore
This commit is contained in:
48
include/components/types/icon.hpp
Normal file
48
include/components/types/icon.hpp
Normal file
@@ -0,0 +1,48 @@
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
class Icon {
|
||||
|
||||
public:
|
||||
enum Type {
|
||||
|
||||
HOME_ASSISTANT,
|
||||
CONTROL_CENTER,
|
||||
|
||||
SKIP_PREVIOUS,
|
||||
SKIP_NEXT,
|
||||
PLAY_ARROW,
|
||||
PAUSE,
|
||||
|
||||
PLAY_CIRCLE,
|
||||
|
||||
EMPTY_DASHBOARD,
|
||||
|
||||
SAVE,
|
||||
CONTENT_COPY,
|
||||
};
|
||||
|
||||
static const std::string toString(Type type) {
|
||||
return typeToString[type];
|
||||
}
|
||||
|
||||
private:
|
||||
static inline std::map<Type, const std::string> typeToString = {
|
||||
{HOME_ASSISTANT, "\uf024"},
|
||||
{CONTROL_CENTER, "\ue062"},
|
||||
|
||||
{SKIP_PREVIOUS, "\ue045"},
|
||||
{SKIP_NEXT, "\ue044"},
|
||||
{PLAY_ARROW, "\ue037"},
|
||||
{PAUSE, "\ue034"},
|
||||
|
||||
{PLAY_CIRCLE, "\ue1c4"},
|
||||
|
||||
{EMPTY_DASHBOARD, "\uf844"},
|
||||
|
||||
{SAVE, "\ue161"},
|
||||
{CONTENT_COPY, "\ue14d"},
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user