--- Vago/trunk/Vago/packageWizard/packagepage4.cpp 2013/03/31 19:02:16 771 +++ s10k/Vago/packageWizard/packagepage4.cpp 2017/12/30 13:57:32 1093 @@ -7,7 +7,7 @@ PackagePage4::PackagePage4(QWidget *pare { ui->setupUi(this); this->setTitle("Package Files"); - this->setSubTitle("Add here the resources to the correspondent plataform for your package."); + this->setSubTitle("Add the resources to the corresponding platform for your package."); commonTable=ui->twCommon; windowsTable=ui->twWindows; @@ -30,6 +30,12 @@ PackagePage4::PackagePage4(QWidget *pare ui->tbWindowsMinus->setToolTip("Remove the selected Windows OS folders"); ui->tbMacMinus->setToolTip("Remove the selected Mac OS folders"); + ui->lbCommon->setText("Common"); // Don't use rich text in qtdesigner because it generates platform dependent code + ui->lbWindowsOnly->setText("Windows Only"); + ui->lbMacOnly->setText("Mac OS Only"); + + + connectSlots(); } @@ -62,18 +68,18 @@ void PackagePage4::on_pbSwitchFiles_clic void PackagePage4::addResourcesPackage(DropTableWidget *myTable, QStringList resources){ //Pre-processing (check if received only folders) - foreach(QString myFile, resources){ + for(const QString &myFile : resources){ if(!QDir(myFile).exists()){ - Util::showErrorPopUp("Only folders are allowed for this operation."); + Util::Dialogs::showError("Only folders are allowed for this operation."); return; } } QString type=ui->pbSwitchFiles->text().replace(" files",""); - foreach(QString currentFolder, resources){ + for(QString currentFolder: resources){ - currentFolder=Util::normalizePath(currentFolder); //normalize path + currentFolder=Util::FileSystem::normalizePath(currentFolder); //normalize path //Get actual number rows int twSize=myTable->rowCount(); @@ -82,7 +88,7 @@ void PackagePage4::addResourcesPackage(D myTable->setRowCount(twSize+1); //Add to table and list to - QTableWidgetItem *newFolder = new QTableWidgetItem(Util::cutName(currentFolder)); + QTableWidgetItem *newFolder = new QTableWidgetItem(Util::FileSystem::cutName(currentFolder)); QTableWidgetItem *newType = new QTableWidgetItem(type); QTableWidgetItem *newFullPath = new QTableWidgetItem(currentFolder); @@ -132,13 +138,13 @@ void PackagePage4::on_tbMacMinus_clicked void PackagePage4::addTableContents(DropTableWidget *myTable){ if(ui->pbSwitchFiles->text()==".oni files"){ - addResourcesPackage(myTable,Util::multipleDirDialog("Choose folders with .oni files...")); + addResourcesPackage(myTable,Util::Dialogs::multipleDirSelection("Choose folders with .oni files...")); } else if(ui->pbSwitchFiles->text()==".bsl files"){ - addResourcesPackage(myTable,Util::multipleDirDialog("Choose folders with .bsl files...")); + addResourcesPackage(myTable,Util::Dialogs::multipleDirSelection("Choose folders with .bsl files...")); } else{ - addResourcesPackage(myTable,Util::multipleDirDialog("Choose folders with .oni-patch files...")); + addResourcesPackage(myTable,Util::Dialogs::multipleDirSelection("Choose folders with .oni-patch files...")); } } @@ -146,11 +152,11 @@ void PackagePage4::removeTableContents(D int size = myTable->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; iremoveRow(myTable->selectionModel()->selectedRows().at(size-i-1).row()); } @@ -159,7 +165,7 @@ void PackagePage4::removeTableContents(D bool PackagePage4::validatePage(){ if(ui->twCommon->rowCount()==0 && ui->twWindows->rowCount()==0 && ui->twMac->rowCount()==0){ - Util::showErrorPopUp("You need to add some folders with resources first!"); + Util::Dialogs::showError("You need to add some folders with resources first!"); return false; }