src/BasicGUI/BasicGUI_CircleDlg.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_CircleDlg.h
00025 //  Author : Lucien PIGNOLONI
00026 //  Module : GEOM
00027 
00028 #ifndef DIALOGBOX_CIRCLE_H
00029 #define DIALOGBOX_CIRCLE_H
00030 
00031 #include "GEOMBase_Skeleton.h"
00032 #include "DlgRef_2Sel1Spin.h"
00033 #include "DlgRef_3Sel_QTD.h"
00034 
00035 #include "BasicGUI.h"
00036 
00037 #include <gp_Dir.hxx>
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 //=================================================================================
00046 // class    : BasicGUI_CircleDlg
00047 // purpose  :
00048 //=================================================================================
00049 class BasicGUI_CircleDlg : public GEOMBase_Skeleton
00050 {
00051     Q_OBJECT
00052 
00053 public:
00054     BasicGUI_CircleDlg(GeometryGUI* theGeometryGUI, QWidget* parent = 0,
00055                  const char* name = 0, bool modal = FALSE, WFlags fl = 0);
00056     ~BasicGUI_CircleDlg();
00057 
00058 protected:
00059     // redefined from GEOMBase_Helper
00060     virtual GEOM::GEOM_IOperations_ptr createOperation();
00061     virtual bool isValid( QString& );
00062     virtual bool execute( ObjectList& objects );
00063 
00064     virtual void closeEvent( QCloseEvent* e );    
00065 
00066 private:
00067     void   Init();
00068     void   enterEvent(QEvent* e);
00069     double getRadius() const;
00070 
00071     GEOM::GEOM_Object_var myPoint, myDir, myPoint1, myPoint2, myPoint3;
00072 
00073     DlgRef_2Sel1Spin* GroupPntVecR;
00074     DlgRef_3Sel_QTD*  Group3Pnts;
00075 
00076 private slots:
00077     void ClickOnOk();
00078     void ClickOnCancel();
00079     bool ClickOnApply();
00080 
00081     void ActivateThisDialog();
00082     void DeactivateActiveDialog();
00083     
00084     void SelectionIntoArgument();
00085 
00086     void ConstructorsClicked( int );
00087     void LineEditReturnPressed();
00088     void SetEditCurrentArgument();
00089     void ValueChangedInSpinBox();
00090 };
00091 
00092 #endif // DIALOGBOX_CIRCLE_H