diff options
Diffstat (limited to 'logic/icons/IconList.cpp')
-rw-r--r-- | logic/icons/IconList.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/logic/icons/IconList.cpp b/logic/icons/IconList.cpp index 40949392..45d39575 100644 --- a/logic/icons/IconList.cpp +++ b/logic/icons/IconList.cpp @@ -261,6 +261,24 @@ void IconList::installIcons(QStringList iconFiles) } } +bool IconList::iconFileExists(QString key) +{ + auto iconEntry = icon(key); + if(!iconEntry) + { + return false; + } + return iconEntry->has(MMCIcon::FileBased); +} + +const MMCIcon *IconList::icon(QString key) +{ + int iconIdx = getIconIndex(key); + if (iconIdx == -1) + return nullptr; + return &icons[iconIdx]; +} + bool IconList::deleteIcon(QString key) { int iconIdx = getIconIndex(key); |