-// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016 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
#ifndef ENTITYGUI_POLYLINEDLG_H
#define ENTITYGUI_POLYLINEDLG_H
-
#include <GEOMBase_Skeleton.h>
class CurveCreator_Curve;
class CurveCreator_Widget;
+class OCCViewer_ViewManager;
class QGroupBox;
class QComboBox;
-
//=================================================================================
// class : EntityGUI_PolylineDlg
// purpose :
void deleteSelected();
bool deleteEnabled();
+ void setPreviewZLayer( int theLayer );
+ int getPreviewZLayer() const;
+
protected:
// redefined from GEOMBase_Helper
virtual bool execute( ObjectList& );
virtual QList<GEOM::GeomObjPtr> 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();
* 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.
*/
*/
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:
QLineEdit *myEditCurrentArgument; /* Current LineEdit */
QList<gp_Ax3> myLCSList;
QList<GEOM::GeomObjPtr> myWPlaneList;
+ OCCViewer_ViewManager* myPreviewManager;
+ int myPreviewZLayer;
};