-
Notifications
You must be signed in to change notification settings - Fork 0
/
CloudProviderAccountSetup.cpp
80 lines (76 loc) · 2.24 KB
/
CloudProviderAccountSetup.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
#include"CloudProviderAccountSetup.h"
#include<QDebug>
CloudProviderAccountSetup::CloudProviderAccountSetup()
{
setupUi(this);
cloudProviderComboBox->addItem("ec2-ap-northeast-1");
cloudProviderComboBox->addItem("mock");
cloudProviderComboBox->addItem("ec2-us-east-1");
cloudProviderComboBox->addItem("ec2-ap-southeast-1");
cloudProviderComboBox->addItem("ec2-us-west-2");
cloudProviderComboBox->addItem("ec2-eu-west-1");
cloudProviderComboBox->addItem("ec2-us-west-1");
this->setWindowTitle("Cloud Provider Account Setup");
connections();
}
void CloudProviderAccountSetup::connections()
{
connect(nextPushButton,SIGNAL(clicked()),this,SLOT(showNext()));
connect(backPushButton,SIGNAL(clicked()),this,SLOT(back()));
connect(editProvidersPushButton,SIGNAL(clicked()),this,SLOT(showEditCloudProvider()));
connect(addProvidersPushButton,SIGNAL(clicked()),this,SLOT(showNewCloudProvider()));
connect(deleteProviderPushButton,SIGNAL(clicked()),this,SLOT(showDeleteProvider()));
connect(listProvidersPushButton,SIGNAL(clicked()),this,SLOT(showListProvider()));
}
void CloudProviderAccountSetup::showNext()
{
selectedCloudProvider=cloudProviderComboBox->currentText();
QString mock="mock";
qDebug()<<"its here now";
bool equivalent= (mock==selectedCloudProvider);
qDebug()<<equivalent;
if(equivalent)
{
MockCloudProvider *mockObject=new MockCloudProvider;
qDebug()<<"its in mock";
this->close();
mockObject->show();
}
else
{
OtherCloudProvider *otherObject=new OtherCloudProvider;
qDebug()<<"not in mock";
this->close();
otherObject->show();
}
}
void CloudProviderAccountSetup::back()
{
LoggedInDialog *object=new LoggedInDialog;
this->close();
object->show();
}
void CloudProviderAccountSetup::showEditCloudProvider()
{
EditCloudProviders *object=new EditCloudProviders;
this->close();
object->show();
}
void CloudProviderAccountSetup::showNewCloudProvider()
{
NewCloudProviders *object=new NewCloudProviders;
this->close();
object->show();
}
void CloudProviderAccountSetup::showDeleteProvider()
{
DeleteProvider *object=new DeleteProvider;
this->close();
object->show();
}
void CloudProviderAccountSetup::showListProvider()
{
ListProviders *object=new ListProviders;
this->close();
object->show();
}