PeriDyno 1.0.0
Loading...
Searching...
No Matches
WBoolFieldWidget.cpp
Go to the documentation of this file.
1#include "WBoolFieldWidget.h"
2
4{
5 layout = this->setLayout(std::make_unique<Wt::WHBoxLayout>());
6 layout->setContentsMargins(0, 0, 0, 0);
7 layout->setSpacing(0);
8
9 setValue(field);
10 mfield = field;
11
12 checkbox->changed().connect(this, &WBoolFieldWidget::updateField);
13}
14
18
20{
22 if (f == nullptr) {
23 return;
24 }
25
26 checkbox = layout->addWidget(std::make_unique<Wt::WCheckBox>());
27
28 checkbox->setChecked(f->getData());
29 Wt::log("info") << f->getData();
30}
31
33{
35 if (f == nullptr)
36 {
37 return;
38 }
39 f->setValue(false);
40 f->update();
41 changeValue_.emit(1);
42}
void setValue(dyno::FBase *)
dyno::FBase * mfield
Wt::WHBoxLayout * layout
Wt::WCheckBox * checkbox
WBoolFieldWidget(dyno::FBase *)
Wt::Signal< int > changeValue_
virtual void update()
Definition FBase.cpp:201
DataType getData()
Definition Field.h:74
void setValue(T val)
Definition Field.h:111
TA * cast(TB *b)
Definition Typedef.inl:286