-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshapeinput.cpp
41 lines (35 loc) · 893 Bytes
/
shapeinput.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
#include "shapeinput.h"
#include "ui_shapeinput.h"
#include"crossSection.h"
shapeInput::shapeInput(QWidget *parent) :
QDialog(parent),
ui(new Ui::shapeInput)
{
ui->setupUi(this);
}
shapeInput::~shapeInput()
{
delete ui;
}
void shapeInput::on_OKpush_clicked()
{
double x=ui->XBox->value();
double y=ui->YBox->value();
double area=ui->areaBox->value();
double ix=ui->ixcBox->value()+area*y*y; //CAUTION!!!
double iy=ui->iycBox->value()+area*x*x; //CAUTION!!!
double ixy=ui->ixycBox->value()+area*x*y;
namedShp tempshp(x,
y,
area,
ix,
iy,
ixy,
ui->nameText->text());
emit dlgReturn(tempshp);
close();
}
void shapeInput::on_cancelButton_clicked()
{
close();
}