]> SALOME platform Git repositories - modules/geom.git/blob - src/CurveCreator/CurveCreator_Widget.h
Salome HOME
CurveCreator was updated
[modules/geom.git] / src / CurveCreator / CurveCreator_Widget.h
1 #ifndef CURVECREATOR_WIDGET_H\r
2 #define CURVECREATOR_WIDGET_H\r
3 \r
4 #include "CurveCreator_Curve.hxx"\r
5 \r
6 #include <QWidget>\r
7 \r
8 #include <QMap>\r
9 \r
10 class QAction;\r
11 class QPixmap;\r
12 class CurveCreator_CurveEditor;\r
13 class CurveCreator_TreeView;\r
14 class CurveCreator_NewPointDlg;\r
15 class CurveCreator_NewSectionDlg;\r
16 \r
17 class CurveCreator_Widget : public QWidget\r
18 {\r
19     Q_OBJECT\r
20 public:\r
21     explicit CurveCreator_Widget( QWidget* parent,\r
22                       CurveCreator_Curve *theCurve,\r
23                       Qt::WindowFlags fl=0 );\r
24     \r
25 signals:\r
26     \r
27 public slots:\r
28 \r
29 protected slots:\r
30     void     onNewPoint();\r
31     void     onNewSection();\r
32     void     onSelectionChanged();\r
33     void     onAddNewPoint();\r
34     void     onAddNewSection();\r
35     void     onEditSection( int theSection );\r
36     void     onEditPoint( int theSection, int thePoint );\r
37     void     onJoin();\r
38     void     onRemove();\r
39     void     onMoveUp();\r
40     void     onMoveDown();\r
41     void     onClearAll();\r
42     void     onJoinAll();\r
43     void     onInsertSectionBefore();\r
44     void     onInsertSectionAfter();\r
45     void     onSetSpline();\r
46     void     onSetPolyline();\r
47     void     onCloseSections();\r
48     void     onUncloseSections();\r
49     void     onInsertPointBefore();\r
50     void     onInsertPointAfter();\r
51     void     onUndoSettings();\r
52     void     onContextMenu(QPoint thePoint);\r
53 protected:\r
54     enum ActionId{ UNDO_ID, REDO_ID, NEW_SECTION_ID, NEW_POINT_ID, REMOVE_ID, REMOVE_ALL_ID, JOIN_ID,\r
55                    JOIN_ALL_ID, UP_ID, DOWN_ID, INSERT_SECTION_BEFORE_ID, INSERT_SECTION_AFTER_ID,\r
56                    INSERT_POINT_BEFORE_ID, INSERT_POINT_AFTER_ID, CLOSE_SECTIONS_ID, UNCLOSE_SECTIONS_ID,\r
57                    SET_SECTIONS_POLYLINE_ID, SET_SECTIONS_SPLINE_ID, CLEAR_ALL_ID, SEPARATOR_ID };\r
58 private:\r
59     QAction* createAction( ActionId theId, const QString& theName, const QPixmap& theImage,\r
60                            const QString& theToolTip, const QKeySequence& theShortcut );\r
61     QAction* getAction(ActionId theId);\r
62 private:\r
63     QMap<ActionId, QAction*>    myActionMap;\r
64     CurveCreator_Curve*         myCurve;\r
65     CurveCreator_CurveEditor*   myEdit;\r
66     CurveCreator_TreeView*      mySectionView;\r
67     CurveCreator_NewPointDlg*   myNewPointEditor;\r
68     CurveCreator_NewSectionDlg* myNewSectionEditor;\r
69     int                         mySection;\r
70     int                         myPointNum;\r
71 };\r
72 \r
73 #endif // CURVECREATOR_WIDGET_H\r