feat(parameters): add defaults and remove qt keywords
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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_;
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user