X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FEntityGUI%2FEntityGUI_PolylineDlg.h;h=3d959cd82878d536b1a3ea4e57ffb41ca88f5977;hb=c1d63ef1f803d255b61ee99fb618bf471add07f4;hp=364c144ce36928c4d8e94d3929bf58a399b98826;hpb=ff7fc4d6c2f5e6de741fd7f0b9ebf01de04d0e10;p=modules%2Fgeom.git diff --git a/src/EntityGUI/EntityGUI_PolylineDlg.h b/src/EntityGUI/EntityGUI_PolylineDlg.h index 364c144ce..3d959cd82 100644 --- a/src/EntityGUI/EntityGUI_PolylineDlg.h +++ b/src/EntityGUI/EntityGUI_PolylineDlg.h @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2023 CEA/DEN, EDF R&D, OPEN CASCADE // // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS @@ -23,15 +23,14 @@ #ifndef ENTITYGUI_POLYLINEDLG_H #define ENTITYGUI_POLYLINEDLG_H - #include class CurveCreator_Curve; class CurveCreator_Widget; +class OCCViewer_ViewManager; class QGroupBox; class QComboBox; - //================================================================================= // class : EntityGUI_PolylineDlg // purpose : @@ -50,13 +49,31 @@ public: void deleteSelected(); bool deleteEnabled(); + void setPreviewZLayer( int theLayer ); + int getPreviewZLayer() const; + protected: // redefined from GEOMBase_Helper virtual GEOM::GEOM_IOperations_ptr createOperation(); virtual bool isValid( QString& ); virtual bool execute( ObjectList& ); - + virtual QList getSourceObjects(); + + /** + * This method sets/gets the view manager to control the temporary + * displayed objects on Z layer. + * \param theManager the view manager. + */ + void setPreviewManager( OCCViewer_ViewManager* theManager ); + OCCViewer_ViewManager* getPreviewManager(); + + /** + * This method defines a state of selection button. + * \return true if selection button is checked, otherwise false. + */ + bool isCheckToSelect(); + private: void Init(); @@ -102,7 +119,7 @@ private: * This method add a local coordinate system of the selected object. * * \param theSelectedObject the selected object. It can be a planar face - * or an inported polyline. + * or an imported polyline. * \param IsPlane true for planar face; false for imported polyline. * \param theLCS the local coordinate system. */ @@ -119,17 +136,27 @@ private: */ gp_Ax3 WPlaneToLCS(GEOM::GeomObjPtr theGeomObj); + /** + * This method displays the AIS_InteractiveObject(s) to preview + * on the Z layer and sets VIOLET color. + */ + void displayPreview(); + + /** + * This method erases AIS_InteractiveObject(s) from + * AIS_InteractiveContext and release memory. + */ + void erasePreview(); + protected slots: void ClickOnOk(); bool ClickOnApply(); - void ClickOnCancel(); void processStartedSubOperation( QWidget*, bool ); void processFinishedSubOperation( QWidget* ); - void SetEditCurrentArgument(); - void SelectionIntoArgument(); + void SetEditCurrentArgument( bool ); + void SelectionIntoArgument( bool isForced = false ); void ActivateThisDialog(); - void onUpdatePreview(); void ActivateLocalCS(); private: @@ -146,6 +173,8 @@ private: QLineEdit *myEditCurrentArgument; /* Current LineEdit */ QList myLCSList; QList myWPlaneList; + OCCViewer_ViewManager* myPreviewManager; + int myPreviewZLayer; };