Version: 9.16.0
EntityGUI_PolylineDlg.h
Go to the documentation of this file.
1// Copyright (C) 2007-2026 CEA, EDF, OPEN CASCADE
2//
3// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5//
6// This library is free software; you can redistribute it and/or
7// modify it under the terms of the GNU Lesser General Public
8// License as published by the Free Software Foundation; either
9// version 2.1 of the License, or (at your option) any later version.
10//
11// This library is distributed in the hope that it will be useful,
12// but WITHOUT ANY WARRANTY; without even the implied warranty of
13// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14// Lesser General Public License for more details.
15//
16// You should have received a copy of the GNU Lesser General Public
17// License along with this library; if not, write to the Free Software
18// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19//
20// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21//
22
23#ifndef ENTITYGUI_POLYLINEDLG_H
24#define ENTITYGUI_POLYLINEDLG_H
25
26#include <GEOMBase_Skeleton.h>
27
30class OCCViewer_ViewManager;
31class QGroupBox;
32class QComboBox;
33
34//=================================================================================
35// class : EntityGUI_PolylineDlg
36// purpose :
37//=================================================================================
39{
40 Q_OBJECT
41
42public:
43
45 bool = false, Qt::WindowFlags = 0);
46
47 virtual ~EntityGUI_PolylineDlg();
48
49 void deleteSelected();
50 bool deleteEnabled();
51
52 void setPreviewZLayer( int theLayer );
53 int getPreviewZLayer() const;
54
55protected:
56
57 // redefined from GEOMBase_Helper
58 virtual GEOM::GEOM_IOperations_ptr createOperation();
59 virtual bool isValid( QString& );
60 virtual bool execute( ObjectList& );
61 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
62
68 void setPreviewManager( OCCViewer_ViewManager* theManager );
69 OCCViewer_ViewManager* getPreviewManager();
70
75 bool isCheckToSelect();
76
77private:
78
79 void Init();
80 void Clear();
81 void enterEvent(QEvent *);
82
100 GEOM::string_array &theNames,
101 GEOM::short_array &theTypes,
102 GEOM::ListOfBool &theCloseds);
103
109 gp_Ax3 GetActiveLocalCS();
110
117
126 void AddLocalCS(GEOM::GeomObjPtr theSelectedObject,
127 const bool IsPlane,
128 const gp_Ax3 &theLCS);
129
137 gp_Ax3 WPlaneToLCS(GEOM::GeomObjPtr theGeomObj);
138
143 void displayPreview();
144
149 void erasePreview();
150
151protected slots:
152
153 void ClickOnOk();
154 bool ClickOnApply();
155 void processStartedSubOperation( QWidget*, bool );
157 void SetEditCurrentArgument( bool );
158 void SelectionIntoArgument( bool isForced = false );
159 void ActivateThisDialog();
160 void ActivateLocalCS();
161
162private:
163
167 QComboBox *myPlnComboBox;
168 QPushButton *myPlnButton;
169 QPushButton *myPlnSelButton;
172 QLineEdit *myPolylineEdit;
173 QLineEdit *myEditCurrentArgument; /* Current LineEdit */
174 QList<gp_Ax3> myLCSList;
175 QList<GEOM::GeomObjPtr> myWPlaneList;
176 OCCViewer_ViewManager* myPreviewManager;
178
179};
180
181#endif // ENTITYGUI_POLYLINEDLG_H
std::list< GEOM::GEOM_Object_ptr > ObjectList
Definition: GEOMBase_Helper.h:46
The CurveCreator_Curve object is represented as one or more sets of connected points; thus CurveCreat...
Definition: CurveCreator_Curve.hxx:51
Definition: CurveCreator_Widget.h:51
Definition: EntityGUI_PolylineDlg.h:39
void deleteSelected()
Definition: EntityGUI_PolylineDlg.cxx:421
void displayPreview()
This method displays the AIS_InteractiveObject(s) to preview on the Z layer and sets VIOLET color.
Definition: EntityGUI_PolylineDlg.cxx:762
gp_Ax3 WPlaneToLCS(GEOM::GeomObjPtr theGeomObj)
This method converts the working plane object into the local coordinate system of the polyline.
Definition: EntityGUI_PolylineDlg.cxx:667
QPushButton * myPolylineSelButton
Definition: EntityGUI_PolylineDlg.h:170
int myPreviewZLayer
Definition: EntityGUI_PolylineDlg.h:177
QGroupBox * myAddElementBox
Definition: EntityGUI_PolylineDlg.h:166
void setPreviewZLayer(int theLayer)
Definition: EntityGUI_PolylineDlg.cxx:743
void ActivateLocalCS()
Definition: EntityGUI_PolylineDlg.cxx:583
int getPreviewZLayer() const
Definition: EntityGUI_PolylineDlg.cxx:753
QList< GEOM::GeomObjPtr > myWPlaneList
Definition: EntityGUI_PolylineDlg.h:175
bool deleteEnabled()
Definition: EntityGUI_PolylineDlg.cxx:430
void GetCurveParams(GEOM::ListOfListOfDouble &theCoords, GEOM::string_array &theNames, GEOM::short_array &theTypes, GEOM::ListOfBool &theCloseds)
This method converts the curve into curve parameters required to construct an object using the interf...
Definition: EntityGUI_PolylineDlg.cxx:239
CurveCreator_Curve * myCurve
Definition: EntityGUI_PolylineDlg.h:164
void SelectionIntoArgument(bool isForced=false)
Definition: EntityGUI_PolylineDlg.cxx:439
void Clear()
Definition: EntityGUI_PolylineDlg.cxx:227
QPushButton * myPlnSelButton
Definition: EntityGUI_PolylineDlg.h:169
void processFinishedSubOperation(QWidget *)
Definition: EntityGUI_PolylineDlg.cxx:406
QComboBox * myPlnComboBox
Definition: EntityGUI_PolylineDlg.h:167
void SetEditCurrentArgument(bool)
Definition: EntityGUI_PolylineDlg.cxx:533
void processStartedSubOperation(QWidget *, bool)
Definition: EntityGUI_PolylineDlg.cxx:389
void AddLocalCS(GEOM::GeomObjPtr theSelectedObject, const bool IsPlane, const gp_Ax3 &theLCS)
This method add a local coordinate system of the selected object.
Definition: EntityGUI_PolylineDlg.cxx:643
void ActivateThisDialog()
Definition: EntityGUI_PolylineDlg.cxx:561
QLineEdit * myPolylineEdit
Definition: EntityGUI_PolylineDlg.h:172
gp_Ax3 GetActiveLocalCS()
This method returns the current local coordinate system.
Definition: EntityGUI_PolylineDlg.cxx:621
OCCViewer_ViewManager * myPreviewManager
Definition: EntityGUI_PolylineDlg.h:176
void Init()
Definition: EntityGUI_PolylineDlg.cxx:172
QLineEdit * myWPlaneLineEdit
Definition: EntityGUI_PolylineDlg.h:171
OCCViewer_ViewManager * getPreviewManager()
Definition: EntityGUI_PolylineDlg.cxx:734
void erasePreview()
This method erases AIS_InteractiveObject(s) from AIS_InteractiveContext and release memory.
Definition: EntityGUI_PolylineDlg.cxx:793
QPushButton * myPlnButton
Definition: EntityGUI_PolylineDlg.h:168
virtual ~EntityGUI_PolylineDlg()
Definition: EntityGUI_PolylineDlg.cxx:162
CurveCreator_Widget * myEditorWidget
Definition: EntityGUI_PolylineDlg.h:165
void setPreviewManager(OCCViewer_ViewManager *theManager)
This method sets/gets the view manager to control the temporary displayed objects on Z layer.
Definition: EntityGUI_PolylineDlg.cxx:710
virtual GEOM::GEOM_IOperations_ptr createOperation()
Definition: EntityGUI_PolylineDlg.cxx:287
virtual bool isValid(QString &)
Definition: EntityGUI_PolylineDlg.cxx:296
void ClickOnOk()
Definition: EntityGUI_PolylineDlg.cxx:360
QLineEdit * myEditCurrentArgument
Definition: EntityGUI_PolylineDlg.h:173
void enterEvent(QEvent *)
Definition: EntityGUI_PolylineDlg.cxx:573
bool isCheckToSelect()
This method defines a state of selection button.
Definition: EntityGUI_PolylineDlg.cxx:822
virtual bool execute(ObjectList &)
Definition: EntityGUI_PolylineDlg.cxx:305
EntityGUI_PolylineDlg(GeometryGUI *, QWidget *=0, bool=false, Qt::WindowFlags=0)
Definition: EntityGUI_PolylineDlg.cxx:57
QList< gp_Ax3 > myLCSList
Definition: EntityGUI_PolylineDlg.h:174
virtual QList< GEOM::GeomObjPtr > getSourceObjects()
Definition: EntityGUI_PolylineDlg.cxx:701
bool ClickOnApply()
Definition: EntityGUI_PolylineDlg.cxx:372
GEOM::GeomObjPtr GetActiveWPlane()
This method returns the current working plane.
Definition: EntityGUI_PolylineDlg.cxx:632
Definition: GEOMBase_Skeleton.h:53
Definition: GeometryGUI.h:74
sequence< boolean > ListOfBool
Definition: GEOM_Gen.idl:278
sequence< short > short_array
Definition: GEOM_Gen.idl:277
sequence< string > string_array
Definition: GEOM_Gen.idl:276
GenericObjPtr< GEOM::GEOM_Object > GeomObjPtr
Definition: GEOM_GenericObjPtr.h:218
sequence< ListOfDouble > ListOfListOfDouble
Definition: GEOM_Gen.idl:281