hk_kdespinbox.h

00001 // ****************************************************************************
00002 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>  
00003 // This file is part of the hk_kdeclasses library.
00004 // This file may be distributed and/or modified under the terms of the
00005 // GNU Library Public License version 2 as published by the Free Software
00006 // Foundation and appearing in the file LGPL included in the
00007 // packaging of this file.
00008 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
00009 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
00010 // ****************************************************************************
00011 
00012 #ifndef HK_KDESPINBOX
00013 #define HK_KDESPINBOX
00014 #include <qspinbox.h>
00015 #include <qvalidator.h>
00016 #include<hk_font.h>
00017 
00018 class hk_kdespinboxvalidator;
00019 class hk_kdespinbox : public QSpinBox
00020 {
00021     Q_OBJECT
00022 
00023         public:
00024         hk_kdespinbox(QWidget* parent=0, const char* name=0);
00025         hk_kdespinbox(int minValue, int maxValue, int step=1,QWidget* parent=0,const char* name=0);
00026         virtual ~hk_kdespinbox();
00027         QString mapValueToText(int value);
00028         int mapTextToValue(bool* ok);
00029         enum enum_displaytype{standard,percent,pixels,cm};
00030         void set_displaytype(enum_displaytype);
00031         enum_displaytype displaytype(void);
00032 
00033     protected:
00034 
00035     private:
00036         void init(void);
00037         enum_displaytype p_displaytype;
00038         hk_kdespinboxvalidator* p_validator;
00039 };
00040 
00041 
00042 #endif

Generated on Tue Nov 28 00:05:29 2006 for Databasehandlingdialogclasses by  doxygen 1.5.0