feat: basic geometry spreadsheet model
This commit is contained in:
19
src/Gui/GeometrySpreadsheetPanel/GeometrySpreadsheetModel.h
Normal file
19
src/Gui/GeometrySpreadsheetPanel/GeometrySpreadsheetModel.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <QAbstractListModel>
|
||||
|
||||
class GeometrySpreadsheetModel : public QAbstractListModel
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
GeometrySpreadsheetModel(const QStringList &strings, QObject *parent = nullptr)
|
||||
: QAbstractListModel(parent), stringList(strings) {}
|
||||
|
||||
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;
|
||||
|
||||
private:
|
||||
QStringList stringList;
|
||||
};
|
||||
Reference in New Issue
Block a user