diff options
author | Treeki <treeki@gmail.com> | 2012-08-11 14:07:27 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2012-08-11 14:07:27 +0200 |
commit | b8b4afa08efcd77f4e43898b4d8d5323484ce2f4 (patch) | |
tree | 6f3966982a774b739722dd43afb56c69655341ae /lsscenemodel.cpp | |
parent | ba44b0135af54aebee08610debbc2ef118f98bf2 (diff) | |
parent | 6025cf1356f25727cb8a04eed413d87720b2fb1f (diff) | |
download | LayoutStudio-b8b4afa08efcd77f4e43898b4d8d5323484ce2f4.tar.gz LayoutStudio-b8b4afa08efcd77f4e43898b4d8d5323484ce2f4.zip |
ahh what happened - Merge branch 'master' of github.com:Treeki/LayoutStudio
Diffstat (limited to '')
-rw-r--r-- | lsscenemodel.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lsscenemodel.cpp b/lsscenemodel.cpp index a5b6a23..e2e411c 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(); |