-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcreateprojectview.cpp
More file actions
110 lines (85 loc) · 2.32 KB
/
Copy pathcreateprojectview.cpp
File metadata and controls
110 lines (85 loc) · 2.32 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#include "createprojectview.h"
#include "ui_createprojectview.h"
#include "createprojectviewcontroller.h"
#include <QDebug>
#include <QMessageBox>
CreateProjectView::CreateProjectView(QWidget *parent) :
QDialog(parent),
ui(new Ui::CreateProjectView),
createProjectViewController(CreateProjectViewController::getInstance())
{
createProjectViewController->setView(this);
ui->setupUi(this);
}
CreateProjectView::~CreateProjectView()
{
delete ui;
}
const QString CreateProjectView::getProjectDescription()
{
aDescription = ui->projectDescriptionTextFeild->toPlainText();
QString desc = ui->projectDescriptionTextFeild->toPlainText();
return desc;
}
const QString CreateProjectView::getProjectTitle(){
aTitle = ui->projectNameTextFeild->text();
//vinisha
QString title =ui->projectNameTextFeild->text();
return title;
}
const int& CreateProjectView::getProjectTeamMin(){
aMin = ui->minTeamSizeTextFeild->text();
int b =aMin.toInt();
int& ref3=b;
return ref3;
}
const int& CreateProjectView::getProjectTeamMax()
{
aMax = ui->maxTeamSizeTextFeild->text();
int x = aMax.toInt();
int &ref4=x;
return ref4;
}
void CreateProjectView::on_buttonBox_accepted()
{
switch(createProjectViewController->saveProject())
{
case 1:
{
createProjectViewController->goToManageProjectView();
break;
}
case 3:
{
QMessageBox::warning(this, tr("Warning"),
tr("Wrong team size!"),
QMessageBox::Ok);
break;
}
case 2:
{
QMessageBox::warning(this, tr("Warning"),
tr("Please enter Project Name!"),
QMessageBox::Ok);
break;
}
default:
{
QMessageBox::warning(this, tr("Warning"),
tr("Project already exist!"),
QMessageBox::Ok);
break;
}
}
}
void CreateProjectView::accept()
{
}
void CreateProjectView::on_buttonBox_rejected()
{
createProjectViewController->goToManageProjectView();
}
void CreateProjectView::on_pushButton_clicked()
{
createProjectViewController->goToLoginDialog();
}