HAL
v4.5.0-83-g30c8f0afc
The Hardware Analyzer - a comprehensive reverse engineering and manipulation framework for gate-level netlists.
lut_wizardpage.cpp
Go to the documentation of this file.
1
#include "
gui/gatelibrary_management/gatelibrary_pages/lut_wizardpage.h
"
2
#include <
gui/gatelibrary_management/gatelibrary_wizard.h
>
3
#include "
hal_core/netlist/gate_library/gate_type_component/lut_component.h
"
4
5
namespace
hal
6
{
7
LUTWizardPage::LUTWizardPage
(
QWidget
* parent) :
QWizardPage
(parent)
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
22
connect
(mAscending, &
QCheckBox::stateChanged
,
this
, &
LUTWizardPage::completeChanged
);
23
}
24
25
void
LUTWizardPage::setData
(
GateType
*gate){
26
if
(gate !=
nullptr
&& gate->
has_component_of_type
(
GateTypeComponent::ComponentType::init
))
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
}
hal::GateTypeComponent
Definition:
gate_type_component.h:40
hal::GateTypeComponent::ComponentType::init
@ init
hal::GateType
Definition:
gate_type.h:52
hal::GateType::has_component_of_type
bool has_component_of_type(const GateTypeComponent::ComponentType type) const
Definition:
gate_type.cpp:54
hal::GateType::get_component_as
T * get_component_as(const std::function< bool(const GateTypeComponent *)> &filter=nullptr) const
Definition:
gate_type.h:89
hal::LUTComponent
Definition:
lut_component.h:36
hal::LUTComponent::is_class_of
static bool is_class_of(const GateTypeComponent *component)
Definition:
lut_component.cpp:14
hal::LUTWizardPage::setData
void setData(GateType *gate)
Definition:
lut_wizardpage.cpp:25
hal::LUTWizardPage::LUTWizardPage
LUTWizardPage(QWidget *parent=nullptr)
Definition:
lut_wizardpage.cpp:7
gatelibrary_wizard.h
lut_component.h
lut_wizardpage.h
hal
Definition:
defines.h:45
QAbstractButton::setChecked
void setChecked(bool)
QCheckBox
QCheckBox::stateChanged
void stateChanged(int state)
QGridLayout
QGridLayout::addWidget
void addWidget(QWidget *widget, int row, int column, Qt::Alignment alignment)
QLabel
QObject::connect
QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QWidget
QWidget::setLayout
void setLayout(QLayout *layout)
QWizardPage
QWizardPage::completeChanged
void completeChanged()
QWizardPage::setSubTitle
void setSubTitle(const QString &subTitle)
QWizardPage::setTitle
void setTitle(const QString &title)
plugins
gui
src
gatelibrary_management
gatelibrary_pages
lut_wizardpage.cpp
Generated by
1.9.1