summaryrefslogtreecommitdiff
path: root/lsscenemodel.h
diff options
context:
space:
mode:
authorTreeki <treeki@gmail.com>2012-08-05 17:35:52 +0200
committerTreeki <treeki@gmail.com>2012-08-05 17:35:52 +0200
commit3b2fb505d58f28f0ce9b4de121f12fc924c1ec0c (patch)
tree2f6a0303927dbb2b16205e74034255cb70a7d1d4 /lsscenemodel.h
parentcee09c07899dfec32672e7e2d175972530a7dfd4 (diff)
downloadLayoutStudio-3b2fb505d58f28f0ce9b4de121f12fc924c1ec0c.tar.gz
LayoutStudio-3b2fb505d58f28f0ce9b4de121f12fc924c1ec0c.zip
getting further... basic read-only Scene Graph model/widget
Diffstat (limited to 'lsscenemodel.h')
-rw-r--r--lsscenemodel.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/lsscenemodel.h b/lsscenemodel.h
new file mode 100644
index 0000000..3a26fc1
--- /dev/null
+++ b/lsscenemodel.h
@@ -0,0 +1,29 @@
+#ifndef LSSCENEMODEL_H
+#define LSSCENEMODEL_H
+
+#include <QAbstractItemModel>
+#include "lyt/layout.h"
+
+class LSSceneModel : public QAbstractItemModel {
+ Q_OBJECT
+public:
+ explicit LSSceneModel(LYTLayout *layout, QObject *parent = 0);
+
+ LYTLayout *layout() const { return m_layout; }
+
+ QModelIndex index(int row, int column, const QModelIndex &parent) const;
+ QModelIndex parent(const QModelIndex &child) const;
+ int rowCount(const QModelIndex &parent) const;
+ int columnCount(const QModelIndex &parent) const;
+ QVariant data(const QModelIndex &index, int role) const;
+
+private:
+ LYTLayout *m_layout;
+
+signals:
+
+public slots:
+
+};
+
+#endif // LSSCENEMODEL_H