[1054] | 1 | #include "soundpage5.h"
|
---|
| 2 | #include "ui_soundpage5.h"
|
---|
| 3 |
|
---|
| 4 | SoundPage5::SoundPage5(QWidget *parent) :
|
---|
| 5 | QWizardPage(parent),
|
---|
| 6 | ui(new Ui::soundpage5)
|
---|
| 7 | {
|
---|
| 8 | ui->setupUi(this);
|
---|
| 9 |
|
---|
| 10 | //Register fields to be accessible in another pages
|
---|
| 11 | registerField("rbPriorityLowImp", ui->rbPriorityLow);
|
---|
| 12 | registerField("rbPriorityNormalImp", ui->rbPriorityNormal);
|
---|
| 13 | registerField("rbPriorityHighImp", ui->rbPriorityHigh);
|
---|
| 14 | registerField("rbPriorityHighestImp", ui->rbPriorityHighest);
|
---|
| 15 |
|
---|
| 16 | registerField("leMinVolumeDistanceImp", ui->leMinVolumeDistance);
|
---|
| 17 | registerField("leMaxVolumeDistanceImp", ui->leMaxVolumeDistance);
|
---|
| 18 | registerField("leMinAngleImp", ui->leMinAngle);
|
---|
| 19 | registerField("leMaxAngleImp", ui->leMaxAngle);
|
---|
| 20 | registerField("leMinAttenuationImp", ui->leMinAttenuation);
|
---|
| 21 | registerField("leImpactVelocityImp", ui->leImpactVelocity);
|
---|
| 22 | registerField("leMinOcclusionImp", ui->leMinOcclusion);
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 | bool SoundPage5::validatePage(){
|
---|
| 26 | QStringList leContents;
|
---|
| 27 | leContents << ui->leMinVolumeDistance->text() << ui->leMaxVolumeDistance->text() <<
|
---|
| 28 | ui->leMinAngle->text() << ui->leMaxAngle->text() << ui->leMinAttenuation->text() <<
|
---|
| 29 | ui->leImpactVelocity->text() << ui->leMinOcclusion->text();
|
---|
| 30 |
|
---|
[1093] | 31 | if(Util::Validation::checkEmptySpaces(leContents)){
|
---|
| 32 | Util::Dialogs::showError("Please fill all fields first!");
|
---|
[1054] | 33 | return false;
|
---|
| 34 | }
|
---|
| 35 |
|
---|
[1093] | 36 | if(Util::Validation::checkIfDoubles(leContents)){
|
---|
| 37 | Util::Dialogs::showError("All fields must contains numbers!");
|
---|
[1054] | 38 | return false;
|
---|
| 39 | }
|
---|
| 40 |
|
---|
| 41 | return true;
|
---|
| 42 | }
|
---|
| 43 |
|
---|
| 44 | SoundPage5::~SoundPage5()
|
---|
| 45 | {
|
---|
| 46 | delete ui;
|
---|
| 47 | }
|
---|