PeriDyno 1.0.0
Loading...
Searching...
No Matches
QtModuleFlowScene.h
Go to the documentation of this file.
1#pragma once
2
3#include "nodes/QFlowScene"
4
5#include "Node.h"
6#include "QtNodeWidget.h"
7
8using dyno::Node;
9using dyno::Module;
10using dyno::Pipeline;
11
12namespace Qt
13{
16 : public QtFlowScene
17 {
18 Q_OBJECT
19 public:
20
21 QtModuleFlowScene(std::shared_ptr<QtDataModelRegistry> registry,
22 QObject* parent = Q_NULLPTR);
23
24 QtModuleFlowScene(QObject* parent = Q_NULLPTR, QtNodeWidget* widget = nullptr);
25
26
28
29 public:
30 void enableEditing();
31 void disableEditing();
32
33 Q_SIGNALS:
35
36 public Q_SLOTS:
37 void showModuleFlow(Node* node);
38
40
41 void reorderAllModules();
42
43 void addModule(QtNode& n);
44
45 void deleteModule(QtNode& n);
46
47 void moveModule(QtNode& n, const QPointF& newLocation);
48
49 void showResetPipeline();
50
52
54
58 void promoteOutput(QtNode& n, const PortIndex index, const QPointF& pos);
59
60 private:
61 std::shared_ptr<dyno::Node> mNode;
62 std::shared_ptr<dyno::Pipeline> mActivePipeline;
63
64 //A virtual module to store all state variables
65 std::shared_ptr<dyno::Module> mStates = nullptr;
66
67 float mDx = 100.0f;
68 float mDy = 50.0f;
69
72
73 bool mEditingEnabled = true;
74 };
75}
std::shared_ptr< dyno::Module > mStates
std::shared_ptr< dyno::Pipeline > mActivePipeline
QtModuleFlowScene(std::shared_ptr< QtDataModelRegistry > registry, QObject *parent=Q_NULLPTR)
std::shared_ptr< dyno::Node > mNode
void moveModule(QtNode &n, const QPointF &newLocation)
void showModuleFlow(Node *node)
void promoteOutput(QtNode &n, const PortIndex index, const QPointF &pos)
The model dictates the number of inputs and outputs for the Node.