SchemeFlowWidget.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef SCHEMEFLOWWIDGET_H
  2. #define SCHEMEFLOWWIDGET_H
  3. #include <QWidget>
  4. #include <shemeFlow/DataFlowModel.h>
  5. #include <shemeFlow/FlowGraphModel.h>
  6. #include <shemeFlow/DataFlowModel.h>
  7. #include <shemeFlow/FlowTemplateDataModel.h>
  8. #include <QtNodes/BasicGraphicsScene>
  9. #include <QtNodes/ConnectionStyle>
  10. #include <QtNodes/DataFlowGraphicsScene>
  11. //#include <QtNodes/GraphicsView>
  12. #include <QtNodes/GraphicsViewStyle>
  13. #include <QtNodes/NodeDelegateModelRegistry>
  14. using QtNodes::BasicGraphicsScene;
  15. using QtNodes::ConnectionStyle;
  16. using QtNodes::DataFlowGraphicsScene;
  17. // using QtNodes::GraphicsView;
  18. using QtNodes::GraphicsViewStyle;
  19. using QtNodes::NodeDelegateModelRegistry;
  20. using QtNodes::NodeRole;
  21. using QtNodes::NodeStyle;
  22. // class GraphicsView;
  23. class ProjectInfo;
  24. class QHBoxLayout;
  25. /**
  26. * @brief The SchemeFlowWidget class
  27. * 方案流程图
  28. */
  29. class SchemeFlowWidget : public QWidget
  30. {
  31. Q_OBJECT
  32. public:
  33. explicit SchemeFlowWidget(ProjectInfo *proj, int indexType, QWidget *parent = nullptr);
  34. ~SchemeFlowWidget();
  35. void setType(int t);
  36. signals:
  37. private:
  38. void initWidget();
  39. void clearAllNodes();
  40. void refresh();
  41. private:
  42. ProjectInfo *m_proj = nullptr;
  43. int m_indexType = 0;
  44. // GraphicsView *m_view = nullptr;
  45. DataFlowModel *m_graphModel = nullptr;
  46. QHBoxLayout *m_layout = nullptr;
  47. };
  48. #endif // SCHEMEFLOWWIDGET_H