diff options
Diffstat (limited to 'src/genericicondelegate.cpp')
| -rw-r--r-- | src/genericicondelegate.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/genericicondelegate.cpp b/src/genericicondelegate.cpp index 7afaca3f..bb039b05 100644 --- a/src/genericicondelegate.cpp +++ b/src/genericicondelegate.cpp @@ -1,29 +1,29 @@ -#include "genericicondelegate.h"
-#include "pluginlist.h"
-#include <QList>
-#include <QPixmapCache>
-
-
-GenericIconDelegate::GenericIconDelegate(QTreeView* parent, int role, int logicalIndex, int compactSize)
- : IconDelegate(parent, logicalIndex, compactSize)
- , m_Role(role)
-{
-}
-
-QList<QString> GenericIconDelegate::getIcons(const QModelIndex &index) const
-{
- QList<QString> result;
- if (index.isValid()) {
- for (const QVariant &var : index.data(m_Role).toList()) {
- if (!compact() || !var.toString().isEmpty()) {
- result.append(var.toString());
- }
- }
- }
- return result;
-}
-
-size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const
-{
- return index.data(m_Role).toList().count();
-}
+#include "genericicondelegate.h" +#include "pluginlist.h" +#include <QList> +#include <QPixmapCache> + + +GenericIconDelegate::GenericIconDelegate(QTreeView* parent, int role, int logicalIndex, int compactSize) + : IconDelegate(parent, logicalIndex, compactSize) + , m_Role(role) +{ +} + +QList<QString> GenericIconDelegate::getIcons(const QModelIndex &index) const +{ + QList<QString> result; + if (index.isValid()) { + for (const QVariant &var : index.data(m_Role).toList()) { + if (!compact() || !var.toString().isEmpty()) { + result.append(var.toString()); + } + } + } + return result; +} + +size_t GenericIconDelegate::getNumIcons(const QModelIndex &index) const +{ + return index.data(m_Role).toList().count(); +} |
