1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef MATRIXTABLETECHMEASURESWIDGET_H
- #define MATRIXTABLETECHMEASURESWIDGET_H
- #include <QStandardItemModel>
- #include <QTableView>
- #include <SpinBoxDelegate.h>
- #include "MatrixTableWidget.h"
- class MatrixTableTechMeasuresWidget : public QTableView
- {
- Q_OBJECT
- public:
- explicit MatrixTableTechMeasuresWidget(QWidget *parent = nullptr);
- ~MatrixTableTechMeasuresWidget();
- void addRowNode(QString node, QString name, QString remark);
- void addColNode(QString node, QString name, QString remark);
- QList<MatrixDataSource> getSource() const;
- bool isDataReady() const;
- void paintMatrixTable(QList<NodeMatrixInfo *> nodeValueInfoList);
- void setTableName(QString name);
- signals:
- void dataReady(bool status);
- void returnModel(QStandardItemModel *item);
- void returnModelName(QString name);
- private slots:
- void itemClicked(const QModelIndex &index);
- private:
- void editItemData(const QModelIndex &index, const QString &val);
- struct MatrixNode
- {
- MatrixNode(QString no, QString na, QString re) : node(no), name(na), remark(re) { }
- QString node;
- QString name;
- QString remark;
- };
- bool paintDone = false;
- QList<MatrixNode> matrixRows;
- QList<MatrixNode> matrixCols;
- QList<MatrixDataSource> dataSource;
- QStandardItemModel *model;
- bool diagonalIsOne;
- SpinBoxDelegate *delegate;
- QString m_msg_name;
- };
- #endif // MATRIXTABLETECHMEASURESWIDGET_H
|