src/DlgRef/DlgRef_SpinBox.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   : DlgRef_SpinBox.h
00025 //  Author : Lucien PIGNOLONI
00026 //  Module : GEOM
00027 //  $Header: /home/server/cvs/GEOM/GEOM_SRC/src/DlgRef/DlgRef_SpinBox.h,v 1.7.2.1 2006/06/27 10:55:21 eap Exp $
00028 
00029 #ifndef  GEOMSPINBOX_H
00030 #define  GEOMSPINBOX_H
00031 
00032 #include "QtxDblSpinBox.h"
00033 //#if defined WNT
00034 //#include <SALOME_WNT.hxx>
00035 //#else
00036 //#define SALOME_WNT_EXPORT
00037 //#endif
00038 #if defined WNT && defined WIN32 && defined SALOME_WNT_EXPORTS
00039 #define DLGREF_WNT_EXPORT __declspec( dllexport )
00040 #else
00041 #define DLGREF_WNT_EXPORT
00042 #endif
00043 
00044 #define COORD_MIN -1e+15
00045 #define COORD_MAX +1e+15
00046 
00047 //=================================================================================
00048 // class    : DlgRef_SpinBox
00049 // purpose  : Derivated from QSpinBox class and modified to accept floats
00050 //=================================================================================
00051 class DLGREF_WNT_EXPORT DlgRef_SpinBox : public QtxDblSpinBox
00052 {
00053   Q_OBJECT
00054 
00055 public :
00056   DlgRef_SpinBox(QWidget* parent, const char* name = 0);
00057   ~DlgRef_SpinBox();
00058   
00059   void RangeStepAndValidator(double min = -1000000.0, double max = +1000000.0, 
00060                     double step = 100.0, unsigned short decimals = 3);
00061   void SetValue(double v);
00062   double GetValue();
00063   QString GetString();
00064   
00065 public slots:
00066   void SetStep(double newStep);
00067 
00068 };
00069 
00070 #endif //  GEOMSPINBOX_H