1 | #include "soundpage3.h"
|
---|
2 | #include "ui_soundpage3.h"
|
---|
3 |
|
---|
4 | SoundPage3::SoundPage3(QWidget *parent) :
|
---|
5 | QWizardPage(parent),
|
---|
6 | ui(new Ui::soundpage3)
|
---|
7 | {
|
---|
8 | ui->setupUi(this);
|
---|
9 |
|
---|
10 | //Register fields to be accessible in another pages
|
---|
11 |
|
---|
12 | registerField("rbPriorityLow", ui->rbPriorityLow);
|
---|
13 | registerField("rbPriorityNormal", ui->rbPriorityNormal);
|
---|
14 | registerField("rbPriorityHigh", ui->rbPriorityHigh);
|
---|
15 | registerField("rbPriorityHighest", ui->rbPriorityHighest);
|
---|
16 | registerField("cbInterruptOnStop", ui->cbInterruptOnStop);
|
---|
17 |
|
---|
18 | registerField("cbPlayOnce", ui->cbPlayOnce);
|
---|
19 | registerField("cbCanPan", ui->cbCanPan);
|
---|
20 |
|
---|
21 | registerField("leSphereRadious", ui->leSphereRadious);
|
---|
22 | registerField("leMinElapsedTime", ui->leMinElapsedTime);
|
---|
23 | registerField("leMaxElapsedTime", ui->leMaxElapsedTime);
|
---|
24 | registerField("leMinVolumeDistance", ui->leMinVolumeDistance);
|
---|
25 | registerField("leMaxVolumeDistance", ui->leMaxVolumeDistance);
|
---|
26 | registerField("leMinOcclusion", ui->leMinOcclusion);
|
---|
27 | registerField("leTreshold", ui->leTreshold);
|
---|
28 | }
|
---|
29 |
|
---|
30 | bool SoundPage3::validatePage(){
|
---|
31 | QStringList leContents;
|
---|
32 | leContents << ui->leSphereRadious->text() << ui->leMinElapsedTime->text() << ui->leMaxElapsedTime->text()
|
---|
33 | << ui->leMinVolumeDistance->text() << ui->leMaxVolumeDistance->text() << ui->leMinOcclusion->text()
|
---|
34 | << ui->leTreshold->text();
|
---|
35 |
|
---|
36 | if(Util::checkEmptySpaces(leContents)){
|
---|
37 | Util::showErrorPopUp("Please fill all fields first!");
|
---|
38 | return false;
|
---|
39 | }
|
---|
40 |
|
---|
41 | if(Util::checkIfDoubles(leContents)){
|
---|
42 | Util::showErrorPopUp("All fields must contains numbers!");
|
---|
43 | return false;
|
---|
44 | }
|
---|
45 |
|
---|
46 | return true;
|
---|
47 | }
|
---|
48 |
|
---|
49 | SoundPage3::~SoundPage3()
|
---|
50 | {
|
---|
51 | delete ui;
|
---|
52 | }
|
---|