-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFormExcitation.cpp
More file actions
33 lines (22 loc) · 863 Bytes
/
FormExcitation.cpp
File metadata and controls
33 lines (22 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#include "FormExcitation.h"
FormExcitation::FormExcitation(Excitation *excitation, QWidget *parent) :
QWidget(parent)
{
this->excitation=excitation;
QVBoxLayout * layoutPrincipal = new QVBoxLayout();
QGroupBox * group = new QGroupBox("Excitation");
QFormLayout * layout = new QFormLayout;
amplitudeWidget = new QDoubleSpinBox();
layout->addRow("Amplitude Vo:",amplitudeWidget);
connect(amplitudeWidget,SIGNAL(valueChanged(double)),excitation,SLOT(SetAmplitudeV0(double)));
layout->setAlignment(Qt::AlignTop);
group->setLayout(layout);
layoutPrincipal->addWidget(group);
setLayout(layoutPrincipal);
init();
}
void FormExcitation::init()
{
amplitudeWidget->setValue(excitation->GetAmplitudeV0());
connect(amplitudeWidget,SIGNAL(valueChanged(double)),excitation,SLOT(SetAmplitudeV0(double)));
}