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

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

Vago 1.4

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