20 #ifndef CURVECREATOR_WIDGET_H
21 #define CURVECREATOR_WIDGET_H
27 #include <SUIT_ViewWindow.h>
28 #include <OCCViewer_ViewWindow.h>
30 #include <AIS_InteractiveObject.hxx>
31 #include <AIS_InteractiveContext.hxx>
32 #include <AIS_ListOfInteractive.hxx>
33 #include <Geom_Curve.hxx>
34 #include <V3d_View.hxx>
44 class OCCViewer_Viewer;
45 class OCCViewer_ViewPort3d;
57 DisableDetectionMode = 0x00000001,
58 DisableNewSection = 0x00000002,
59 DisableClosedSection = 0x00000004,
60 DisableSetColor = 0x00000008
73 const int theActionFlags = NoFlags,
74 const QStringList& theCoordTitles = QStringList(),
75 Qt::WindowFlags fl=0);
78 void setOCCViewer( OCCViewer_Viewer* theViewer );
80 Handle(AIS_InteractiveContext) getAISContext();
81 OCCViewer_ViewPort3d* getViewPort();
82 int changeInteractionStyle(
int theStyle );
87 QList<int> getSelectedSections();
88 void setSelectedSections(
const QList<int>& theSections );
90 void removeSelected();
93 void setActionMode(
const ActionMode& theMode );
96 void SetViewer2DMode(
const bool To2D);
101 void updateLocalPointView();
102 void setLocalPointContext(
const bool theOpen,
const bool isUpdateTable =
false );
110 void onAdditionMode(
bool checked);
111 void onModificationMode(
bool checked);
112 void onDetectionMode(
bool checked);
113 void onModeChanged(
bool checked);
115 void onSelectionChanged();
116 void onAddNewSection();
117 void onEditSection(
int theSection );
118 void onModifySection();
119 void onCancelSection();
121 void onBringTogether();
127 void onSetPolyline();
128 void onCloseSections();
129 void onUncloseSections();
132 void onUndoSettings();
133 void onContextMenu(QPoint thePoint);
135 void onMousePress( SUIT_ViewWindow*, QMouseEvent* theEvent );
136 void onMouseRelease( SUIT_ViewWindow*, QMouseEvent* theEvent );
137 void onMouseMove( SUIT_ViewWindow*, QMouseEvent* theEvent );
138 void onLastViewClosed( SUIT_ViewManager* theManager );
140 void onMousePress( QMouseEvent* theEvent );
141 void onMouseRelease( QMouseEvent* theEvent );
142 void onMouseMove( QMouseEvent* theEvent );
144 void onCellChanged(
int theRow,
int theColumn );
147 void addCoordsByClick( QMouseEvent* );
172 QAction* getAction(ActionId theId);
173 QAction* getAction(ActionMode theMode);
176 OCCViewer_Viewer* getOCCViewer();
178 QAction* createAction( ActionId theId,
const QString& theName,
const QPixmap& theImage,
179 const QString& theToolTip,
const QKeySequence& theShortcut );
181 void updateActionsStates();
182 void updateUndoRedo();
184 void removeSection();
187 void insertPointToSelectedSegment(
const int theXPosition,
188 const int theYPosition );
189 void moveSelectedPoints(
const int theXPosition,
const int theYPosition );
191 void setDragStarted(
const bool theState,
const QPoint& thePoint = QPoint() );
195 void stopActionMode();
198 const bool theFillPoints =
true );
203 int findLocalPointIndex(
int theSectionId,
double theX,
double theY );
204 void findSectionsToPoints(
const double theX,
const double theY,
207 QMap<
int, QList<int> >& theConvPoints );
#define CURVECREATOR_EXPORT
Definition: CurveCreator_Macro.hxx:41
The CurveCreator_ICurve object is represented as one or more sets of connected points; thus CurveCrea...
Definition: CurveCreator_ICurve.hxx:73
std::deque< SectionToPoint > SectionToPointList
Definition: CurveCreator_ICurve.hxx:76
std::pair< int, int > SectionToPoint
Definition: CurveCreator_ICurve.hxx:75
Definition: CurveCreator_NewSectionDlg.h:39
Definition: CurveCreator_TableView.h:45
Definition: CurveCreator_TreeView.h:58
std::deque< TypeCoord > Coordinates
List of coordinates in format depends on section dimension: 2D: [x1, y1, x2, y2, x3,...
Definition: CurveCreator.hxx:42