// **************************************************************************** // copyright (c) 2000-2005 Horst Knorr // This file is part of the hk_kdeclasses library. // This file may be distributed and/or modified under the terms of the // GNU Library Public License version 2 as published by the Free Software // Foundation and appearing in the file LGPL included in the // packaging of this file. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. // **************************************************************************** #ifndef HK_KDESPINBOX #define HK_KDESPINBOX #include #include #include class hk_kdespinboxvalidator; class hk_kdespinbox : public QSpinBox { Q_OBJECT public: hk_kdespinbox(QWidget* parent=0, const char* name=0); hk_kdespinbox(int minValue, int maxValue, int step=1,QWidget* parent=0,const char* name=0); virtual ~hk_kdespinbox(); QString mapValueToText(int value); int mapTextToValue(bool* ok); enum enum_displaytype{standard,percent,pixels,cm}; void set_displaytype(enum_displaytype); enum_displaytype displaytype(void); protected: private: void init(void); enum_displaytype p_displaytype; hk_kdespinboxvalidator* p_validator; }; #endif