#ifndef ANALYSISTABLEWIDGET_H #define ANALYSISTABLEWIDGET_H #include #include #include #include struct AnalysisDataSource { QString node; //节点 QString abscissa; //横坐标 QString ordinate; //纵坐标 QString nodeValue; //节点值 int row = -1; int col = -1; bool changed = false; }; class AnalysisTableWidget : public QTableView { Q_OBJECT public: enum IndexType { IndexTech = 1, //技术措施指标体系 TechMessaure, //技术措施 SchemaEval //方案评估指标体系 }; explicit AnalysisTableWidget(QWidget *parent = nullptr); ~AnalysisTableWidget(); void addRowNode(QString node, QString name, QString remark); void addColNode(QString node, QString name, QString remark); QList getSource() const; bool isDataReady() const; void paintMatrixTable(QList nodeValueInfoList, int type); void paintCompositeMatrixTable(QList nodeValueInfoList, int type); void paintSecondMatrixTable(QList nodeValueInfoList, int page, int type, int index); void setTableWeight(QList firstWeight, QList secondWeight); void setTableIndexAndTableMsg(int index, int engineerId, QString expertId, QString tableMsg); void setTableMethod(QString method); signals: void dataReady(bool status); void returnModel(QStandardItemModel *item); private slots: void nodeValueChanged(QStandardItem *item); 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; QList m_firstTableWeight; QList m_secondTableWeight; int m_tableIndex = 0; int m_engineerId; // 工程id QString m_expertId; // 专家id QString m_engineer_name; QString m_expert_name; QString m_table_msg; QString m_resultMethod; }; #endif // ANALYSISTABLEWIDGET_H