-
Notifications
You must be signed in to change notification settings - Fork 0
/
entryitempage.cpp
53 lines (47 loc) · 1.4 KB
/
entryitempage.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
#include <QtGui>
#include <QFormLayout>
#include <QGroupBox>
#include <QScrollArea>
#include <QScrollBar>
#include "snowloadcountwiz.h"
#include "entryitempage.h"
EntryItemPage::EntryItemPage(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 Totals For:")));
passesRadio = new QRadioButton(tr("&Passes"));
ticketsRadio = new QRadioButton(tr("&Tickets"));
QGridLayout *myHboxLayout2 = new QGridLayout();
myHboxLayout2->addWidget(passesRadio);
myHboxLayout2->addWidget(ticketsRadio);
QGroupBox *countForItemTypeGroupBox = new QGroupBox(tr("Item Type"));
countForItemTypeGroupBox->setLayout(myHboxLayout2);
myVboxLayout3->addWidget(countForItemTypeGroupBox);
setLayout(myVboxLayout3);
}
int EntryItemPage::nextId() const
{
return SnowLoadCountWiz::Page_TruckTypeCount;
}
bool EntryItemPage::validatePage()
{
wizData->countForItemType = getCountForItemType();
return true;
}
QString EntryItemPage::getCountForItemType()
{
QString theCountForItemType;
if(passesRadio->isChecked())
{
theCountForItemType = "passes";
}
else if(ticketsRadio->isChecked())
{
theCountForItemType = "tickets";
}
return (theCountForItemType);
}