-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathcam_importmat.cpp
More file actions
64 lines (56 loc) · 1.56 KB
/
cam_importmat.cpp
File metadata and controls
64 lines (56 loc) · 1.56 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
60
61
62
63
64
/*
************************************
*** @Xu Xu
*** @2017.05.10
*** @NanJing,China
*** @Hananiahhsu@live.cn
************************************
*/
#include "cam_importmat.h"
#include "ui_cam_importmat.h"
#include "camexpert.h"//???
#include <QCloseEvent>
#include "FileIO/cam_fileio.h"
CAM_ImportMat::CAM_ImportMat(QWidget *parent) :
/*QDialog(parent),*/
QFileDialog(parent),
ui(new Ui::CAM_ImportMat)
{
ui->setupUi(this);
connect(ui->buttonBox,SIGNAL(clicked()),this,SLOT(on_buttonBox_clicked()));
connect(this,SIGNAL(filesSelected(QStringList)),this,SLOT(on_FilesSelected()));
connect(this,SIGNAL(destroyed(QObject *)),this,SLOT(on_destroyed()));
}
CAM_ImportMat::~CAM_ImportMat()
{
delete ui;
}
void CAM_ImportMat::closeEvent(QCloseEvent *event)
{
event->accept();
emit CAM_ImportMat_Close_Signal(dxf_list);
}
//==============================================================//
//**Slots
//**
//==============================================================//
//press the OKAY or Cancel,emit the signal too(this 2 buttons are disabled-2017/05/26)
void CAM_ImportMat::on_buttonBox_clicked(QAbstractButton *button)
{
emit CAM_ImportMat_Close_Signal(dxf_list);
}
void CAM_ImportMat::on_FilesSelected()
{
//choose the dxf file
dxf_list = this->selectedFiles();
//Just for test here
if(dxf_list.size() > 0)
{
dxf_name = dxf_list[0];
}
}
//Failed to emit-17.05.26
void CAM_ImportMat::on_destroyed()
{
emit CAM_ImportMat_Close_Signal(dxf_list);
}