/
newbuildingwizard.cpp
65 lines (53 loc) · 1.29 KB
/
newbuildingwizard.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
#include "newbuildingwizard.h"
#include "ui_newbuildingwizard.h"
#include "generalwizardpage.h"
#include "specialwizardpage.h"
#include "omtwizardpage.h"
NewBuildingWizard::NewBuildingWizard(QWidget *parent) :
QWizard(parent),
ui(new Ui::NewBuildingWizard)
{
ui->setupUi(this);
setPage(GENERAL_PAGE, new GeneralWizardPage());
setPage(SPECIAL_PAGE, new SpecialWizardPage());
setPage(OMT_PAGE, new OMTWizardPage());
setStartId(GENERAL_PAGE);
}
NewBuildingWizard::~NewBuildingWizard()
{
delete ui;
}
bool NewBuildingWizard::IsExistingOMT()
{
return field("ExistingOMT").toBool();
}
bool NewBuildingWizard::IsNewOMT()
{
return field("NewOMT").toBool();
}
bool NewBuildingWizard::IsNewSpecial()
{
return field("NewSpecial").toBool();
}
QVector<bool> NewBuildingWizard::GetLayout()
{
if (field("NewSpecial").toBool())
{
return ((SpecialWizardPage*)page(SPECIAL_PAGE))->GetLayout();
}
QVector<bool> layout;
layout.fill(false, 9 * 9 * 21);
layout[0] = true;
return layout;
}
OvermapSpecialData NewBuildingWizard::GetSpecialData()
{
return ((SpecialWizardPage*)page(SPECIAL_PAGE))->GetData();
}
OMTData NewBuildingWizard::GetOMTData()
{
return ((OMTWizardPage*)page(OMT_PAGE))->GetOMTData();
}
void NewBuildingWizard::Finalize()
{
}