Skui 0.0.1
Build fast and easy to use control software with Skui.
 
Loading...
Searching...
No Matches
nodeeditor_scene.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <QGraphicsScene>
4#include <QGuiApplication>
5#include <QLoggingCategory>
6#include <QPointer>
7
10
11class NodeEditorScene : public QGraphicsScene
12{
13 Q_OBJECT
14
15public:
16 explicit NodeEditorScene(QObject *parent = nullptr);
17
18 void addNode(Node *node, QPoint relative_position_hint);
19
20protected:
21 void mousePressEvent(QGraphicsSceneMouseEvent *) override;
22
23private:
24 Pad *getPad(QPointF position); // Can be nullptr
25 void finishCableConnection(Pad *pad);
26
27 int m_debug_x = 0;
28 QList<Node *> m_nodes;
29 QCursor m_cursor_before_pad;
30 QPointer<Cable> m_last_cable = nullptr;
31};
NodeEditorScene(QObject *parent=nullptr)
Definition nodeeditor_scene.cpp:7
void addNode(Node *node, QPoint relative_position_hint)
Definition nodeeditor_scene.cpp:14
void mousePressEvent(QGraphicsSceneMouseEvent *) override
Definition nodeeditor_scene.cpp:39
Definition node.hpp:11
Definition pad.hpp:18