module: topic_slider¶
add label, slider, value to a QGridLayout
Coordinate the action of a slider with the topic value:
label value slider
bio 0.7 |---|---|---|[-]|---|
phys 0.2 |--[|]--|---|---|---|
widget | type | description |
---|---|---|
label | QLabel | mnemonic name (no white space) |
value | QLineEdit | string with floating point value: 0 <= value <= 1.0 |
slider | QSlider | graphical adjustment of value |
These three widgets will be added to the parent widget, assumed to be on the same row of a QGridLayout.
A topic (known here as label) is some scientific area of interest to the PRP. Such as, for the SAXS review panel, some of the proposals are for XPCS (X-ray Photon Correlation Spectroscopy).
Each proposal will have a strength value assigned for each topic, indicating how important that topic is to the proposed experiment.
Each reviewer will have a strength value assigned for each topic, indicating the strength of that reviewer in the particular topic.
The strength values will be constrained to the range [0 .. 1]. A QValidator() object will be used to color the background of the QLineEdit to indicate whether or not the entered text is acceptable. The value of the slider will update with acceptable values from the text entry. The background color indicates acceptable or invalid input. The slider will be updated for acceptable values. The validator will also constrain the input to a precision of 2 decimal places.
-
class
Assign_GUP.topic_slider.
AGUP_TopicSlider
(parent, row, label, value)[source]¶ Bases:
PyQt4.QtCore.QObject
add topic, slider, value_entry to a QGridLayout