Salome HOME
NRI : Remove dependence with VISU.
[modules/kernel.git] / src / SUPERVGraph / SUPERVGraph_Graph.h
1 //  File      : SUPERVGraph_Graph.h
2 //  Created   : 17 / 10 / 2001
3 //  Author    : Francis KLOSS
4 //  Project   : SALOME
5 //  Module    : SUPERVGraph
6 //  Copyright : Open CASCADE
7
8 #ifndef SUPERVGraph_Graph_HXX
9 #define SUPERVGraph_Graph_HXX
10
11 #include "QAD.h"
12 #include "QAD_Popup.h"
13
14 #include <qscrollview.h>
15 #include <qpopupmenu.h>
16
17 class QAD_EXPORT SUPERVGraph_Graph: public QScrollView, public QAD_PopupClientServer
18 {
19   Q_OBJECT
20
21 public:
22   SUPERVGraph_Graph(QWidget* parent);
23   ~SUPERVGraph_Graph();
24
25   /* popup management */
26   void onCreatePopup();
27
28   void sync();
29   void contentsMousePressEvent(QMouseEvent* e);
30   void contentsMouseReleaseEvent(QMouseEvent* e);
31   void contentsMouseMoveEvent(QMouseEvent* e);
32   
33   QPoint getPoint();
34   
35 public slots:
36   void Draw(int x, int y);
37   
38 private slots:
39   void addPoint();
40   void deleteLink();
41   void showInformation();
42   void changeInformation();
43
44 protected slots:
45   void onChangeBackgroundColor();
46
47 protected:
48   bool eventFilter(QObject* object, QEvent* event);
49   
50 private:
51 //    SUPERVGraph_Point* findPoint(int x, int y);
52   float distance(int xp, int yp, int xl, int yl, int xn, int yn);
53   
54 //    SUPERVGraph_Main* main;
55   QPoint          where;
56   QPopupMenu*     popup;
57   int             pci;
58   int             pan;
59   int             pap;
60   int             pdl;
61   int             pif;
62 };
63
64 #endif