From 3b2fb505d58f28f0ce9b4de121f12fc924c1ec0c Mon Sep 17 00:00:00 2001 From: Treeki Date: Sun, 5 Aug 2012 17:35:52 +0200 Subject: getting further... basic read-only Scene Graph model/widget --- lsscenemodel.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 lsscenemodel.h (limited to 'lsscenemodel.h') 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 +#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 -- cgit v1.2.3