feat: update model from geometry

This commit is contained in:
parker
2025-08-09 23:16:21 +01:00
parent 2c139a5f6a
commit 898291e39e
9 changed files with 73 additions and 23 deletions

View File

@@ -1,19 +1,27 @@
#pragma once
#include <QAbstractListModel>
#include "Engine/Types.h"
#include "Engine/Operator/Geometry.h"
class GeometrySpreadsheetModel : public QAbstractListModel
{
Q_OBJECT
public:
GeometrySpreadsheetModel(const QStringList &strings, QObject *parent = nullptr)
: QAbstractListModel(parent), stringList(strings) {}
GeometrySpreadsheetModel(const QStringList &strings, QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = QModelIndex()) const override;
QVariant data(const QModelIndex &index, int role) const override;
QVariant headerData(int section, Qt::Orientation orientation,
int role = Qt::DisplayRole) const override;
void selectionChanged(enzo::nt::OpId opId);
private:
QStringList stringList;
enzo::nt::OpId opId_;
enzo::geo::Geometry geometry_;
};