12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- #ifndef SCHEMEFLOWWIDGET_H
- #define SCHEMEFLOWWIDGET_H
- #include <QWidget>
- #include "SchemePlanManager.h"
- #include <shemeFlow/DataFlowModel.h>
- #include <shemeFlow/FlowGraphModel.h>
- #include <shemeFlow/DataFlowModel.h>
- #include <shemeFlow/FlowTemplateDataModel.h>
- #include <QtNodes/BasicGraphicsScene>
- #include <QtNodes/ConnectionStyle>
- #include <QtNodes/DataFlowGraphicsScene>
- // #include <QtNodes/GraphicsView>
- #include <QtNodes/GraphicsViewStyle>
- #include <QtNodes/NodeDelegateModelRegistry>
- using QtNodes::BasicGraphicsScene;
- using QtNodes::ConnectionStyle;
- using QtNodes::DataFlowGraphicsScene;
- // using QtNodes::GraphicsView;
- using QtNodes::GraphicsViewStyle;
- using QtNodes::NodeDelegateModelRegistry;
- using QtNodes::NodeRole;
- using QtNodes::NodeStyle;
- // class GraphicsView;
- class ProjectInfo;
- class QHBoxLayout;
- /**
- * @brief The SchemeFlowWidget class
- * 方案流程图
- */
- class SchemeFlowWidget : public QWidget
- {
- Q_OBJECT
- public:
- explicit SchemeFlowWidget(QWidget *parent = nullptr);
- ~SchemeFlowWidget();
- /// 当前页面的评估方案
- QList<SchemePlanManager::SchemeProcessInfo> schemes() const;
- void loadSchemes(const QList<SchemePlanManager::SchemeProcessInfo> &schems);
- void setAllowEdit(bool allow);
- signals:
- void sigSchemeProcessEdited(const SchemePlanManager::SchemeProcessInfo &process);
- private:
- void initWidget();
- void clearAllNodes();
- private slots:
- void slotSchemeProcessEdited(const SchemePlanManager::SchemeProcessInfo &process);
- private:
- DataFlowModel *m_graphModel = nullptr;
- QHBoxLayout *m_layout = nullptr;
- bool m_allowEdit = true;
- };
- #endif // SCHEMEFLOWWIDGET_H
|