-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFrmNewProject.cpp
More file actions
49 lines (41 loc) · 1.25 KB
/
FrmNewProject.cpp
File metadata and controls
49 lines (41 loc) · 1.25 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
/*
Written By Pradipna Nepal
www.pradsprojects.com
Copyright (C) 2013 Pradipna Nepal
Please read COPYING.txt included along with this source code for more detail.
If not included, see http://www.gnu.org/licenses/
*/
#include <QtGui>
#include <QFileDialog>
#include "FrmNewProject.h"
#include "ui_FrmNewProject.h"
FrmNewProject::FrmNewProject(QWidget *parent) :
QDialog(parent),
ui(new Ui::FrmNewProject)
{
ui->setupUi(this);
connect(ui->btnOk, SIGNAL(clicked()), this, SLOT(ok()));
connect(ui->btnCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(ui->btnBrowse, SIGNAL(clicked()), this, SLOT(browse()));
}
FrmNewProject::~FrmNewProject()
{
delete ui;
}
QString FrmNewProject::getProjectName() {
return projectName;
}
QString FrmNewProject::getProjectDirectory() {
return projectDirectory;
}
void FrmNewProject::ok() {
projectName = ui->txtProjectName->text();
projectDirectory = ui->txtProjectDirectory->text();
accept();
}
void FrmNewProject::browse() {
projectDirectory = QFileDialog::getExistingDirectory(this, "Project Directory");
if (projectDirectory != "") {
ui->txtProjectDirectory->setText(projectDirectory);
}
}