summaryrefslogtreecommitdiff
path: root/src/icondelegate.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2019-10-04 06:30:15 -0400
committerGitHub <noreply@github.com>2019-10-04 06:30:15 -0400
commit2fe50f2ff366ea850eb70a85c6ea7d6c936bf08a (patch)
tree77041dd84568817e0e359381e7fb78f6a1f2dd2a /src/icondelegate.cpp
parente6a47bf8b70be2c480f77c68c08480a33e71dce3 (diff)
parent239cfbe6854f727b5dd3e6922cacc17587361cf5 (diff)
Merge pull request #842 from isanae/dialog-settings
Dialog settings
Diffstat (limited to 'src/icondelegate.cpp')
-rw-r--r--src/icondelegate.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/icondelegate.cpp b/src/icondelegate.cpp
index 39038f3c..03964263 100644
--- a/src/icondelegate.cpp
+++ b/src/icondelegate.cpp
@@ -32,13 +32,10 @@ IconDelegate::IconDelegate(QObject *parent)
{
}
-
-void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+void IconDelegate::paintIcons(
+ QPainter *painter, const QStyleOptionViewItem &option,
+ const QModelIndex &index, const QList<QString>& icons)
{
- QStyledItemDelegate::paint(painter, option, index);
-
- QList<QString> icons = getIcons(index);
-
int x = 4;
painter->save();
@@ -67,3 +64,9 @@ void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option,
painter->restore();
}
+void IconDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
+{
+ QStyledItemDelegate::paint(painter, option, index);
+ paintIcons(painter, option, index, getIcons(index));
+}
+