1 // File : SUPERVGUI_Graph.h
2 // Created : 17 / 10 / 2001
3 // Author : Francis KLOSS
8 #ifndef SUPERVGUI_Graph_H
9 #define SUPERVGUI_Graph_H
12 //#include "SUPERVGUI.h"
13 #include "SUPERVGUI_View.h"
14 #include "SUPERVGUI_Node.h"
15 #include "SUPERVGUI_Link.h"
19 class SUPERVGUI_Graph: public SUPERVGUI_View {
23 SUPERVGUI_Graph(SUPERVGUI_Main* m);
24 virtual ~SUPERVGUI_Graph();
27 void contentsMousePressEvent(QMouseEvent* e);
28 void contentsMouseReleaseEvent(QMouseEvent* e);
29 void contentsMouseMoveEvent(QMouseEvent* e);
32 virtual void setAsFromStudy(bool theToStudy);
34 bool isLinkPrsExists(SUPERV_Link theLink);
35 bool createLinkPrs(SUPERV_Link theLink);
37 { myLinksList.clear(); };
40 void setControlView();
41 void deleteLink(SUPERVGUI_Link* theLink);
43 void deleteNode(SUPERVGUI_Node* theNode);
49 void mouseMoved(QMouseEvent* theEvent);
50 void mousePressed(QMouseEvent* theEvent);
51 void mouseReleased(QMouseEvent* theEvent);
54 void sketchBegin(SUPERVGUI_Port* thePort);
55 void sketchEnd(SUPERVGUI_Port* thePort);
63 void delCreatingLink();
67 bool eventFilter(QObject* object, QEvent* event);
72 SUPERVGUI_Link* mySelectedLink;
75 // Popup menu for link creation management
76 QPopupMenu* mySketchPopup;
80 // Popup menu for link
81 QPopupMenu* myLinkPopup;
87 SUPERVGUI_Link* myNewLink;
88 QPtrList<SUPERVGUI_Link> myLinksList;