-
Notifications
You must be signed in to change notification settings - Fork 0
/
FormChampLointain.cpp
83 lines (56 loc) · 3.34 KB
/
FormChampLointain.cpp
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#include "FormChampLointain.h"
FormChampLointain::FormChampLointain(champLointain *champ, QWidget *parent) :
QWidget(parent)
{
this->champ=champ;
QVBoxLayout * layoutPrincipal = new QVBoxLayout();
QGroupBox * group = new QGroupBox("Calcul Champs Lointain");
QFormLayout * layout = new QFormLayout;
origineRepereWidget = new FormCoordonnees(champ->GetOrigineRepere());
layout->addRow("Origine Repère:",origineRepereWidget);
connect(origineRepereWidget,SIGNAL(coordonneeChanged(coordonnee)),champ,SLOT(SetOrigineRepere(coordonnee)));
frequenceMinWidget = new QDoubleSpinBox();
layout->addRow("Fréquence Min:",frequenceMinWidget);
connect(frequenceMinWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetFrequenceMin(double)));
frequenceMaxWidget = new QDoubleSpinBox();
layout->addRow("Fréquence Max:",frequenceMaxWidget);
connect(frequenceMaxWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetFrequenceMax(double)));
frequencePasWidget = new QDoubleSpinBox();
layout->addRow("Pas Fréquence:",frequencePasWidget);
connect(frequencePasWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetPasFrequence(double)));
calculImageWidget = new QCheckBox();
layout->addRow("Calcul Image:",calculImageWidget);
connect(calculImageWidget,SIGNAL(clicked(bool)),champ,SLOT(SetCalculImage(bool)));
hauteurPlanMasseWidget = new QSpinBox();
layout->addRow("Hauteur plan masse:",hauteurPlanMasseWidget);
connect(hauteurPlanMasseWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetHauteurPlanMasse(int)));
pasDiscrTetaWidget = new QSpinBox();
layout->addRow("Pas Discr Teta:",pasDiscrTetaWidget);
connect(pasDiscrTetaWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetPasDiscrTeta(int)));
pasDiscrPhiWidget = new QSpinBox();
layout->addRow("Pas Discr Phi:",pasDiscrPhiWidget);
connect(pasDiscrPhiWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetPasDiscrPhi(int)));
layout->setAlignment(Qt::AlignTop);
group->setLayout(layout);
layoutPrincipal->addWidget(group);
setLayout(layoutPrincipal);
}
void FormChampLointain::init()
{
origineRepereWidget->setCoordonnee(champ->GetOrigineRepere());
connect(origineRepereWidget,SIGNAL(coordonneeChanged(coordonnee)),champ,SLOT(SetOrigineRepere(coordonnee)));
frequenceMinWidget->setValue(champ->GetFrequenceMin());
connect(frequenceMinWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetFrequenceMin(double)));
frequenceMaxWidget->setValue(champ->GetFrequenceMax());
connect(frequenceMaxWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetFrequenceMax(double)));
frequencePasWidget->setValue(champ->GetPasFrequence());
connect(frequencePasWidget,SIGNAL(valueChanged(double)),champ,SLOT(SetPasFrequence(double)));
calculImageWidget->setChecked(champ->IsCalculImage());
connect(calculImageWidget,SIGNAL(clicked(bool)),champ,SLOT(SetCalculImage(bool)));
hauteurPlanMasseWidget->setValue(champ->GetHauteurPlanMasse());
connect(hauteurPlanMasseWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetHauteurPlanMasse(int)));
pasDiscrPhiWidget->setValue(champ->GetPasDiscrPhi());
connect(pasDiscrTetaWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetPasDiscrTeta(int)));
pasDiscrTetaWidget->setValue(champ->GetPasDiscrTeta());
connect(pasDiscrPhiWidget,SIGNAL(valueChanged(int)),champ,SLOT(SetPasDiscrPhi(int)));
}