[Bug 112933] JJ: replace double spinboxes in koffice applications with the KoUnitDoubleSpinBox

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Bug 112933] JJ: replace double spinboxes in koffice applications with the KoUnitDoubleSpinBox

Tymek
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=112933         




------- Additional Comments From maju7 o2 pl  2005-10-28 19:27 -------
There's a problem/decision to make:
KoUnitDoubleSpinBox's constructor takes values in points and KDoubleNumInput's setRange takes values which are unit independent so:

   eLeft = new KoUnitDoubleSpinBox( indentFrame, 0, 9999, 1, 0.0, m_unit );<-here we set the stepping to one pt
doesn't mean the same
   eLeft->setRange( 0, 9999, 1, false);<-here we set the stepping to one not dependantly on units
It's not a big deal, but what should I do:
a) leave the call to setRange (or call the constructor using fromUserValue(1)) every time I change from one class to the other
b) delete call to setRange? In this case the functionality will change a bit.

And the other thing:
Not only creation and labe has to change:

 double KoIndentSpacingWidget::leftIndent() const
 {
-    return QMAX(0,KoUnit::fromUserValue( eLeft->value(), m_unit ));
+    return QMAX(0, eLeft->value() );
 }

Calls to setValue can stay but it's better to change it to changeValue
-    eWidth->setValue( KoUnit::toUserValue( selectedTab->ptWidth, m_unit ) );
+    eWidth->changeValue( selectedTab->ptWidth );
____________________________________
koffice mailing list
[hidden email]
To unsubscribe please visit:
https://mail.kde.org/mailman/listinfo/koffice