src/BasicGUI/BasicGUI_PointDlg.h

Go to the documentation of this file.
00001 //  GEOM GEOMGUI : GUI for Geometry component
00002 //
00003 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00005 // 
00006 //  This library is free software; you can redistribute it and/or 
00007 //  modify it under the terms of the GNU Lesser General Public 
00008 //  License as published by the Free Software Foundation; either 
00009 //  version 2.1 of the License. 
00010 // 
00011 //  This library is distributed in the hope that it will be useful, 
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00014 //  Lesser General Public License for more details. 
00015 // 
00016 //  You should have received a copy of the GNU Lesser General Public 
00017 //  License along with this library; if not, write to the Free Software 
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00019 // 
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //
00023 //
00024 //  File   : BasicGUI_PointDlg.h
00025 //  Author : Lucien PIGNOLONI
00026 //  Module : GEOM
00027 
00028 #ifndef DIALOGBOX_POINT_H
00029 #define DIALOGBOX_POINT_H
00030 
00031 #include "GEOMBase_Skeleton.h"
00032 #include "DlgRef_1Sel1Spin.h"
00033 #include "DlgRef_3Spin.h"
00034 #include "DlgRef_1Sel3Spin.h"
00035 
00036 class QLineEdit;
00037 class QGroupBox;
00038 
00039 #if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
00040 #define BASICGUI_WNT_EXPORT __declspec( dllexport )
00041 #else
00042 #define BASICGUI_WNT_EXPORT
00043 #endif
00044 //=================================================================================
00045 // class    : BasicGUI_PointDlg
00046 // purpose  :
00047 //=================================================================================
00048 class BasicGUI_PointDlg : public GEOMBase_Skeleton
00049 { 
00050     Q_OBJECT
00051 
00052 public:
00053     BasicGUI_PointDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
00054                 const char* name = 0, bool modal = FALSE, WFlags fl = 0);
00055 
00056     ~BasicGUI_PointDlg();
00057 
00058     bool acceptMouseEvent() const { return ( getConstructorId() == 0 );  };
00059     void OnPointSelected( const gp_Pnt& ); // called by BasicGUI::OnMousePress()
00060 
00061 protected:
00062     // redefined from GEOMBase_Helper
00063     virtual GEOM::GEOM_IOperations_ptr createOperation();
00064     virtual bool isValid( QString& );
00065     virtual bool execute( ObjectList& objects );
00066 
00067     virtual void closeEvent( QCloseEvent* e );
00068 
00069 private :
00070     void Init();
00071     void enterEvent(QEvent* e);
00072     double getParameter() const;
00073 
00074     GEOM::GEOM_Object_var myEdge;
00075     GEOM::GEOM_Object_var myRefPoint; 
00076 
00077     DlgRef_3Spin*     GroupXYZ;
00078     DlgRef_1Sel3Spin* GroupRefPoint;
00079     DlgRef_1Sel1Spin* GroupOnCurve;
00080 
00081     QGroupBox*        myCoordGrp;
00082     QLineEdit*        myX;
00083     QLineEdit*        myY;
00084     QLineEdit*        myZ;
00085 
00086 private slots:
00087     void ClickOnOk();
00088     void ClickOnCancel();
00089     bool ClickOnApply();
00090     void ActivateThisDialog();
00091     void DeactivateActiveDialog();
00092     void LineEditReturnPressed();
00093     void SelectionIntoArgument();
00094     void SetEditCurrentArgument();
00095     void ConstructorsClicked(int constructorId);
00096     void ValueChangedInSpinBox(double newValue);
00097 };
00098 
00099 #endif // DIALOGBOX_POINT_H