#2239 closed enhancement (fixed)
Use spinboxes instead of textboxes for numerical options in OMEdit
Reported by: | Per Östlund | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | trunk |
Keywords: | Cc: |
Description
OMEdit currently uses textboxes for options such as line thickness, but it would be better to use spinboxes (QSpinBox and QDoubleSpinBox) with appropriate stepsizes instead so that e.g. the user can change values with the mouse scroll. The QT spinboxes also allows you to set a prefix or suffix (setPrefix/setSuffix), which could be used to display the unit of measurement for things such as line widths.
The places I found where spinboxes would be good to use are:
- Options->Line Style: Thickness and Arrow Size.
- Options->Graphical Views: All fields in both tabs.
- Simulation options: Start/stop (hard to choose good stepsize though), tolerance, number of intervals.
Change History (7)
comment:1 by , 12 years ago
follow-up: 4 comment:2 by , 12 years ago
You need to define a minimum and maximum value for QSpinBox. It would be hard to decide what will be the maximum value of thickness.
QSpinBoxes are designed for values about which one is sure what will be maximum value e.g month, days etc....
We can still add the spinboxes by setting the maximum value to the maximum integer value or double value but i think it would be over kill.
comment:3 by , 12 years ago
Milestone: | 1.9.0 → Future |
---|
comment:4 by , 12 years ago
Replying to adeas31:
You need to define a minimum and maximum value for QSpinBox. It would be hard to decide what will be the maximum value of thickness.
Sure, if there's no limit you can just set it to the type limit as you said, I don't see any issues with that.
QSpinBoxes are designed for values about which one is sure what will be maximum value e.g month, days etc....
I don't agree with that. Spinboxes are pretty much the standard when it comes to setting things like line widths, and are in my opinion superior to textboxes for that. For small value changes it's much easier to just hover the mouse over a spinbox and change the value with the mouse scroll or by clicking the button than manually changing the value in a textbox. I actually had a quick look at the applications I have installed, and the only one that didn't use spinboxes for numerical settings was Eclipse (not exactly the best example of good UI design...).
As a sidenote, I actually tried setting the linewidth of a line in OMEdit to 232, and was slightly annoyed that OMEdit actually handled that gracefully. It would have been easier to prove the superiority of spinboxes if OMEdit crashed instead :P
comment:6 by , 9 years ago
Milestone: | Future → pre1.9.4 |
---|
It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.
comment:7 by , 7 years ago
Milestone: | pre1.9.4 → 1.9.4 |
---|
Removing the pre1.9.4 milestone in favor of 1.9.4.
Found another place for spinboxes: in the properties dialogs for diagram shapes.