labscript-suite-temp / labscript_utils

Shared modules used by the labscript suite. Includes a graphical exception handler, debug tools, configuration management, cross platform filepath conversions, unit conversions and custom GUI widgets.
Other
0 stars 0 forks source link

Units in spinbox for analog quantities #12

Open philipstarkey opened 7 years ago

philipstarkey commented 7 years ago

Original report (archived issue) by Shaun Johnstone (Bitbucket: shjohnst, GitHub: shjohnst).


As per @spielman's suggestion in pull request #12, we should consider moving the units to within the spinbox for analog quantity widgets.

I would encourage a solution where the Hz (for exampe) is rendered in the spinbox and perhaps where a right click gives access to the units.

The unit change could be a sub-menu in the right-click menu for that widget. This helps to avoid the "jagged" appearance of the new vertical DDS widget layout.

philipstarkey commented 7 years ago

Original comment by Ian B. Spielman (Bitbucket: Ian Spielman).


I would make it the only content of the right click menu.

philipstarkey commented 7 years ago

Original comment by Philip Starkey (Bitbucket: pstarkey, GitHub: pstarkey).


I don't think it's feasible to have only the units in the right click menu. The right click menu is already populated with BLACS specific features such as changing the default step size for the widget and locking the control against accidental changes. We might be able to make it so that a left click on the units text (the suffix of the QDoubleSpinBox) brings up a separate context menu that just contains units.

Alternatively (and actually I think I might prefer this one) we could have a (small) button next to the spin box, like we do next to the repeat button in the queue, that brings up a menu of units. That would probably be a lot easier to implement as well.