12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #ifndef ANALYSISTABLEWIDGET_H
- #define ANALYSISTABLEWIDGET_H
- #include <QStandardItemModel>
- #include <QTableView>
- #include <qvector.h>
- #include <dbService/ClassSet.h>
- 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<AnalysisDataSource> getSource() const;
- bool isDataReady() const;
- void paintMatrixTable(QList<NodeMatrixInfo *> nodeValueInfoList, int type);
- void paintCompositeMatrixTable(QList<NodeMatrixInfo *> nodeValueInfoList, int type);
- void paintSecondMatrixTable(QList<NodeMatrixInfo *> nodeValueInfoList, int page, int type, int index);
- void setTableWeight(QList<DemandWeight *> firstWeight, QList<DemandWeight *> 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<MatrixNode> matrixRows;
- QList<MatrixNode> matrixCols;
- QList<AnalysisDataSource> dataSource;
- QStandardItemModel *model;
- QList<DemandWeight *> m_firstTableWeight;
- QList<DemandWeight *> 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
|