-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDescriptionGeoWidget.cpp
More file actions
59 lines (42 loc) · 1.97 KB
/
DescriptionGeoWidget.cpp
File metadata and controls
59 lines (42 loc) · 1.97 KB
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
#include "DescriptionGeoWidget.h"
DescriptionGeoWidget::DescriptionGeoWidget(Data *data, QWidget *parent) :
ToolBoxWidget(data,parent)
{
QVBoxLayout * layout = new QVBoxLayout;
layout->setMargin(0);
FormMetallisation * formMetal = new FormMetallisation(new metallisation());
connect(formMetal,SIGNAL(elementValide(elementBase*)),this,SIGNAL(newMetalCreated(elementBase*)));
connect(formMetal,SIGNAL(elementValide(elementBase*)),formMetal,SLOT(reset()));
FormParallelepipede * formPara = new FormParallelepipede(new parallelepipede());
connect(formPara,SIGNAL(elementValide(elementBase*)),this,SIGNAL(newParaCreated(elementBase*)));
connect(formPara,SIGNAL(elementValide(elementBase*)),formPara,SLOT(reset()));
formVolCal = new FormVolumeCalcul(data->getVolumeCalcul());
formParoi = new FormParoi(data->getParoi());
layout->addWidget(formVolCal);
layout->addWidget(formParoi);
layout->addWidget(formMetal);
layout->addWidget(formPara);
QHBoxLayout * layoutAvance = new QHBoxLayout;
layoutAvance->addWidget(new QLabel("Element Localisé"));
QPushButton * boutonAvance = new QPushButton("+");
layoutAvance->addWidget(boutonAvance);
this->connect(boutonAvance, SIGNAL(clicked()), this, SLOT(openElementLocaliseWindows()));
QWidget * widgetAvance = new QWidget();
widgetAvance->setLayout(layoutAvance);
layout->addWidget(widgetAvance);
setLayout(layout);
init();
}
void DescriptionGeoWidget::openElementLocaliseWindows()
{
FormElementLocalise * win = new FormElementLocalise(new elementLocalise());
connect(win,SIGNAL(elementValide(elementBase*)),this,SIGNAL(newElemLocCreated(elementBase*)));
connect(win,SIGNAL(elementValide(elementBase*)),win,SLOT(reset()));
connect(win,SIGNAL(elementValide(elementBase*)),win,SLOT(accept()));
win->exec();
}
void DescriptionGeoWidget::init()
{
formVolCal->setVolumeCalcul(data->getVolumeCalcul());
formParoi->setParoi(data->getParoi());
}