• OctoMY API
  • OctoMY API Reference
  • C++ Classes
  • OctoMY
  • VectorInput
  • VectorInput Class

    The shared base of the vector parameter inputs. More...

    Header: #include <VectorInput>
    Since: 1.0
    Inherits: QWidget
    Inherited By:

    Vec2Input, Vec3Input, and Vec4Input

    Public Functions

    double componentValue(int component) const
    void resetToDefault()
    void setComponentValue(int component, double value)
    void setLabelWidth(int width)

    Protected Functions

    VectorInput(const ParameterInputConfig &config, int count, QWidget *parent)
    void setValues(const QList<double> &values)

    Detailed Description

    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.

    Member Function Documentation

    [protected] VectorInput::VectorInput(const ParameterInputConfig &config, int count, QWidget *parent)

    Creates a vector input of count components from config, with parent.

    double VectorInput::componentValue(int component) const

    Returns the value of component, or 0 for an index out of range.

    See also setComponentValue().

    void VectorInput::resetToDefault()

    Sets every component to the default and emits componentChanged for each.

    void VectorInput::setComponentValue(int component, double value)

    Sets component to value with no signal (§OPR-3b).

    See also componentValue().

    void VectorInput::setLabelWidth(int width)

    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.