Databasehandlingdialogclasses  0.5.3
hk_kdespinbox.h
1 // ****************************************************************************
2 // copyright (c) 2000-2005 Horst Knorr <hk_classes@knoda.org>
3 // This file is part of the hk_kdeclasses library.
4 // This file may be distributed and/or modified under the terms of the
5 // GNU Library Public License version 2 as published by the Free Software
6 // Foundation and appearing in the file LGPL included in the
7 // packaging of this file.
8 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
9 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
10 // ****************************************************************************
11 
12 #ifndef HK_KDESPINBOX
13 #define HK_KDESPINBOX
14 #include <qspinbox.h>
15 #include <qvalidator.h>
16 #include<hk_font.h>
17 
19 class hk_kdespinbox : public QSpinBox
20 {
21  Q_OBJECT
22 
23  public:
24  hk_kdespinbox(QWidget* parent=0, const char* name=0);
25  hk_kdespinbox(int minValue, int maxValue, int step=1,QWidget* parent=0,const char* name=0);
26  virtual ~hk_kdespinbox();
27  QString mapValueToText(int value);
28  int mapTextToValue(bool* ok);
29  enum enum_displaytype{standard,percent,pixels,cm};
30  void set_displaytype(enum_displaytype);
31  enum_displaytype displaytype(void);
32 
33  protected:
34 
35  private:
36  void init(void);
37  enum_displaytype p_displaytype;
38  hk_kdespinboxvalidator* p_validator;
39 };
40 
41 
42 #endif
Definition: hk_kdespinbox.h:19
Definition: hk_kdespinbox.cpp:17