Back to index

salome-geom  6.5.0
BasicGUI_MarkerDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  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 // GEOM GEOMGUI : GUI for Geometry component
00024 // File   : BasicGUI_MarkerDlg.h
00025 // Author : Sergey LITONIN, Open CASCADE S.A.S. (sergey.litonin@opencascade.com)
00026 //
00027 #ifndef BASICGUI_MARKERDLG_H
00028 #define BASICGUI_MARKERDLG_H
00029 
00030 #include "GEOMBase_Skeleton.h"
00031 #include "GEOM_GenericObjPtr.h"
00032 
00033 #include <QMap>
00034 
00035 class DlgRef_1Sel;
00036 class DlgRef_3Sel;
00037 class SalomeApp_DoubleSpinBox;
00038 class QFrame;
00039 
00040 class BasicGUI_MarkerDlg : public GEOMBase_Skeleton
00041 {
00042   Q_OBJECT
00043 
00044 private:
00045   enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
00046   typedef QMap< int, SalomeApp_DoubleSpinBox* > DataMap;
00047 
00048 public:
00049                                 BasicGUI_MarkerDlg( GeometryGUI*, QWidget* );
00050   virtual                       ~BasicGUI_MarkerDlg();
00051   void                          Init();
00052 
00053 protected:
00054   virtual                       GEOM::GEOM_IOperations_ptr createOperation();
00055   virtual bool                  isValid( QString& );
00056   virtual bool                  execute( ObjectList& );
00057   virtual void                  displayPreview ( const bool   = false,
00058                                                  const bool   = true,
00059                                                  const bool   = true,
00060                                                  const double = -1 );
00061   virtual void                  addSubshapesToStudy();
00062 
00063 private:
00064   void                          enterEvent( QEvent* );
00065   void                          onSelectionDone0();
00066 
00067   GEOM::GeomObjPtr              myShape;
00068   GEOM::GeomObjPtr              myPoint;
00069   GEOM::GeomObjPtr              myVectorX;
00070   GEOM::GeomObjPtr              myVectorY;
00071 
00072 private slots:
00073   void                          onOk();
00074   bool                          onApply();
00075   void                          onActivate();
00076   void                          onDeactivate();
00077   void                          onSelectionDone();
00078   void                          onValueChanged( double );
00079   void                          ConstructorsClicked( int );
00080   void                          SetEditCurrentArgument();
00081 
00082 private:
00083   DataMap                       myData;
00084   int                           myConstructorId;
00085   int                           myBlockPreview;
00086 
00087   QFrame*                       aMainGrp;
00088   DlgRef_1Sel*                  Group1;
00089   DlgRef_3Sel*                  Group2;
00090 };
00091 
00092 #endif // BASICGUI_MARKERDLG_H