diff options
| author | Johan B. C. Engelen <jbc.engelen@swissonline.ch> | 2011-04-17 12:51:06 +0000 |
|---|---|---|
| committer | Johan Engelen <goejendaagh@zonnet.nl> | 2011-04-17 12:51:06 +0000 |
| commit | 70829da1b189d6d8f07f12d97b9273d56dbd789e (patch) | |
| tree | d041efcd3a74ce09398665b066a0bd891dad2fde /src/ui/widget/scalar-unit.cpp | |
| parent | change spinbox to new one in many places. (diff) | |
| download | inkscape-70829da1b189d6d8f07f12d97b9273d56dbd789e.tar.gz inkscape-70829da1b189d6d8f07f12d97b9273d56dbd789e.zip | |
add new preference widget for a number with a unit.
change Preferences > Steps to this new widget
(bzr r10177)
Diffstat (limited to 'src/ui/widget/scalar-unit.cpp')
| -rw-r--r-- | src/ui/widget/scalar-unit.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ui/widget/scalar-unit.cpp b/src/ui/widget/scalar-unit.cpp index e713f3e06..1c0fdff68 100644 --- a/src/ui/widget/scalar-unit.cpp +++ b/src/ui/widget/scalar-unit.cpp @@ -130,6 +130,22 @@ ScalarUnit::setUnit(Glib::ustring const &unit) { return true; } +/** Adds the unit type to the ScalarUnit widget */ +void +ScalarUnit::setUnitType(UnitType unit_type) { + g_assert(_unit_menu != NULL); + _unit_menu->setUnitType(unit_type); + lastUnits = _unit_menu->getUnitAbbr(); +} + +/** Resets the unit type for the ScalarUnit widget */ +void +ScalarUnit::resetUnitType(UnitType unit_type) { + g_assert(_unit_menu != NULL); + _unit_menu->resetUnitType(unit_type); + lastUnits = _unit_menu->getUnitAbbr(); +} + /** Gets the object for the currently selected unit */ Unit ScalarUnit::getUnit() const { |
