#ifndef GROUPTABLEWIDGET_H #define GROUPTABLEWIDGET_H #include #include #include #include #include "dbService/ClassSet.h" struct AnalysisDataSource { QString node; //节点 QString abscissa; //横坐标 QString ordinate; //纵坐标 QString nodeValue; //节点值 int row = -1; int col = -1; bool changed = false; }; class GroupTableWidget : public QTableView { Q_OBJECT public: enum IndexType { IndexTech = 1, //技术措施指标体系 TechMessaure, //技术措施 SchemaEval //方案评估指标体系 }; explicit GroupTableWidget(QWidget *parent = nullptr); ~GroupTableWidget(); void addRowNode(QString node, QString name, QString remark); void addColNode(QString node, QString name, QString remark); QList getSource() const; void paintDemandTable(QList> nodeValueInfoList, QString arithmeticMethod); void paintTechnicalTable(QList> nodeValueInfoList, QString arithmeticMethod); void setTableType(int type); signals: void dataReady(bool status); void returnModel(QStandardItemModel *item); private slots: private: 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 matrixRows; QList matrixCols; QList dataSource; QStandardItemModel *model; QVector importanceWidget; int tableType; }; #endif // GROUPTABLEWIDGET_H