-void lengthAutoToWidgets(QLineEdit * input, LengthCombo * combo,
- Length const & len, Length::UNIT defaultUnit)
+void lengthToWidgets(QLineEdit * input, LengthCombo * combo,
+ docstring const & len, Length::UNIT defaultUnit)
+{
+ lengthToWidgets(input, combo, to_utf8(len), defaultUnit);
+}
+
+
+double widgetToDouble(QLineEdit const * input)
+{
+ QString const text = input->text();
+ if (text.isEmpty())
+ return 0.0;
+
+ return text.trimmed().toDouble();
+}
+
+
+string widgetToDoubleStr(QLineEdit const * input)
+{
+ QString const text = input->text();
+ if (text.isEmpty())
+ return string();
+
+ return convert<string>(text.trimmed().toDouble());
+}
+
+
+void doubleToWidget(QLineEdit * input, double const & value, char f, int prec)