src/BasicGUI/BasicGUI_MarkerDlg.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_MarkerDlg.h
00025 //  Author : Sergey LITONIN
00026 //  Module : GEOM
00027 
00028 #ifndef DIALOGBOX_Marker_H
00029 #define DIALOGBOX_Marker_H
00030 
00031 #include "GEOMBase_Skeleton.h"
00032 #include "DlgRef_1Sel_QTD.h"
00033 #include "DlgRef_3Sel_QTD.h"
00034 
00035 #include <qmap.h>
00036 
00037 class DlgRef_SpinBox;
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_MarkerDlg : public GEOMBase_Skeleton
00046 {
00047   Q_OBJECT
00048 
00049 private:
00050   enum { X, Y, Z, DX1, DY1, DZ1, DX2, DY2, DZ2 };
00051   typedef QMap< int, DlgRef_SpinBox* > DataMap;
00052 
00053 public:
00054                                 BasicGUI_MarkerDlg( GeometryGUI* theGeometryGUI, QWidget* );
00055   virtual                       ~BasicGUI_MarkerDlg();
00056   void                          Init();
00057 
00058 protected:
00059   virtual                       GEOM::GEOM_IOperations_ptr createOperation();
00060   virtual bool                  isValid( QString& );
00061   virtual bool                  execute( ObjectList& objects );
00062   virtual void                  closeEvent( QCloseEvent* e );
00063   virtual void                  displayPreview ( const bool   activate = false,
00064                                                  const bool   update = true,
00065                                                  const bool   toRemoveFromEngine = true,
00066                                                  const double lineWidth = -1 );
00067 
00068 private:
00069   void                          enterEvent( QEvent* e );
00070   void                          onSelectionDone0();
00071 
00072 private slots:
00073   void                          onOk();
00074   void                          onClose();
00075   bool                          onApply();
00076   void                          onActivate();
00077   void                          onDeactivate();
00078   void                          onSelectionDone();
00079   void                          onValueChanged( double );
00080   void                          ConstructorsClicked( int );
00081   void                          LineEditReturnPressed();
00082   void                          SetEditCurrentArgument();
00083 
00084 private:
00085   DataMap                       myData;
00086   int                           myConstructorId;
00087   int                           myBlockPreview;
00088 
00089   QGroupBox*                    aMainGrp;
00090   DlgRef_1Sel_QTD*              Group1;
00091   DlgRef_3Sel_QTD*              Group2;
00092 
00093 };
00094 
00095 #endif // DIALOGBOX_Marker_H