CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
pcinterface.h
Go to the documentation of this file.
1#ifndef __PCINTERFACE_H
2#define __PCINTERFACE_H
3
4#include <functional>
5#include <QPointF>
6
7namespace QtNodes {
8class FlowScene;
9class Node;
10}
11
12class QPoint;
13class QPointF;
14class QMenu;
15
17 virtual ~PCInterface()
18 {
19 }
20
21 using node_t = std::function<void(QtNodes::Node&)>;
22 using menu_t = std::function<void(QtNodes::Node&, const QPointF&)>;
23
24 virtual void setNodeCreatedCallback(QtNodes::FlowScene* scene, const node_t& cb) = 0;
25 virtual void setNodeDeletedCallback(QtNodes::FlowScene* scene, const node_t& cb) = 0;
26 virtual void setNodeDoubleClickedCallback(QtNodes::FlowScene* scene, const node_t& cb) = 0;
27 virtual void setNodeContextMenuCallback(QtNodes::FlowScene* scene, const menu_t& cb) = 0;
28 virtual void setConfigChangedCbk(const node_t cb) = 0;
29 virtual void openProperties(QtNodes::Node& node) = 0;
30 virtual void showContextMenu(QMenu &menu, const QPoint& pos) = 0;
31};
32
33
34#endif /* !__PCINTERFACE_H */
Definition pcinterface.h:7
Definition pcinterface.h:16
virtual void setNodeDoubleClickedCallback(QtNodes::FlowScene *scene, const node_t &cb)=0
virtual void setConfigChangedCbk(const node_t cb)=0
virtual ~PCInterface()
Definition pcinterface.h:17
virtual void showContextMenu(QMenu &menu, const QPoint &pos)=0
std::function< void(QtNodes::Node &)> node_t
Definition pcinterface.h:21
virtual void setNodeContextMenuCallback(QtNodes::FlowScene *scene, const menu_t &cb)=0
virtual void setNodeDeletedCallback(QtNodes::FlowScene *scene, const node_t &cb)=0
std::function< void(QtNodes::Node &, const QPointF &)> menu_t
Definition pcinterface.h:22
virtual void setNodeCreatedCallback(QtNodes::FlowScene *scene, const node_t &cb)=0
virtual void openProperties(QtNodes::Node &node)=0