-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathshelfdialog.cpp
More file actions
57 lines (50 loc) · 998 Bytes
/
shelfdialog.cpp
File metadata and controls
57 lines (50 loc) · 998 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#include "shelfdialog.h"
#include "ui_shelfdialog.h"
shelfdialog::shelfdialog(QGraphicsRectItem *curItem ,QWidget *parent) :
QDialog(parent),
ui(new Ui::shelfdialog)
{
ui->setupUi(this);
now.figure=curItem;
}
shelfdialog::~shelfdialog(){
delete ui;
}
void shelfdialog::accept()
{
onAccepted();
QDialog::accept();
}
void shelfdialog::onAccepted()
{
now.name=ui->nameEdit->text();
now.y=ui->xEdit->text().toInt();
now.z=ui->yEdit->text().toInt();
switch (ui->typeBox->currentIndex()){
case (0):
now.x=0;
now.thin=2;
break;
case (1):
now.x=2;
now.thin=2;
break;
case (2):
now.x=0;
now.thin=1;
break;
case (3):
now.x=1;
now.thin=1;
break;
case (4):
now.x=2;
now.thin=1;
break;
case (5):
now.x=3;
now.thin=1;
break;
}
now.description=ui->desEdit->document()->toPlainText();
}