Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KoUnitDoubleSpinBox.h
Show All 26 Lines | |||||
27 | #include <QDoubleSpinBox> | 27 | #include <QDoubleSpinBox> | ||
28 | 28 | | |||
29 | class KoUnit; | 29 | class KoUnit; | ||
30 | 30 | | |||
31 | /** | 31 | /** | ||
32 | * Spin box for double precision numbers with unit display. | 32 | * Spin box for double precision numbers with unit display. | ||
33 | * Use this widget for any value that represents a real measurable value for consistency throughout | 33 | * Use this widget for any value that represents a real measurable value for consistency throughout | ||
34 | * Krita. | 34 | * Krita. | ||
35 | * This widget shows the value in the user-selected units (inch, milimeters, etc) but keeps the | 35 | * This widget shows the value in the user-selected units (inch, millimeters, etc) but keeps the | ||
36 | * Krita-widget default measurement unit internally. This has the advantage that just setting and | 36 | * Krita-widget default measurement unit internally. This has the advantage that just setting and | ||
37 | * getting a value will not change the value due to conversions. | 37 | * getting a value will not change the value due to conversions. | ||
38 | * The KoDocument class has a unit() method for consistent (document wide) configuration of the | 38 | * The KoDocument class has a unit() method for consistent (document wide) configuration of the | ||
39 | * used unit. | 39 | * used unit. | ||
40 | * It is advised to use a QDoubleSpinBox in QtDesigner and then use the context-menu item: 'Promote to Custom Widget' and use the values: 'classname=KoUnitDoubleSpinBox', 'headerfile=KoUnitDoubleSpinBox.h' | 40 | * It is advised to use a QDoubleSpinBox in QtDesigner and then use the context-menu item: 'Promote to Custom Widget' and use the values: 'classname=KoUnitDoubleSpinBox', 'headerfile=KoUnitDoubleSpinBox.h' | ||
41 | * This will generate code that uses this spinbox in the correct manner. | 41 | * This will generate code that uses this spinbox in the correct manner. | ||
42 | * | 42 | * | ||
43 | * This class need to be replaced as much as possible with \see KisDoubleParseUnitSpinBox to add math parsing ability. | 43 | * This class need to be replaced as much as possible with \see KisDoubleParseUnitSpinBox to add math parsing ability. | ||
▲ Show 20 Lines • Show All 76 Lines • Show Last 20 Lines |