3
$Id: UnitBox.h,v 1.9 2000/08/31 11:17:01 wtrobin Exp $
5
This file is part of KIllustrator.
6
Copyright (C) 1998 Kai-Uwe Sattler (kus@iti.cs.uni-magdeburg.de)
8
This program is free software; you can redistribute it and/or modify
9
it under the terms of the GNU Library General Public License as
11
the Free Software Foundation; either version 2 of the License, or
12
(at your option) any later version.
14
This program is distributed in the hope that it will be useful,
15
but WITHOUT ANY WARRANTY; without even the implied warranty of
16
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
GNU General Public License for more details.
19
You should have received a copy of the GNU Library General Public License
20
along with this program; if not, write to the Free Software
21
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
32
class KDoubleNumInput;
34
class UnitBox : public QHBox {
37
UnitBox (QWidget* parent = 0L, const char* name = 0L);
40
void setFormatString (const char* fmt);
43
void setValue (float value);
45
void setStep (float step);
46
float getStep () const;
48
void setRange (float minVal, float maxVal);
49
void getRange (float& minVal, float& maxVal);
51
void setEditable (bool);
52
void enableUnits (bool flag);
54
static void setDefaultMeasurementUnit (MeasurementUnit unit);
57
void valueChanged (float val);
60
void unitChanged (int id);
61
void slotValueChanged(double f);
64
KDoubleNumInput *valueBox;
68
float ptMinVal, ptMaxVal; // the minimal and maximal value in points
71
static MeasurementUnit defaultUnit;