Changeset View
Changeset View
Standalone View
Standalone View
libs/widgets/KoUnitDoubleSpinBox.h
Show All 33 Lines | |||||
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, milimeters, 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 adviced 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 adviced 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 | * | ||||
43 | * This class need to be replaced as much as possible with \see KisDoubleParseUnitSpinBox to add math parsing ability. | ||||
42 | */ | 44 | */ | ||
43 | class KRITAWIDGETS_EXPORT KoUnitDoubleSpinBox : public QDoubleSpinBox | 45 | class KRITAWIDGETS_EXPORT KoUnitDoubleSpinBox : public QDoubleSpinBox | ||
44 | { | 46 | { | ||
45 | Q_OBJECT | 47 | Q_OBJECT | ||
46 | public: | 48 | public: | ||
47 | /** | 49 | /** | ||
48 | * Constructor | 50 | * Constructor | ||
49 | * Create a new spinBox with very broad range predefined. | 51 | * Create a new spinBox with very broad range predefined. | ||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |