geom/src/BasicGUI/BasicGUI_PointDlg.h

102 lines
3.0 KiB
C
Raw Normal View History

2004-01-07 20:46:21 +05:00
// GEOM GEOMGUI : GUI for Geometry component
//
// Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// 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.
//
// 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.
//
// 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
//
// See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
//
//
//
// File : BasicGUI_PointDlg.h
// Author : Lucien PIGNOLONI
// Module : GEOM
// $Header$
#ifndef DIALOGBOX_POINT_H
#define DIALOGBOX_POINT_H
#include "GEOMBase_Skeleton.h"
#include "DlgRef_1Sel1Spin.h"
#include "DlgRef_3Spin.h"
2004-12-01 15:39:14 +05:00
#include "DlgRef_1Sel3Spin.h"
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
2005-08-19 17:51:38 +06:00
#if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
#define BASICGUI_WNT_EXPORT __declspec( dllexport )
#else
#define BASICGUI_WNT_EXPORT
#endif
2004-01-07 20:46:21 +05:00
//=================================================================================
// class : BasicGUI_PointDlg
// purpose :
//=================================================================================
class BasicGUI_PointDlg : public GEOMBase_Skeleton
{
Q_OBJECT
public:
BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0);
2004-01-07 20:46:21 +05:00
~BasicGUI_PointDlg();
2004-12-01 15:39:14 +05:00
bool acceptMouseEvent() const { return ( getConstructorId() == 0 ); };
void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
protected:
// redefined from GEOMBase_Helper
virtual GEOM::GEOM_IOperations_ptr createOperation();
virtual bool isValid( QString& );
virtual bool execute( ObjectList& objects );
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
virtual void closeEvent( QCloseEvent* e );
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
private :
void Init();
void enterEvent(QEvent* e);
double getParameter() const;
2004-01-07 20:46:21 +05:00
GeometryGUI* myGeometryGUI;
2004-12-01 15:39:14 +05:00
GEOM::GEOM_Object_var myEdge;
GEOM::GEOM_Object_var myRefPoint;
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
DlgRef_3Spin* GroupXYZ;
DlgRef_1Sel3Spin* GroupRefPoint;
DlgRef_1Sel1Spin* GroupOnCurve;
2004-01-07 20:46:21 +05:00
2004-12-01 15:39:14 +05:00
QGroupBox* myCoordGrp;
QLineEdit* myX;
QLineEdit* myY;
QLineEdit* myZ;
2004-01-07 20:46:21 +05:00
private slots:
void ClickOnOk();
void ClickOnCancel();
2004-12-01 15:39:14 +05:00
bool ClickOnApply();
2004-01-07 20:46:21 +05:00
void ActivateThisDialog();
void DeactivateActiveDialog();
void LineEditReturnPressed();
void SelectionIntoArgument();
void SetEditCurrentArgument();
void ConstructorsClicked(int constructorId);
void ValueChangedInSpinBox(double newValue);
};
#endif // DIALOGBOX_POINT_H