Version: 9.16.0
BasicGUI_PointDlg.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// GEOM GEOMGUI : GUI for Geometry component
24// File : BasicGUI_PointDlg.h
25// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
26
27#ifndef BASICGUI_POINTDLG_H
28#define BASICGUI_POINTDLG_H
29
30#include "GEOMBase_Skeleton.h"
31#include "GEOM_GenericObjPtr.h"
32#include <QMap>
33
35class DlgRef_3Spin;
36class DlgRef_2Sel;
39
40class QLineEdit;
41class QGroupBox;
42class QButtonGroup;
43class QMenu;
44class QAction;
45
46class gp_Pnt;
47
48//=================================================================================
49// class : BasicGUI_PointDlg
50// purpose :
51//=================================================================================
53{
54 Q_OBJECT
55
56public:
57 BasicGUI_PointDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
58
60
61 bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
62 void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
63
64protected:
65 // redefined from GEOMBase_Helper
66 virtual GEOM::GEOM_IOperations_ptr createOperation();
67 virtual bool isValid( QString& );
68 virtual bool execute( ObjectList& );
69 virtual void addSubshapesToStudy();
70 virtual QList<GEOM::GeomObjPtr> getSourceObjects();
71
72private:
73 void Init();
74 void enterEvent( QEvent* );
75 double getParameter() const;
76 double getUParameter() const;
77 double getVParameter() const;
78 void updateParamCoord(bool theIsUpdate);
79
80private:
86
87 bool myBusy;
88
94
96 QLineEdit* myX;
97 QLineEdit* myY;
98 QLineEdit* myZ;
99
101 QButtonGroup* myParamCoord;
102
103 QMap<QAction*, int> myActions;
104
105 TopAbs_ShapeEnum myNeedType;
106
107private slots:
108 void ClickOnOk();
109 bool ClickOnApply();
110 void ActivateThisDialog();
114 void ConstructorsClicked( int );
115 void ValueChangedInSpinBox( double );
116 void SetDoubleSpinBoxStep( double );
117 void ClickParamCoord( int );
118 void CheckBoxClicked();
119 void updateSize();
120};
121
122#endif // BASICGUI_POINTDLG_H
std::list< GEOM::GEOM_Object_ptr > ObjectList
Definition: GEOMBase_Helper.h:46
Definition: BasicGUI_PointDlg.h:53
BasicGUI_PointDlg(GeometryGUI *, QWidget *=0, bool=false, Qt::WindowFlags=0)
Definition: BasicGUI_PointDlg.cxx:79
DlgRef_2Sel * GroupLineIntersection
Definition: BasicGUI_PointDlg.h:92
void ValueChangedInSpinBox(double)
Definition: BasicGUI_PointDlg.cxx:670
GEOM::GeomObjPtr myEdge
Definition: BasicGUI_PointDlg.h:81
GEOM::GeomObjPtr myLine1
Definition: BasicGUI_PointDlg.h:84
QLineEdit * myX
Definition: BasicGUI_PointDlg.h:96
virtual bool execute(ObjectList &)
Definition: BasicGUI_PointDlg.cxx:790
double getParameter() const
Definition: BasicGUI_PointDlg.cxx:689
void ConstructorsClicked(int)
Definition: BasicGUI_PointDlg.cxx:331
double getUParameter() const
Definition: BasicGUI_PointDlg.cxx:699
QMap< QAction *, int > myActions
Definition: BasicGUI_PointDlg.h:103
void enterEvent(QEvent *)
Definition: BasicGUI_PointDlg.cxx:633
void CheckBoxClicked()
Definition: BasicGUI_PointDlg.cxx:679
void SetEditCurrentArgument()
Definition: BasicGUI_PointDlg.cxx:570
void SetDoubleSpinBoxStep(double)
Definition: BasicGUI_PointDlg.cxx:315
QGroupBox * myCoordGrp
Definition: BasicGUI_PointDlg.h:95
virtual void addSubshapesToStudy()
Definition: BasicGUI_PointDlg.cxx:924
GEOM::GeomObjPtr myFace
Definition: BasicGUI_PointDlg.h:82
void DeactivateActiveDialog()
Definition: BasicGUI_PointDlg.cxx:659
DlgRef_2Sel1Spin2Check * GroupOnCurve
Definition: BasicGUI_PointDlg.h:91
GEOM::GeomObjPtr myLine2
Definition: BasicGUI_PointDlg.h:85
void updateSize()
Definition: BasicGUI_PointDlg.cxx:1014
DlgRef_1Sel3Spin * GroupRefPoint
Definition: BasicGUI_PointDlg.h:90
QLineEdit * myZ
Definition: BasicGUI_PointDlg.h:98
TopAbs_ShapeEnum myNeedType
Definition: BasicGUI_PointDlg.h:105
bool acceptMouseEvent() const
Definition: BasicGUI_PointDlg.h:61
QButtonGroup * myParamCoord
Definition: BasicGUI_PointDlg.h:101
bool ClickOnApply()
Definition: BasicGUI_PointDlg.cxx:462
GEOM::GeomObjPtr myRefPoint
Definition: BasicGUI_PointDlg.h:83
void Init()
Definition: BasicGUI_PointDlg.cxx:222
virtual bool isValid(QString &)
Definition: BasicGUI_PointDlg.cxx:743
QGroupBox * myParamGroup
Definition: BasicGUI_PointDlg.h:100
bool myBusy
Definition: BasicGUI_PointDlg.h:87
double getVParameter() const
Definition: BasicGUI_PointDlg.cxx:709
virtual QList< GEOM::GeomObjPtr > getSourceObjects()
Definition: BasicGUI_PointDlg.cxx:949
void ClickParamCoord(int)
Definition: BasicGUI_PointDlg.cxx:960
virtual GEOM::GEOM_IOperations_ptr createOperation()
Definition: BasicGUI_PointDlg.cxx:734
void ActivateThisDialog()
Definition: BasicGUI_PointDlg.cxx:644
~BasicGUI_PointDlg()
Definition: BasicGUI_PointDlg.cxx:213
DlgRef_3Spin * GroupXYZ
Definition: BasicGUI_PointDlg.h:89
void ClickOnOk()
Definition: BasicGUI_PointDlg.cxx:451
QLineEdit * myY
Definition: BasicGUI_PointDlg.h:97
void SelectionIntoArgument()
Definition: BasicGUI_PointDlg.cxx:477
void OnPointSelected(const gp_Pnt &)
Definition: BasicGUI_PointDlg.cxx:719
void updateParamCoord(bool theIsUpdate)
Definition: BasicGUI_PointDlg.cxx:970
DlgRef_1Sel2Spin * GroupOnSurface
Definition: BasicGUI_PointDlg.h:93
Definition: DlgRef.h:205
Definition: DlgRef.h:239
Definition: DlgRef.h:399
Definition: DlgRef.h:607
Definition: DlgRef.h:869
Definition: GEOMBase_Skeleton.h:53
int getConstructorId() const
Definition: GEOMBase_Skeleton.cxx:307
Definition: GeometryGUI.h:74
GenericObjPtr< GEOM::GEOM_Object > GeomObjPtr
Definition: GEOM_GenericObjPtr.h:218