2007-10-15 16:41:03 +06:00
|
|
|
// GEOM GEOMGUI : GUI for Geometry component
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2007-10-15 16:41:03 +06:00
|
|
|
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
|
|
|
|
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2007-10-15 16:41:03 +06:00
|
|
|
// This library is free software; you can redistribute it and/or
|
|
|
|
// modify it under the terms of the GNU Lesser General Public
|
|
|
|
// License as published by the Free Software Foundation; either
|
|
|
|
// version 2.1 of the License.
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2007-10-15 16:41:03 +06:00
|
|
|
// This library is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
// Lesser General Public License for more details.
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2007-10-15 16:41:03 +06:00
|
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
|
|
// License along with this library; if not, write to the Free Software
|
|
|
|
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2006-06-01 17:32:40 +06:00
|
|
|
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
2007-10-15 16:41:03 +06:00
|
|
|
// File : BasicGUI_PointDlg.h
|
|
|
|
// Author : Lucien PIGNOLONI, Open CASCADE S.A.S.
|
2004-01-07 20:46:21 +05:00
|
|
|
//
|
|
|
|
|
2007-10-15 16:41:03 +06:00
|
|
|
#ifndef BASICGUI_POINTDLG_H
|
|
|
|
#define BASICGUI_POINTDLG_H
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2007-10-15 16:41:03 +06:00
|
|
|
#include <GEOMBase_Skeleton.h>
|
2007-07-09 13:39:05 +06:00
|
|
|
|
|
|
|
class DlgRef_1Sel1Spin;
|
|
|
|
class DlgRef_3Spin;
|
2008-02-06 20:43:50 +05:00
|
|
|
class DlgRef_2Sel;
|
2007-07-09 13:39:05 +06:00
|
|
|
class DlgRef_1Sel3Spin;
|
2008-07-21 19:51:52 +06:00
|
|
|
class DlgRef_1Sel2Spin;
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2004-12-01 15:39:14 +05:00
|
|
|
class QLineEdit;
|
|
|
|
class QGroupBox;
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2007-07-09 13:39:05 +06:00
|
|
|
class gp_Pnt;
|
|
|
|
|
2004-01-07 20:46:21 +05:00
|
|
|
//=================================================================================
|
|
|
|
// class : BasicGUI_PointDlg
|
|
|
|
// purpose :
|
|
|
|
//=================================================================================
|
2007-10-15 18:19:01 +06:00
|
|
|
class BasicGUI_PointDlg : public GEOMBase_Skeleton
|
2004-01-07 20:46:21 +05:00
|
|
|
{
|
2007-10-15 16:41:03 +06:00
|
|
|
Q_OBJECT
|
2004-01-07 20:46:21 +05:00
|
|
|
|
|
|
|
public:
|
2007-10-15 20:16:21 +06:00
|
|
|
BasicGUI_PointDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
|
2004-01-07 20:46:21 +05:00
|
|
|
|
2007-10-15 16:41:03 +06:00
|
|
|
~BasicGUI_PointDlg();
|
2004-12-01 15:39:14 +05:00
|
|
|
|
2007-10-15 16:41:03 +06:00
|
|
|
bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); }
|
|
|
|
void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
|
2006-05-06 14:44:32 +06:00
|
|
|
|
2004-12-01 15:39:14 +05:00
|
|
|
protected:
|
2007-10-15 16:41:03 +06:00
|
|
|
// redefined from GEOMBase_Helper
|
|
|
|
virtual GEOM::GEOM_IOperations_ptr createOperation();
|
|
|
|
virtual bool isValid( QString& );
|
|
|
|
virtual bool execute( ObjectList& );
|
2008-02-06 20:43:50 +05:00
|
|
|
virtual void addSubshapesToStudy();
|
2007-10-15 16:41:03 +06:00
|
|
|
|
|
|
|
private:
|
|
|
|
void Init();
|
|
|
|
void enterEvent( QEvent* );
|
|
|
|
double getParameter() const;
|
2008-07-21 19:51:52 +06:00
|
|
|
double getUParameter() const;
|
|
|
|
double getVParameter() const;
|
2007-10-15 16:41:03 +06:00
|
|
|
|
|
|
|
private:
|
|
|
|
GEOM::GEOM_Object_var myEdge;
|
2008-07-21 19:51:52 +06:00
|
|
|
GEOM::GEOM_Object_var myFace;
|
2007-10-15 16:41:03 +06:00
|
|
|
GEOM::GEOM_Object_var myRefPoint;
|
2008-02-06 20:43:50 +05:00
|
|
|
GEOM::GEOM_Object_var myLine1;
|
|
|
|
GEOM::GEOM_Object_var myLine2;
|
2007-10-15 16:41:03 +06:00
|
|
|
|
|
|
|
DlgRef_3Spin* GroupXYZ;
|
|
|
|
DlgRef_1Sel3Spin* GroupRefPoint;
|
|
|
|
DlgRef_1Sel1Spin* GroupOnCurve;
|
2008-02-06 20:43:50 +05:00
|
|
|
DlgRef_2Sel* GroupLineIntersection;
|
2008-07-21 19:51:52 +06:00
|
|
|
DlgRef_1Sel2Spin* GroupOnSurface;
|
2007-10-15 16:41:03 +06:00
|
|
|
|
|
|
|
QGroupBox* myCoordGrp;
|
|
|
|
QLineEdit* myX;
|
|
|
|
QLineEdit* myY;
|
|
|
|
QLineEdit* myZ;
|
|
|
|
|
2004-01-07 20:46:21 +05:00
|
|
|
private slots:
|
2007-10-15 16:41:03 +06:00
|
|
|
void ClickOnOk();
|
|
|
|
bool ClickOnApply();
|
|
|
|
void ActivateThisDialog();
|
|
|
|
void DeactivateActiveDialog();
|
|
|
|
void LineEditReturnPressed();
|
|
|
|
void SelectionIntoArgument();
|
|
|
|
void SetEditCurrentArgument();
|
|
|
|
void ConstructorsClicked( int );
|
|
|
|
void ValueChangedInSpinBox( double );
|
2008-03-07 12:08:10 +05:00
|
|
|
void SetDoubleSpinBoxStep( double );
|
2004-01-07 20:46:21 +05:00
|
|
|
};
|
|
|
|
|
2007-10-15 16:41:03 +06:00
|
|
|
#endif // BASICGUI_POINTDLG_H
|