add context panel

This commit is contained in:
AndreaRigoni
2026-03-21 20:14:29 +00:00
parent add9d37aea
commit a8f786d8d1
14 changed files with 381 additions and 17 deletions

View File

@@ -0,0 +1,26 @@
#ifndef CONTEXT_MODEL_H
#define CONTEXT_MODEL_H
#include <QAbstractItemModel>
#include "Core/ObjectsContext.h"
class ContextModel : public QAbstractItemModel {
Q_OBJECT
public:
explicit ContextModel(QObject* parent = nullptr);
virtual ~ContextModel();
void setContext(uLib::ObjectsContext* context);
QModelIndex index(int row, int column, const QModelIndex& parent = QModelIndex()) const override;
QModelIndex parent(const QModelIndex& child) const override;
int rowCount(const QModelIndex& parent = QModelIndex()) const override;
int columnCount(const QModelIndex& parent = QModelIndex()) const override;
QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const override;
QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const override;
private:
uLib::ObjectsContext* m_rootContext;
};
#endif // CONTEXT_MODEL_H