--- s10k/Vago/preferences.cpp 2017/12/30 13:43:28 1092 +++ s10k/Vago/preferences.cpp 2017/12/30 13:57:32 1093 @@ -37,27 +37,27 @@ Preferences::~Preferences() // http://stackoverflow.com/questions/3261676/how-to-make-qdialogbuttonbox-not-close-its-parent-qdialog void Preferences::accept (){ QStringList options; - QRect screenRes = Util::getScreenResolution(); + QRect screenRes = Util::System::getScreenResolution(); options << ui->leAEfolder->text() << ui->leWorkspace->text() << ui->leWidth->text() << ui->leHeight->text(); - if(Util::checkEmptySpaces(options)){ - Util::showErrorPopUp("Setting not saved! There are empty settings."); + if(Util::Validation::checkEmptySpaces(options)){ + Util::Dialogs::showError("Setting not saved! There are empty settings."); return; } - if(Util::checkIfIntegers(QStringList() << ui->leWidth->text() << ui->leHeight->text() )){ - Util::showErrorPopUp("Setting not saved! Width and Height must be numbers."); + if(Util::Validation::checkIfIntegers(QStringList() << ui->leWidth->text() << ui->leHeight->text() )){ + Util::Dialogs::showError("Setting not saved! Width and Height must be numbers."); return; } if(ui->leWidth->text().toInt() > screenRes.width() || ui->leHeight->text().toInt() > screenRes.height()){ - Util::showErrorPopUp("Setting not saved! Width or Height specified are greater than actual screen resolution."); + Util::Dialogs::showError("Setting not saved! Width or Height specified are greater than actual screen resolution."); return; } if(ui->leWidth->text().toInt() <= 0 || ui->leHeight->text().toInt() <= 0 ){ - Util::showErrorPopUp("Settings not saved! Width and Height must be greater than 0."); + Util::Dialogs::showError("Settings not saved! Width and Height must be greater than 0."); return; } @@ -73,7 +73,7 @@ void Preferences::accept (){ this->vagoSettings->setValue("useYesAsDefaultWhenRemovingItems",ui->cbUseYesAsDefaultWhenRemovingItems->isChecked()); #endif - Util::showPopUp("You need to restart the application to all changes take effect."); + Util::Dialogs::showInfo("You need to restart the application to all changes take effect."); QDialog::accept(); } @@ -81,7 +81,7 @@ void Preferences::accept (){ void Preferences::on_pbChooseWorkspace_clicked() { QString newDir=QFileDialog::getExistingDirectory(this,"Choose workspace folder..."); - newDir=Util::normalizePath(newDir); + newDir=Util::FileSystem::normalizePath(newDir); if(!newDir.isEmpty()){ ui->leWorkspace->setText(newDir); @@ -91,7 +91,7 @@ void Preferences::on_pbChooseWorkspace_c void Preferences::on_pbChooseAE_clicked() { QString newDir=QFileDialog::getExistingDirectory(this,"Choose AE folder..."); - newDir=Util::normalizePath(newDir); + newDir=Util::FileSystem::normalizePath(newDir); if(!newDir.isEmpty()){ ui->leAEfolder->setText(newDir);