From 6025cf1356f25727cb8a04eed413d87720b2fb1f Mon Sep 17 00:00:00 2001 From: Treeki Date: Thu, 9 Aug 2012 16:48:09 +0200 Subject: forgot to commit this when I last worked on it :x --- lsscenemodel.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'lsscenemodel.cpp') diff --git a/lsscenemodel.cpp b/lsscenemodel.cpp index 7450368..38da4e7 100644 --- a/lsscenemodel.cpp +++ b/lsscenemodel.cpp @@ -1,9 +1,16 @@ #include "lsscenemodel.h" +#include "lsglobals.h" LSSceneModel::LSSceneModel(LYTLayout *layout, QObject *parent) : QAbstractItemModel(parent) { m_layout = layout; + + m_paneIcons[LYTPane::PaneType] = LSGlobals::getIcon("pane"); + m_paneIcons[LYTPane::PictureType] = LSGlobals::getIcon("picture"); + m_paneIcons[LYTPane::TextBoxType] = LSGlobals::getIcon("textbox"); + m_paneIcons[LYTPane::WindowType] = LSGlobals::getIcon("window"); + m_paneIcons[LYTPane::BoundingType] = LSGlobals::getIcon("bounding"); } @@ -45,6 +52,7 @@ int LSSceneModel::rowCount(const QModelIndex &parent) const { } int LSSceneModel::columnCount(const QModelIndex &parent) const { + (void)parent; return 1; } @@ -54,6 +62,8 @@ QVariant LSSceneModel::data(const QModelIndex &index, int role) const { switch (role) { case Qt::DisplayRole: return pane->name; + case Qt::DecorationRole: + return m_paneIcons[pane->type()]; } } return QVariant(); -- cgit v1.2.3