1 | #include "soundpage4.h"
|
---|
2 | #include "ui_soundpage4.h"
|
---|
3 |
|
---|
4 | SoundPage4::SoundPage4(QWidget *parent) :
|
---|
5 | QWizardPage(parent),
|
---|
6 | ui(new Ui::soundpage4)
|
---|
7 | {
|
---|
8 | ui->setupUi(this);
|
---|
9 |
|
---|
10 | //Register fields to be accessible in another pages
|
---|
11 | registerField("leVolume", ui->leVolume);
|
---|
12 | registerField("leMinVolume", ui->leMinVolume);
|
---|
13 | registerField("leMaxVolume", ui->leMaxVolume);
|
---|
14 | registerField("lePitch", ui->lePitch);
|
---|
15 | registerField("leMinPitch", ui->leMinPitch);
|
---|
16 | registerField("leMaxPitch", ui->leMaxPitch);
|
---|
17 | registerField("leWeight", ui->leWeight);
|
---|
18 |
|
---|
19 | registerField("cbPreventRepeat", ui->cbPreventRepeat);
|
---|
20 |
|
---|
21 | registerField("rbStereo22", ui->rbStereo22);
|
---|
22 | registerField("rbMono22", ui->rbMono22);
|
---|
23 | registerField("rbMono44Pc", ui->rbMono44Pc);
|
---|
24 | }
|
---|
25 |
|
---|
26 | bool SoundPage4::validatePage(){
|
---|
27 | QStringList leContents;
|
---|
28 | leContents << ui->leVolume->text() << ui->leMinVolume->text() << ui->leMaxVolume->text()
|
---|
29 | << ui->lePitch->text() << ui->leMinPitch->text() << ui->leMaxPitch->text()
|
---|
30 | << ui->leWeight->text();
|
---|
31 |
|
---|
32 | if(Util::Validation::checkEmptySpaces(leContents)){
|
---|
33 | Util::Dialogs::showError("Please fill all fields first!");
|
---|
34 | return false;
|
---|
35 | }
|
---|
36 |
|
---|
37 | if(Util::Validation::checkIfDoubles(leContents)){
|
---|
38 | Util::Dialogs::showError("All fields must contains numbers!");
|
---|
39 | return false;
|
---|
40 | }
|
---|
41 |
|
---|
42 | return true;
|
---|
43 | }
|
---|
44 |
|
---|
45 | SoundPage4::~SoundPage4()
|
---|
46 | {
|
---|
47 | delete ui;
|
---|
48 | }
|
---|