#ifndef SCHEMEFLOWWIDGET_H #define SCHEMEFLOWWIDGET_H #include #include "SchemePlanManager.h" #include #include #include #include #include #include #include // #include #include #include 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 schemes() const; void loadSchemes(const QList &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