summaryrefslogtreecommitdiff
path: root/src/modflagicondelegate.cpp
diff options
context:
space:
mode:
authorLostDragonist <lost.dragonist@gmail.com>2019-03-06 20:12:09 -0600
committerLostDragonist <lost.dragonist@gmail.com>2019-03-07 11:21:47 -0600
commitd5332c5080ea5e1d0812cc900bb5ed6e20ff8f0e (patch)
treefe39b16810e537e7e4f3a97b4e2c599590748067 /src/modflagicondelegate.cpp
parent09a68079bb9ac083bd060b1e75bf329917a7d888 (diff)
Add support for displaying tracked mods and setting tracked status
Diffstat (limited to 'src/modflagicondelegate.cpp')
-rw-r--r--src/modflagicondelegate.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/src/modflagicondelegate.cpp b/src/modflagicondelegate.cpp
index 343c6ee3..fbd951eb 100644
--- a/src/modflagicondelegate.cpp
+++ b/src/modflagicondelegate.cpp
@@ -93,26 +93,27 @@ QList<QString> ModFlagIconDelegate::getIcons(const QModelIndex &index) const {
QString ModFlagIconDelegate::getFlagIcon(ModInfo::EFlag flag) const
{
switch (flag) {
- case ModInfo::FLAG_BACKUP: return ":/MO/gui/emblem_backup";
- case ModInfo::FLAG_INVALID: return ":/MO/gui/problem";
- case ModInfo::FLAG_NOTENDORSED: return ":/MO/gui/emblem_notendorsed";
- case ModInfo::FLAG_NOTES: return ":/MO/gui/emblem_notes";
- case ModInfo::FLAG_CONFLICT_MIXED: return ":/MO/gui/emblem_conflict_mixed";
- case ModInfo::FLAG_CONFLICT_OVERWRITE: return ":/MO/gui/emblem_conflict_overwrite";
- case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return ":/MO/gui/emblem_conflict_overwritten";
- case ModInfo::FLAG_CONFLICT_REDUNDANT: return ":MO/gui/emblem_conflict_redundant";
- case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_loose_conflict_overwrite";
- case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_loose_conflict_overwritten";
- case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return ":/MO/gui/archive_conflict_mixed";
- case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return ":/MO/gui/archive_conflict_winner";
- case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN: return ":/MO/gui/archive_conflict_loser";
- case ModInfo::FLAG_ALTERNATE_GAME: return ":MO/gui/alternate_game";
+ case ModInfo::FLAG_BACKUP: return QStringLiteral(":/MO/gui/emblem_backup");
+ case ModInfo::FLAG_INVALID: return QStringLiteral(":/MO/gui/problem");
+ case ModInfo::FLAG_NOTENDORSED: return QStringLiteral(":/MO/gui/emblem_notendorsed");
+ case ModInfo::FLAG_NOTES: return QStringLiteral(":/MO/gui/emblem_notes");
+ case ModInfo::FLAG_CONFLICT_MIXED: return QStringLiteral(":/MO/gui/emblem_conflict_mixed");
+ case ModInfo::FLAG_CONFLICT_OVERWRITE: return QStringLiteral(":/MO/gui/emblem_conflict_overwrite");
+ case ModInfo::FLAG_CONFLICT_OVERWRITTEN: return QStringLiteral(":/MO/gui/emblem_conflict_overwritten");
+ case ModInfo::FLAG_CONFLICT_REDUNDANT: return QStringLiteral(":/MO/gui/emblem_conflict_redundant");
+ case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITE: return QStringLiteral(":/MO/gui/archive_loose_conflict_overwrite");
+ case ModInfo::FLAG_ARCHIVE_LOOSE_CONFLICT_OVERWRITTEN: return QStringLiteral(":/MO/gui/archive_loose_conflict_overwritten");
+ case ModInfo::FLAG_ARCHIVE_CONFLICT_MIXED: return QStringLiteral(":/MO/gui/archive_conflict_mixed");
+ case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITE: return QStringLiteral(":/MO/gui/archive_conflict_winner");
+ case ModInfo::FLAG_ARCHIVE_CONFLICT_OVERWRITTEN: return QStringLiteral(":/MO/gui/archive_conflict_loser");
+ case ModInfo::FLAG_ALTERNATE_GAME: return QStringLiteral(":/MO/gui/alternate_game");
case ModInfo::FLAG_FOREIGN: return QString();
case ModInfo::FLAG_SEPARATOR: return QString();
case ModInfo::FLAG_OVERWRITE: return QString();
case ModInfo::FLAG_PLUGIN_SELECTED: return QString();
- default:
- qWarning("ModInfo flag %d has no defined icon", flag);
+ case ModInfo::FLAG_TRACKED: return QStringLiteral(":/MO/gui/tracked");
+ default:
+ qWarning("ModInfo flag %d has no defined icon", flag);
return QString();
}
}