feat(parameters): add defaults and remove qt keywords

This commit is contained in:
parker
2025-07-24 01:55:21 +01:00
parent 8a380a0fee
commit 9880aa0b05
14 changed files with 34 additions and 25 deletions

View File

@@ -16,7 +16,6 @@ enzo::ui::AbstractFormParm::AbstractFormParm(std::weak_ptr<prm::Parameter> param
label->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
auto slider = new AbstractSliderParm();
connect(slider, &AbstractSliderParm::valueChanged, this, &AbstractFormParm::changeValue);
slider->setValue(sharedParameter->evalFloat());
mainLayout_ = new QHBoxLayout();
@@ -28,6 +27,8 @@ enzo::ui::AbstractFormParm::AbstractFormParm(std::weak_ptr<prm::Parameter> param
setProperty("class", "Parameter");
setStyleSheet(".Parameter { background-color: none;}");
setLayout(mainLayout_);
connect(slider, &AbstractSliderParm::valueChanged, this, &AbstractFormParm::changeValue);
}
}

View File

@@ -2,6 +2,7 @@
#include <QWidget>
#include <QHBoxLayout>
#include <memory>
#include <qtmetamacros.h>
namespace enzo::ui
{
@@ -9,13 +10,13 @@ namespace enzo::ui
class AbstractFormParm
: public QWidget
{
Q_OBJECT
public:
AbstractFormParm(std::weak_ptr<prm::Parameter> parameter);
protected slots:
protected Q_SLOTS:
void changeValue(bt::floatT value);
private:
QHBoxLayout* mainLayout_;
std::weak_ptr<prm::Parameter> parameter_;

View File

@@ -15,7 +15,7 @@ public:
AbstractSliderParm(QWidget *parent = nullptr, Qt::WindowFlags f = Qt::WindowFlags());
void setValue(bt::floatT value);
signals:
Q_SIGNALS:
void valueChanged(bt::floatT value);
private: