source: s10k/Vago/soundWizard/soundpage5.cpp@ 1150

Last change on this file since 1150 was 1093, checked in by s10k, 7 years ago

Vago 1.4

File size: 1.6 KB
Line 
1#include "soundpage5.h"
2#include "ui_soundpage5.h"
3
4SoundPage5::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
25bool 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
31 if(Util::Validation::checkEmptySpaces(leContents)){
32 Util::Dialogs::showError("Please fill all fields first!");
33 return false;
34 }
35
36 if(Util::Validation::checkIfDoubles(leContents)){
37 Util::Dialogs::showError("All fields must contains numbers!");
38 return false;
39 }
40
41 return true;
42}
43
44SoundPage5::~SoundPage5()
45{
46 delete ui;
47}
Note: See TracBrowser for help on using the repository browser.