summaryrefslogtreecommitdiff
path: root/src/pluginflagicondelegate.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-01-23 00:05:46 +0100
committerTannin <devnull@localhost>2014-01-23 00:05:46 +0100
commite597823337c858f2985c615ee5147f47567991ee (patch)
treee42647cf1114ebd4d42e4a8c15a91b941961c3df /src/pluginflagicondelegate.cpp
parente69210b3a78c4a6c63086d84e6bdb2c3b47d8944 (diff)
- boss integration
- plugin list can now also display multiple flags for a file (like the mod list) - changed some compiler&linker settings to produce smaller binaries
Diffstat (limited to 'src/pluginflagicondelegate.cpp')
-rw-r--r--src/pluginflagicondelegate.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/pluginflagicondelegate.cpp b/src/pluginflagicondelegate.cpp
new file mode 100644
index 00000000..6c0bb29e
--- /dev/null
+++ b/src/pluginflagicondelegate.cpp
@@ -0,0 +1,24 @@
+#include "pluginflagicondelegate.h"
+#include "pluginlist.h"
+#include <QList>
+
+
+PluginFlagIconDelegate::PluginFlagIconDelegate(QObject *parent)
+ : IconDelegate(parent)
+{
+}
+
+QList<QIcon> PluginFlagIconDelegate::getIcons(const QModelIndex &index) const
+{
+ QList<QIcon> result;
+ foreach (const QVariant &var, index.data(Qt::UserRole + 1).toList()) {
+ result.append(var.value<QIcon>());
+ }
+ return result;
+}
+
+size_t PluginFlagIconDelegate::getNumIcons(const QModelIndex &index) const
+{
+ return index.data(Qt::UserRole + 1).toList().count();
+}
+