diff -r b7b29cb82360 -r 5188f8a74a5c widgets/vec3editor.cpp --- a/widgets/vec3editor.cpp Wed Jun 22 21:46:38 2022 +0300 +++ b/widgets/vec3editor.cpp Wed Jun 22 22:50:37 2022 +0300 @@ -13,7 +13,6 @@ VectorInput::VectorInput(QWidget *parent, QFlags flags) : QWidget{parent} { - this->ui.setupUi(this); if (flags.testFlag(NoMultiplyButton)) { this->ui.multiply->setVisible(false); @@ -50,6 +49,36 @@ Q_EMIT this->valueChanged(value); } +qreal VectorInput::x() const +{ + return this->ui.x->value(); +} + +qreal VectorInput::y() const +{ + return this->ui.y->value(); +} + +qreal VectorInput::z() const +{ + return this->ui.z->value(); +} + +void VectorInput::setX(qreal x) +{ + this->ui.x->setValue(x); +} + +void VectorInput::setY(qreal y) +{ + this->ui.y->setValue(y); +} + +void VectorInput::setZ(qreal z) +{ + this->ui.z->setValue(z); +} + std::array VectorInput::spinboxes() { return {this->ui.x, this->ui.y, this->ui.z};