HAL
lut_wizardpage.cpp
Go to the documentation of this file.
4 
5 namespace hal
6 {
8  {
9  setTitle("LUT Init");
10  setSubTitle("Enter parameters for LUT component");
11  mLayout = new QGridLayout(this);
12 
13  mAscending = new QCheckBox(this);
14 
15  mLabAscending = new QLabel("Bit order ascending: ");
16 
17  mLayout->addWidget(mLabAscending, 0, 0);
18  mLayout->addWidget(mAscending, 0, 1);
19 
20  setLayout(mLayout);
21 
23  }
24 
27  {
28  auto lutc = gate->get_component_as<LUTComponent>([](const GateTypeComponent* c) { return LUTComponent::is_class_of(c); });
29 
30  if(lutc != nullptr) mAscending->setChecked(lutc->is_init_ascending());
31  }
32 
33  }
34 }
bool has_component_of_type(const GateTypeComponent::ComponentType type) const
Definition: gate_type.cpp:54
T * get_component_as(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
Definition: gate_type.h:89
static bool is_class_of(const GateTypeComponent *component)
void setData(GateType *gate)
LUTWizardPage(QWidget *parent=nullptr)
void setChecked(bool)
void stateChanged(int state)
void addWidget(QWidget *widget, int row, int column, Qt::Alignment alignment)
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setLayout(QLayout *layout)
void completeChanged()
void setSubTitle(const QString &subTitle)
void setTitle(const QString &title)