source: s10k/Vago/soundWizard/soundpage3.cpp@ 1115

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

Vago 1.4

File size: 1.8 KB
RevLine 
[771]1#include "soundpage3.h"
2#include "ui_soundpage3.h"
3
4SoundPage3::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
30bool 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
[1093]36 if(Util::Validation::checkEmptySpaces(leContents)){
37 Util::Dialogs::showError("Please fill all fields first!");
[771]38 return false;
39 }
40
[1093]41 if(Util::Validation::checkIfDoubles(leContents)){
42 Util::Dialogs::showError("All fields must contains numbers!");
[771]43 return false;
44 }
45
46 return true;
47}
48
49SoundPage3::~SoundPage3()
50{
51 delete ui;
52}
Note: See TracBrowser for help on using the repository browser.