Back to index

salome-geom  6.5.0
PrimitiveGUI_DiskDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // This library is free software; you can redistribute it and/or
00004 // modify it under the terms of the GNU Lesser General Public
00005 // License as published by the Free Software Foundation; either
00006 // version 2.1 of the License.
00007 //
00008 // This library is distributed in the hope that it will be useful,
00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011 // Lesser General Public License for more details.
00012 //
00013 // You should have received a copy of the GNU Lesser General Public
00014 // License along with this library; if not, write to the Free Software
00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00016 //
00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00018 //
00019 
00020 // GEOM GEOMGUI : GUI for Geometry component
00021 // File   : PrimitiveGUI_DiskDlg.h
00022 // Author : Dmitry Matveitchev, OCN
00023 //
00024 #ifndef BASICGUI_DISKDLG_H
00025 #define BASICGUI_DISKDLG_H
00026 
00027 #include "GEOMBase_Skeleton.h"
00028 #include "GEOM_GenericObjPtr.h"
00029 
00030 class DlgRef_3Sel;
00031 class DlgRef_2Sel1Spin;
00032 class DlgRef_1Spin;
00033 class DlgRef_3Radio;
00034 
00035 //=================================================================================
00036 // class    : PrimitiveGUI_DiskDlg
00037 // purpose  :
00038 //=================================================================================
00039 class PrimitiveGUI_DiskDlg : public GEOMBase_Skeleton
00040 {
00041   Q_OBJECT
00042 
00043 public:
00044   PrimitiveGUI_DiskDlg( GeometryGUI*, QWidget* = 0, bool = false, Qt::WindowFlags = 0 );
00045   ~PrimitiveGUI_DiskDlg();
00046 
00047 protected:
00048   // redefined from GEOMBase_Helper
00049   virtual GEOM::GEOM_IOperations_ptr createOperation();
00050   virtual bool                       isValid( QString& );
00051   virtual bool                       execute( ObjectList& );
00052   
00053   virtual void                       addSubshapesToStudy();
00054   
00055 private:
00056   void                               Init();
00057   void                               enterEvent( QEvent* );
00058   double                             getRadius() const;
00059   int                                myOrientationType;
00060 
00061 private:
00062   GEOM::GeomObjPtr                   myPoint, myDir, myPoint1, myPoint2, myPoint3;
00063 
00064   DlgRef_2Sel1Spin*                  GroupPntVecR;
00065   DlgRef_3Sel*                       Group3Pnts;
00066   DlgRef_1Spin*                      GroupDimensions;
00067   DlgRef_3Radio*                     GroupOrientation;
00068 
00069 private slots:
00070   void                               ClickOnOk();
00071   bool                               ClickOnApply();
00072 
00073   void                               ActivateThisDialog();
00074     
00075   void                               SelectionIntoArgument();
00076 
00077   void                               ConstructorsClicked( int );
00078   void                               SetEditCurrentArgument();
00079   void                               ValueChangedInSpinBox();
00080   void                               SetDoubleSpinBoxStep( double );
00081   void                               RadioButtonClicked();
00082 };
00083 
00084 #endif // BASICGUI_DISKDLG_H