-
Notifications
You must be signed in to change notification settings - Fork 0
/
newprojectdialog.cpp
65 lines (55 loc) · 1.46 KB
/
newprojectdialog.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "newprojectdialog.h"
#include "ui_newprojectdialog.h"
NewProjectDialog::NewProjectDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::NewProjectDialog)
{
ui->setupUi(this);
m_Project.clear();
m_Customer.clear();
m_ProjectFolder.clear();
}
NewProjectDialog::~NewProjectDialog()
{
delete ui;
}
QString NewProjectDialog::project()
{
return m_Project;
}
QString NewProjectDialog::customer()
{
return m_Customer;
}
QString NewProjectDialog::projectFolder()
{
return m_ProjectFolder;
}
void NewProjectDialog::setProject(QString project)
{
m_Project=project;
}
void NewProjectDialog::setCustomer(QString customer)
{
m_Customer=customer;
}
void NewProjectDialog::setProjectFolder(QString projectFolder)
{
m_ProjectFolder=projectFolder;
}
void NewProjectDialog::on_pushButton_Create_clicked()
{
setProject(ui->lineEdit_Project->text());
setCustomer(ui->lineEdit_Customer->text());
setProjectFolder(ui->lineEdit_ProjectFolder->text());
qDebug() << "inside: NewProjectDialog::on_pushButton_Create_clicked";
accept();
}
void NewProjectDialog::on_pushButtonSelect_ProjectFolder_clicked()
{
QString dir = QFileDialog::getExistingDirectory(this, tr("Open Directory"),"",
QFileDialog::ShowDirsOnly
| QFileDialog::DontResolveSymlinks);
if (!dir.isEmpty())
ui->lineEdit_ProjectFolder->setText(dir);
}