--- Vago/trunk/Vago/soundWizard/soundpage2.cpp 2013/04/07 15:36:17 801 +++ s10k/Vago/soundWizard/soundpage2.cpp 2017/12/30 13:57:32 1093 @@ -54,11 +54,11 @@ void SoundPage2::on_tbRemoveFiles_clicke int size = ui->twSoundFiles->selectionModel()->selectedRows().size(); if(size==0){ - Util::showPopUp("Select a row first."); + Util::Dialogs::showInfo("Select a row first."); return; } - if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?")){ + if(Util::Dialogs::showQuestion(this,"Are you sure you want to delete the selected rows?")){ for(int i=0; itwSoundFiles->removeRow(ui->twSoundFiles->selectionModel()->selectedRows().at(size-i-1).row()); } @@ -70,14 +70,14 @@ void SoundPage2::addResourcesSounds(Drop bool fileExtValid=false; //Pre-processing (check if received only folders) - foreach(QString myFile, resources){ + for(const QString &myFile : resources){ QString currFileExt="."+QFileInfo(myFile).completeSuffix(); if(QDir(myFile).exists()){ - Util::showErrorPopUp("Only files are allowed for this operation."); + Util::Dialogs::showError("Only files are allowed for this operation."); return; } - foreach(QString vext, this->allowedFiles){ + for(QString vext : this->allowedFiles){ vext.remove("*"); if(currFileExt.endsWith(vext)){ fileExtValid=true; @@ -86,13 +86,13 @@ void SoundPage2::addResourcesSounds(Drop } if(!fileExtValid){ - Util::showErrorPopUp("Files must be in the follow formats:\n" + + Util::Dialogs::showError("Files must be in the follow formats:\n" + this->allowedFiles.join(" ")); return; } } - foreach(QString currentFile, resources){ + for(const QString ¤tFile : resources){ //Get actual number rows int twSize=myTable->rowCount(); @@ -102,7 +102,7 @@ void SoundPage2::addResourcesSounds(Drop //Add to table and list to QTableWidgetItem *newName = new QTableWidgetItem(QFileInfo(currentFile).baseName()); - QTableWidgetItem *newFileLocation = new QTableWidgetItem(Util::normalizePath(currentFile)); + QTableWidgetItem *newFileLocation = new QTableWidgetItem(Util::FileSystem::normalizePath(currentFile)); myTable->setItem(twSize,0,newName); myTable->setItem(twSize,1,newFileLocation); @@ -124,7 +124,7 @@ bool SoundPage2::validatePage(){ QStringList namesList; if(ui->twSoundFiles->rowCount()==0){ - Util::showErrorPopUp("You need to add some sound files first!"); + Util::Dialogs::showError("You need to add some sound files first!"); return false; } @@ -132,13 +132,13 @@ bool SoundPage2::validatePage(){ namesList << ui->twSoundFiles->item(i,0)->text(); } - if(ui->rbOther->isChecked() && Util::checkEmptySpaces(QStringList() << ui->leOtherLocation->text())){ - Util::showErrorPopUp("Please input a directory to output the files."); + if(ui->rbOther->isChecked() && Util::Validation::checkEmptySpaces(QStringList() << ui->leOtherLocation->text())){ + Util::Dialogs::showError("Please input a directory to output the files."); return false; } if(ui->rbOther->isChecked() && !QDir(ui->leOtherLocation->text()).exists()){ - Util::showErrorPopUp("Invalid directory specified in other location. Please fix it."); + Util::Dialogs::showError("Invalid directory specified in other location. Please fix it."); return false; }