The shared base of the vector parameter inputs. More...
| Header: | #include <VectorInput> |
| Since: | 1.0 |
| Inherits: | QWidget |
| Inherited By: |
| double | componentValue(int component) const |
| void | resetToDefault() |
| void | setComponentValue(int component, double value) |
| void | setLabelWidth(int width) |
| VectorInput(const ParameterInputConfig &config, int count, QWidget *parent) | |
| void | setValues(const QList<double> &values) |
Vec2Input, Vec3Input and Vec4Input were three copies of one class, and the copies drifted: only Vec3Input relayed the stroke signals (D1), and none passed snapTypedEntry (D2) (vector-drag-number §VNF-2). VectorInput holds what they shared: the label, one DragNumber of 2 to 4 components drawn as <x, y, z> with the unit once, the reset button, the config, and the signals (§VND-7).
ParameterInputRow finds the name as the first direct child QLabel and hides the reset button by its text, so both stay as they were.
See also DragNumber and Vec3Input.
[protected] VectorInput::VectorInput(const ParameterInputConfig &config, int count, QWidget *parent)Creates a vector input of count components from config, with parent.
Returns the value of component, or 0 for an index out of range.
See also setComponentValue().
Sets every component to the default and emits componentChanged for each.
Sets component to value with no signal (§OPR-3b).
See also componentValue().
Sets the width of the name label to width.
[protected] void VectorInput::setValues(const QList<double> &values)Sets every component from values with no signal, and one repaint.