-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsiteinfopage.cpp
70 lines (65 loc) · 1.88 KB
/
siteinfopage.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
#include <QtGui>
#include <QFormLayout>
#include <QGroupBox>
#include <QScrollArea>
#include <QScrollBar>
#include "snowloadcountwiz.h"
#include "siteinfopage.h"
SiteInfoPage::SiteInfoPage(QWidget *parent, WizData *tmpWizData) :
QWizardPage(parent)
{
wizData = tmpWizData;
setTitle(tr("Site Info"));
timeDisplayFormat = QString("HH:mm");
QVBoxLayout *myVboxLayout3 = new QVBoxLayout();
myVboxLayout3->addWidget(new QLabel(tr("Counting At Location:")));
conroyRadio = new QRadioButton(tr("&Conroy"));
michaelRadio = new QRadioButton(tr("&Micheal"));
strandherdRadio = new QRadioButton(tr("&Strandherd"));
innesRadio = new QRadioButton(tr("&Innes"));
clydeRadio = new QRadioButton(tr("Cl&yde"));
QGridLayout *myHboxLayout = new QGridLayout();
myHboxLayout->addWidget(conroyRadio, 0,0);
myHboxLayout->addWidget(michaelRadio, 0,1);
myHboxLayout->addWidget(strandherdRadio, 1,0);
myHboxLayout->addWidget(innesRadio, 1,1);
myHboxLayout->addWidget(clydeRadio, 2,0);
QGroupBox *locationGroupBox = new QGroupBox(tr("Location"));
locationGroupBox->setLayout(myHboxLayout);
myVboxLayout3->addWidget(locationGroupBox);
setLayout(myVboxLayout3);
}
int SiteInfoPage::nextId() const
{
return SnowLoadCountWiz::Page_EntryItem;
}
bool SiteInfoPage::validatePage()
{
wizData->countLocation = getLocationSelected();
return true;
}
QString SiteInfoPage::getLocationSelected()
{
QString theLocation;
if (conroyRadio->isChecked())
{
theLocation = "Conroy";
}
else if(michaelRadio->isChecked())
{
theLocation = "Michael";
}
else if(strandherdRadio->isChecked())
{
theLocation = "Strandherd";
}
else if(innesRadio->isChecked())
{
theLocation = "Innes";
}
else if(clydeRadio->isChecked())
{
theLocation = "Clyde";
}
return (theLocation);
}