-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdialog.cpp
More file actions
41 lines (33 loc) · 696 Bytes
/
dialog.cpp
File metadata and controls
41 lines (33 loc) · 696 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
#include "dialog.h"
#include "ui_dialog.h"
Dialog::Dialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::Dialog)
{
ui->setupUi(this);
}
Dialog::~Dialog()
{
delete ui;
}
QString Dialog::GetHost()
{
return ui->host_line->text();
}
QString Dialog::GetPort()
{
return ui->port_line->text();
}
QString Dialog::GetPath()
{
return this->file_path;
}
bool Dialog::Legal()
{
return ui->path_line->text().size() > 0 && ui->host_line->text().size() > 0 && ui->path_line->text().size() > 0;
}
void Dialog::on_pushButton_clicked()
{
this->file_path = QFileDialog::getOpenFileName(this,"选择文件", "../", "*.vmx");
ui->path_line->setText(this->file_path);
}