summaryrefslogtreecommitdiff
path: root/lsscenemodel.cpp
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-09 16:48:09 +0200
committerTreeki <treeki@gmail.com>2012-08-09 16:48:09 +0200
commit6025cf1356f25727cb8a04eed413d87720b2fb1f (patch)
tree33878d2fbdfc5473ea7457167d2060c45093dd4c /lsscenemodel.cpp
parent3b2fb505d58f28f0ce9b4de121f12fc924c1ec0c (diff)
downloadLayoutStudio-6025cf1356f25727cb8a04eed413d87720b2fb1f.tar.gz
LayoutStudio-6025cf1356f25727cb8a04eed413d87720b2fb1f.zip
forgot to commit this when I last worked on it :x
Diffstat (limited to '')
-rw-r--r--lsscenemodel.cpp10
1 files changed, 10 insertions, 0 deletions
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();