- Timestamp:
- Jan 8, 2014, 12:32:55 PM (11 years ago)
- Location:
- Vago/trunk/Vago
- Files:
-
- 1 added
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
Vago/trunk/Vago/about.cpp
r790 r897 20 20 "Samer/Mukade/EdT for allow me to use Jubei as icon<br />" 21 21 "Alloc for AIE2 and support<br />" 22 "Paradox for Sound excel plugin and documentation<br />"22 "Paradox for Sound documentation and testing<br />" 23 23 "Wiki contributors for the documentation<br />" 24 24 "AE contributors<br />" -
Vago/trunk/Vago/about.ui
r790 r897 53 53 </property> 54 54 <property name="text"> 55 <string><html> 56 <b>Vago GUI</b> 57 <p style="font-size:small;"> 58 Written by s10k<br /><br/> 59 Thanks to:<br/> 60 Neo for OniSplit<br /> 61 EdT for testing, suggestions and icon<br /> 62 demos_kratos for original OniSplit GUI<br /> 63 Samer/Mukade/EdT for allow me to use Jubei as icon<br /> 64 Alloc for AIE2 and support<br /> 65 Paradox for Sound excel plugin and documentation<br /> 66 Wiki contributors for the documentation<br /> 67 AE contributors<br /> 68 and in general to all OniCentral Community<br /><br/> 69 Also thanks to: <br /> 70 StackOverflow Community<br /> 71 Fabrizio Angius for PKZIP 2.0 for zip handling<br /> 72 smashingmagazine for the folder icon :)<br /> 73 <center> 74 Visit us at:<br /> 75 <a href="http://oni.bungie.org"> 76 oni.bungie.org 77 </center> 78 </a> 79 </p> 80 </html></string> 55 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 56 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 57 p, li { white-space: pre-wrap; } 58 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 59 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Vago GUI</span><span style=" font-size:8pt;"> </span></p> 60 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Written by s10k<br /><br />Thanks to:<br />Edit in About.cpp<br /></span></p> 61 <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Visit us at:<br /></span><a href="http://oni.bungie.org"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">oni.bungie.org </span></a></p></body></html></string> 81 62 </property> 82 63 </widget> -
Vago/trunk/Vago/converter.cpp
r815 r897 10 10 void Converter::run() 11 11 { 12 QProcess *myProcess = new QProcess(); 12 this->processHasKilled=false; 13 this->myProcess = new QProcess(); 13 14 QString result = QString(); 14 15 QString errorMessage = ""; 15 16 int numErrors=0; 16 17 17 myProcess->setWorkingDirectory(this->AppDir); 18 myProcess->setWorkingDirectory(this->AppDir); // Set working directory (for work with AEI2/Mac OS) 18 19 19 20 if(this->myData->size()!=1){ … … 23 24 emit setupPB(0); //Intermitent bar, we don't have any estimation when the task is done 24 25 } 25 26 //myProcess->setProcessChannelMode(QProcess::MergedChannels); //we want both stdout and stderr27 26 28 27 for(int i=0; i<this->myData->size(); i++){ … … 37 36 38 37 commandToExec=commands.mid(currentIndex,(nextIndex-currentIndex)); 39 myProcess->start(GlobalVars::OniSplitExeName+" "+commandToExec); 40 myProcess->waitForFinished(-1); 41 result=myProcess->readAllStandardError(); 38 this->myProcess->start(GlobalVars::OniSplitExeName+" "+commandToExec); 39 this->myProcess->waitForFinished(-1); 40 41 if(this->processHasKilled){ // If the process has killed there's no need to proceed with reading output or process more commands 42 delete this->myProcess; //delete object and make pointer invalid 43 this->myData->clear(); //clean list 44 emit conversionAborted(); 45 return; 46 } 47 48 result=this->myProcess->readAllStandardError(); 42 49 43 50 if(!result.isEmpty()){ //if(!result.startsWith("Importing",Qt::CaseSensitive) && !result.startsWith("Importing",Qt::CaseSensitive)){ //case sensitive is faster … … 57 64 } 58 65 59 delete myProcess; //delete object and make pointer invalid66 delete this->myProcess; //delete object and make pointer invalid 60 67 this->myData->clear(); //clean list 61 68 … … 71 78 } 72 79 80 // Kill the process if requested 81 void Converter::terminateCurrProcess(){ 82 this->myProcess->kill(); 83 this->processHasKilled=true; 84 this->myLogger->writeString("Received signal to kill current OniSplit operation (user requested)."); 85 } -
Vago/trunk/Vago/converter.h
r815 r897 6 6 7 7 #include "logger.h" 8 #include "util.h"9 //#include <QDebug>10 8 11 9 class Converter : public QThread … … 18 16 Logger *myLogger; 19 17 QStringList *myData; 18 QProcess *myProcess; 19 bool processHasKilled; 20 20 21 21 protected: 22 22 void run(); //for thread 23 23 private slots: 24 void terminateCurrProcess(); 24 25 signals: 25 26 void setupPB(int numberTasks); 26 27 void taskDone(); 27 28 void resultConversion(QString result, int numErrors); 29 void conversionAborted(); 28 30 }; 29 31 -
Vago/trunk/Vago/mainwindow.cpp
r815 r897 58 58 iniChanged=true; 59 59 } 60 if(!this->vagoSettings->contains("WindowWidth")){ 61 this->vagoSettings->setValue("WindowWidth", GlobalVars::DefaultWindowWidth); 62 iniChanged=true; 63 } 64 if(!this->vagoSettings->contains("WindowHeight")){ 65 this->vagoSettings->setValue("WindowHeight", GlobalVars::DefaultWindowHeight); 66 iniChanged=true; 67 } 60 68 if(!this->vagoSettings->contains("OniWindow")){ 61 69 this->vagoSettings->setValue("OniWindow", true); … … 80 88 this->AeLocation=this->vagoSettings->value("AeFolder").toString(); 81 89 this->outputFolder=this->workspaceLocation; 90 this->startedWindowWidth=this->vagoSettings->value("WindowWidth").toInt(); 91 this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt(); 82 92 83 93 //Create our workspace if it doesn't exists yet … … 93 103 this->myBar->setMinimumWidth(150); 94 104 this->myBar->hide(); //hide while not being used 95 96 ui->statusBar->addPermanentWidget(myBar); //this adds automatically in right 105 ui->tbAbortConversion->hide(); //hide while not being used 106 107 ui->statusBar->addPermanentWidget(this->myBar); //this adds automatically in right 108 ui->statusBar->addPermanentWidget(ui->tbAbortConversion); 97 109 98 110 //Initialize list pointers … … 123 135 ui->actionWindows->setChecked(false); 124 136 ui->actionMac_Windows_demo->setChecked(true); 125 resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better126 // because the components on mac use more space137 // resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better 138 //// because the components on mac use more space 127 139 #else 128 resize(640,480);140 //resize(640,480); // windows stuff 129 141 #endif 142 143 resize(this->startedWindowWidth,this->startedWindowHeight); 130 144 131 145 connectSlots(); … … 135 149 mapCommands(); 136 150 137 updateItemsLoaded(ui->twSources General);151 updateItemsLoaded(ui->twSourcesXML); 138 152 139 153 this->myLogger->writeString("Application started."); … … 204 218 } 205 219 220 void MainWindow::on_tbAbortConversion_clicked() 221 { 222 if(Util::showQuestionPopUp(this,"Are you sure you want to abort the current conversion?")){ 223 emit terminateCurrProcess(); 224 } 225 } 226 206 227 void MainWindow::on_cbEnvMap_toggled(bool checked) 207 228 { … … 219 240 } 220 241 221 void MainWindow::on_cbCamera_toggled(bool checked) 222 { 223 if(checked){ 224 ui->cbGeometry->setChecked(false); 225 } 226 } 227 228 void MainWindow::on_cbGeometry_toggled(bool checked) 229 { 230 ui->leGeometryName->setEnabled(checked); 231 if(checked){ 232 ui->cbCamera->setChecked(false); 233 } 242 void MainWindow::on_cbSpecificFilesLevels_toggled(bool checked) 243 { 244 ui->leSpecificFilesLevels->setEnabled(checked); 234 245 } 235 246 … … 270 281 } 271 282 272 void MainWindow::on_pbAddSourceGeneral_clicked() 273 { 274 if(QString::compare(ui->cbFromGeneral->currentText(),"ONI",Qt::CaseSensitive)==0 && QString::compare(ui->cbToGeneral->currentText(),"DAT",Qt::CaseSensitive)==0){ //CaseSensitive is faster) 275 addFilesSource(ui->twSourcesGeneral,Util::multipleDirDialog("Choose folders with ONIs...")); 283 void MainWindow::on_pbAddSourceXML_clicked() 284 { 285 addFilesSource( ui->twSourcesXML,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 286 } 287 288 void MainWindow::on_pbAddSourceTextures_clicked() 289 { 290 addFilesSource( ui->twSourcesTextures, QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 291 } 292 293 void MainWindow::on_pbAddSourceObjects_clicked() 294 { 295 addFilesSource( ui->twSourcesObjects,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 296 } 297 298 void MainWindow::on_pbAddSourceCharacters_clicked() 299 { 300 addFilesSource( ui->twSourcesCharacters,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 301 } 302 303 void MainWindow::on_pbAddSourceLevels_clicked() 304 { 305 if(QString::compare(ui->cbFromXML->currentText(),"ONI FILES",Qt::CaseSensitive)==0 && QString::compare(ui->cbToXML->currentText(),"DAT",Qt::CaseSensitive)==0){ //CaseSensitive is faster) 306 addFilesSource(ui->twSourcesLevels,Util::multipleDirDialog("Choose folders with ONIs...")); 276 307 } 277 308 else{ 278 addFilesSource( ui->twSourcesGeneral,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 279 } 280 } 281 282 void MainWindow::on_pbAddSourceTextures_clicked() 283 { 284 addFilesSource( ui->twSourcesTextures, QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 285 } 286 287 void MainWindow::on_pbAddSourceModels_clicked() 288 { 289 addFilesSource( ui->twSourcesModels,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 290 } 291 292 void MainWindow::on_pbAddSourceAnimations_clicked() 293 { 294 addFilesSource( ui->twSourcesAnimations,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 295 } 296 297 void MainWindow::on_pbAddSourceLevels_clicked() 298 { 299 addFilesSource( ui->twSourcesLevels,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 309 addFilesSource(ui->twSourcesLevels,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)")); 310 } 300 311 } 301 312 … … 329 340 330 341 //Pre-processing (check if the files/folders received are valid), e.g. check for ONI->DAT if are only given folders and not files 331 if( QString::compare(from,"ONI",Qt::CaseSensitive)==0 && QString::compare(to,"DAT",Qt::CaseSensitive)==0){342 if(from=="ONI FILES" && to=="DAT"){ 332 343 //check if it's a folder 333 344 foreach(QString myFile, files){ … … 381 392 } 382 393 383 QString MainWindow::fileParsing General(QString myOutputFolder, QString from, QString to , QString file){394 QString MainWindow::fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){ 384 395 385 396 QString command; 386 397 387 if(QString::compare(from,"ONI",Qt::CaseSensitive)==0 && QString::compare(to,"DAT",Qt::CaseSensitive)==0){ //CaseSensitive is faster 388 389 QString datName; 390 391 if(ui->cbDatGeneral->isChecked()){ 392 if(ui->leTargetDatGeneral->text().isEmpty()){ 393 showErrStatusMessage("Checkbox '"+ui->cbDatGeneral->text()+"' is selected. The name cannot be empty."); 394 return ""; 395 } 396 datName+=QString(myOutputFolder).insert(myOutputFolder.size()-1,ui->leTargetDatGeneral->text()); //set name inputted by user 397 if(!ui->leTargetDatGeneral->text().toUpper().endsWith(".DAT")){ 398 datName.insert(datName.size()-1,".dat"); //append extension if necessary (-1 to maintain final quote) 399 } 400 } 401 else{ 402 datName=QString(myOutputFolder).insert(myOutputFolder.size()-1,Util::cutName(file).remove("/")+".dat"); //if none iputted set the same name of input file 403 } 404 405 if(ui->actionWindows->isChecked()){ //is target plataform select windows? 406 return command=this->commandMap.value("general->"+from+"->"+to+"(PC)")+" "+ file + " "+datName; 407 } 408 else{ 409 return command=this->commandMap.value("general->"+from+"->"+to+"(demoPCMAC)")+" "+ file + " "+datName; 410 } 411 } 412 else if(QString::compare(from,"ONI",Qt::CaseSensitive)==0 && QString::compare(to,"XML",Qt::CaseSensitive)==0 && ui->cbTRAMGeneral->isChecked()){ 413 if(ui->leTRAMGeneral->text().isEmpty()){ 414 showErrStatusMessage("Checkbox '"+ui->cbTRAMGeneral->text()+"' is selected. The source cannot be empty."); 415 return ""; 416 } 417 return command=this->commandMap.value("general->"+from+"->"+to)+" "+myOutputFolder+" "+this->commandMap.value("general->"+ui->cbTRAMGeneral->text())+file + " "+ Util::normalizeAndQuote(ui->leTRAMGeneral->text()); 418 } 419 else{ 420 return command=this->commandMap.value("general->"+from+"->"+to)+" "+myOutputFolder+" "+file; 421 } 422 423 } 424 425 QString MainWindow::fileParsingTextures(QString myOutputFolder, QString from, QString to , QString file){ 426 427 QString command=this->commandMap.value("textures->"+from+"->"+to)+" "+myOutputFolder; 398 if(from=="ONI" && to=="XML"){ 399 return command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder+" "+file; 400 } 401 else if(from=="XML" && to=="ONI"){ 402 return command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder+" "+file; 403 } 404 405 return ""; 406 407 } 408 409 QString MainWindow::fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){ 410 411 QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder; 428 412 429 413 if(ui->gbTextures->isEnabled()){ //faster than compare strings (if is DAT/ONI) 430 414 431 415 if(ui->cbMipMapsTextures->isChecked()){ 432 command+=" "+this->commandMap.value( "textures->"+ui->cbMipMapsTextures->text());416 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbMipMapsTextures->text()); 433 417 } 434 418 435 419 if(ui->cbNoUwrap->isChecked()){ 436 command+=" "+this->commandMap.value( "textures->"+ui->cbNoUwrap->text());420 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbNoUwrap->text()); 437 421 } 438 422 439 423 if(ui->cbNoVwrap->isChecked()){ 440 command+=" "+this->commandMap.value( "textures->"+ui->cbNoVwrap->text());424 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbNoVwrap->text()); 441 425 } 442 426 443 427 if(ui->cbLarge->isChecked()){ 444 command+=" "+this->commandMap.value( "textures->"+ui->cbLarge->text());428 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbLarge->text()); 445 429 } 446 430 447 431 if(ui->rbBGR32->isChecked()){ 448 command+=" "+this->commandMap.value( "textures->"+ui->rbBGR32->text());432 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGR32->text()); 449 433 } 450 434 else if(ui->rbBGRA32->isChecked()){ 451 command+=" "+this->commandMap.value( "textures->"+ui->rbBGRA32->text());435 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA32->text()); 452 436 } 453 437 else if(ui->rbBGR555->isChecked()){ 454 command+=" "+this->commandMap.value( "textures->"+ui->rbBGR555->text());438 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGR555->text()); 455 439 } 456 440 else if(ui->rbBGRA5551->isChecked()){ 457 command+=" "+this->commandMap.value( "textures->"+ui->rbBGRA5551->text());441 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA5551->text()); 458 442 } 459 443 else if(ui->rbBGRA444->isChecked()){ 460 command+=" "+this->commandMap.value( "textures->"+ui->rbBGRA444->text());444 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA444->text()); 461 445 } 462 446 else{ //dxt1 checked 463 command+=" "+this->commandMap.value( "textures->"+ui->rbDxt1->text());447 command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbDxt1->text()); 464 448 } 465 449 … … 469 453 return ""; 470 454 } 471 command+=" "+this->commandMap.value( "textures->"+ui->cbEnvMap->text()) + ui->leEnvMapTexture->text().remove(".oni",Qt::CaseInsensitive);455 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbEnvMap->text()) + ui->leEnvMapTexture->text().remove(".oni",Qt::CaseInsensitive); 472 456 } 473 457 } … … 476 460 } 477 461 478 QString MainWindow::fileParsingModels(QString myOutputFolder, QString from, QString to , QString file){ 479 480 QString command=this->commandMap.value("models->"+from+"->"+to)+" "+myOutputFolder; 462 QString MainWindow::fileParsingCharacters(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){ 463 464 QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder + " " + file ; 465 466 467 if(ui->cbCellShading->isChecked()){ 468 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbCellShading->text()); 469 } 470 471 if(ui->cbNormals->isChecked()){ 472 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbNormals->text()); 473 } 474 475 if(ui->cbWithTRBS_ONCC->isChecked()){ 476 if(ui->leTRBS_ONCC->text().isEmpty()){ 477 showErrStatusMessage("Checkbox '"+ui->cbWithTRBS_ONCC->text()+"' is selected. The name cannot be empty."); 478 return ""; 479 } 480 481 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbWithTRBS_ONCC->text())+Util::normalizeAndQuote(ui->leTRBS_ONCC->text()); 482 } 483 484 return command; 485 } 486 487 488 QString MainWindow::fileParsingObjects(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){ 489 490 QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder; 481 491 482 492 //TODO: This can be optimized. When some are not enable others are. 483 493 if(ui->cbTexture->isChecked()){ 484 494 if(ui->leTextureName->text().isEmpty()){ 485 showErrStatusMessage("Checkbox '"+ui->cbTexture->text()+"' is selected. The name cannot be empty.");495 showErrStatusMessage("Checkbox '"+ui->cbTexture->text()+"' is selected. The file source cannot be empty."); 486 496 return ""; 487 497 } 488 command+=" "+this->commandMap.value("models->"+ui->cbTexture->text()) + ui->leTextureName->text().remove(".oni",Qt::CaseInsensitive); 489 } 490 491 if(ui->cbCellShading->isChecked()){ 492 command+=" "+this->commandMap.value("models->"+ui->cbCellShading->text()); 493 } 494 495 if(ui->cbNormals->isChecked()){ 496 command+=" "+this->commandMap.value("models->"+ui->cbNormals->text()); 497 } 498 499 if(ui->cbWithAnimation->isEnabled()){ 500 if(ui->cbWithAnimation->isChecked()){ 501 command+=" "+this->commandMap.value("models->"+ui->cbWithAnimation->text())+ui->leAnimationName->text().remove(".oni",Qt::CaseInsensitive); 502 } 503 else{ 504 command+=" "+this->commandMap.value("models->No Animation"); 505 } 506 } 507 498 command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbTexture->text()) + ui->leTextureName->text(); 499 } 500 else if(ui->cbWithAnimation->isChecked()){ 501 if(ui->leAnimationName->text().isEmpty()){ 502 showErrStatusMessage("Checkbox '"+ui->cbWithAnimation->text()+"' is selected. The file source cannot be empty."); 503 return ""; 504 } 505 command+=" "+Util::normalizeAndQuote(ui->leAnimationName->text()) + " " + this->commandMap.value(tabTitle+"->"+ui->cbWithAnimation->text()) + file; 506 return command; 507 } 508 509 if(from=="OBAN ONI (cam)"){ 510 command+=" -geom:camera"; 511 } 508 512 509 513 return command+=" "+file; //add source 510 514 } 511 515 512 QString MainWindow::fileParsingAnimations(QString myOutputFolder, QString from, QString to , QString file){ 513 514 QString command=this->commandMap.value("animations->"+from+"->"+to)+" "+myOutputFolder + " " + file ; 515 516 if(ui->cbCamera->isChecked()){ 517 command+=" "+this->commandMap.value("animations->"+ui->cbCamera->text()); 518 } 519 else if(ui->cbGeometry->isChecked()){ 520 if(ui->leGeometryName->text().isEmpty()){ 521 showErrStatusMessage("Checkbox '"+ui->cbGeometry->text()+"' is selected. The geometry file path cannot be empty."); 522 return ""; 523 } 524 command+=" "+this->commandMap.value("animations->"+ui->cbGeometry->text()) + (ui->leGeometryName->text().startsWith('"')?ui->leGeometryName->text():Util::insertQuotes(ui->leGeometryName->text())); 525 } 526 527 return command; 528 } 529 530 QString MainWindow::fileParsingLevels(QString myOutputFolder, QString from, QString to , QString file){ 516 QString MainWindow::fileParsingLevels(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){ 531 517 532 518 QString datName, command; 533 519 534 command=this->commandMap.value("levels->"+from+"->"+to)+" "+myOutputFolder+" "+file; 535 536 if(from=="MASTER XML" && to=="DAT"){ 537 command+=GlobalVars::OniSplitProcSeparator; //insert mark so we know this action will take 2 commands 538 520 if(!(from=="ONI FILES" && to=="DAT")){ // to all except this one 521 522 command=this->commandMap.value(tabTitle+"->"+from+"->"+to); 523 524 if(ui->cbSpecificFilesLevels->isChecked()){ 525 526 if(ui->leSpecificFilesLevels->text().isEmpty()){ 527 showErrStatusMessage("Checkbox '"+ui->cbSpecificFilesLevels->text()+"' is selected. The files pattern cannot be empty."); 528 return ""; 529 } 530 531 command+=":"+ui->leSpecificFilesLevels->text(); 532 } 533 command+=" "+myOutputFolder+" "+file; 534 535 } 536 537 if((from=="ONI FILES" || from=="MASTER XML") && to=="DAT"){ // almost the same command for both 539 538 QString datName; 539 540 if(from=="MASTER XML"){ 541 command+=GlobalVars::OniSplitProcSeparator; //insert mark so we know this action will take 2 commands 542 } 543 540 544 if(ui->cbDatLevels->isChecked()){ 541 545 if(ui->leTargetDatLevels->text().isEmpty()){ … … 549 553 } 550 554 else{ 551 datName=QString(myOutputFolder).insert(myOutputFolder.size()-1,Util::cutName(file).remove("/").replace(".xml",".dat",Qt::CaseInsensitive)); //if none iputted set the same name of input file 552 } 553 554 if(ui->actionWindows->isChecked()){ //is target plataform select windows? 555 command+=this->commandMap.value("general->ONI->"+to+"(PC)")+" "+myOutputFolder+" "+datName; //add second command 556 } 557 else{ 558 command+=this->commandMap.value("general->ONI->"+to+"(demoPCMAC)")+" "+myOutputFolder+" "+datName; //add second command 555 if(from=="ONI FILES"){ 556 datName=QString(myOutputFolder).insert(myOutputFolder.size()-1,Util::cutName(file).remove("/")+".dat"); //if none iputted set the same name of input file 557 } 558 else if(from=="MASTER XML"){ 559 datName=QString(myOutputFolder).insert(myOutputFolder.size()-1,Util::cutName(file).remove("/").replace(".xml",".dat",Qt::CaseInsensitive)); //if none iputted set the same name of input file 560 } 561 } 562 if(from=="ONI FILES"){ 563 if(ui->actionWindows->isChecked()){ //is target plataform select windows? 564 return command=this->commandMap.value(tabTitle+"->"+from+"->"+to+"(PC)")+" "+ file + " "+datName; 565 } 566 else{ 567 return command=this->commandMap.value(tabTitle+"->"+from+"->"+to+"(demoPCMAC)")+" "+ file + " "+datName; 568 } 569 } 570 else if(from=="MASTER XML"){ 571 if(ui->actionWindows->isChecked()){ //is target plataform select windows? 572 command+=this->commandMap.value(tabTitle+"->ONI FILES->"+to+"(PC)")+" "+myOutputFolder+" "+datName; //add second command 573 } 574 else{ 575 command+=this->commandMap.value(tabTitle+"->ONI FILES->"+to+"(demoPCMAC)")+" "+myOutputFolder+" "+datName; //add second command 576 } 559 577 } 560 578 } … … 582 600 //parse all files (separated by spaces) 583 601 while(true){ 584 nextIndex=additionalFiles.indexOf(" 602 nextIndex=additionalFiles.indexOf(";",currentIndex+1); 585 603 586 604 command += " "+Util::normalizeAndQuote(additionalFiles.mid(currentIndex,(nextIndex-currentIndex))); … … 594 612 595 613 if(ui->cbGridsLevels->isChecked()){ 596 command+=GlobalVars::OniSplitProcSeparator+this->commandMap.value( "levels->"+ui->cbGridsLevels->text())+" "+Util::normalizeAndQuote(ui->leBnvLevels->text())+" "+file+" -out:"+myOutputFolder;614 command+=GlobalVars::OniSplitProcSeparator+this->commandMap.value(tabTitle+"->"+ui->cbGridsLevels->text())+" "+Util::normalizeAndQuote(ui->leBnvLevels->text())+" "+file+" -out:"+myOutputFolder; 597 615 } 598 616 … … 623 641 } 624 642 625 void MainWindow::on_pbConvert General_clicked()626 { 627 startConversion(ui->twSources General);643 void MainWindow::on_pbConvertXML_clicked() 644 { 645 startConversion(ui->twSourcesXML); 628 646 } 629 647 … … 633 651 } 634 652 635 void MainWindow::on_pbConvert Models_clicked()636 { 637 startConversion(ui->twSources Models);638 } 639 640 void MainWindow::on_pbConvert Animations_clicked()641 { 642 startConversion(ui->twSources Animations);653 void MainWindow::on_pbConvertObjects_clicked() 654 { 655 startConversion(ui->twSourcesObjects); 656 } 657 658 void MainWindow::on_pbConvertCharacters_clicked() 659 { 660 startConversion(ui->twSourcesCharacters); 643 661 } 644 662 … … 668 686 } 669 687 670 if( myBar->isVisible()){688 if(this->myBar->isVisible()){ 671 689 Util::showErrorPopUp("Another conversion is progress. Please wait until it finishes."); 672 690 return; … … 687 705 this->myBar->show(); 688 706 this->myBar->setMaximum(max); 707 ui->tbAbortConversion->show(); 689 708 } 690 709 … … 696 715 QApplication::alert(this); //Show a notification if window is not active 697 716 this->myBar->hide(); 717 ui->tbAbortConversion->hide(); 698 718 699 719 if(numErrors!=0){ … … 714 734 } 715 735 736 void MainWindow::TconversionAborted(){ 737 this->myBar->hide(); 738 ui->tbAbortConversion->hide(); 739 740 showErrStatusMessage("Conversion was aborted."); 741 } 742 716 743 void MainWindow::showErrStatusMessage(QString message){ 717 744 … … 733 760 734 761 void MainWindow::mapCommands(){ 735 ////////////////////////////////////////////////////////////////////////General Commands 736 this->commandMap.insert("general->DAT->ONI","-export"); 737 //this->commandMap.insert("general->ONI->DAT","-import"); //Not used. 738 this->commandMap.insert("general->ONI->DAT(PC)","-import:nosep"); 739 this->commandMap.insert("general->ONI->DAT(demoPCMAC)","-import:sep"); 740 this->commandMap.insert("general->ONI->XML","-extract:xml"); 741 this->commandMap.insert("general->XML->ONI","-create"); 762 ////////////////////////////////////////////////////////////////////////XML Commands 763 this->commandMap.insert("xml->ONI->XML","-extract:xml"); 764 this->commandMap.insert("xml->XML->ONI","-create"); 742 765 //######################General Options 743 this->commandMap.insert("general->"+ui->cbTRAMGeneral->text(),"-anim-body:"); 766 744 767 //Possible Combinations 745 this->commandMap.insertMulti("general->DAT","ONI"); 746 this->commandMap.insertMulti("general->ONI","DAT"); 747 this->commandMap.insertMulti("general->ONI","XML"); 748 this->commandMap.insertMulti("general->XML","ONI"); 768 this->commandMap.insertMulti("xml->ONI","XML"); 769 this->commandMap.insertMulti("xml->XML","ONI"); 749 770 750 771 ////////////////////////////////////////////////////////////////////////Textures Commands 751 this->commandMap.insert("textures->DAT / ONI->DDS","-extract:dds");752 this->commandMap.insert("textures->DAT / ONI->TGA","-extract:tga");753 this->commandMap.insert("textures->DAT / ONI->PNG","-extract:png");754 this->commandMap.insert("textures->DAT / ONI->JPG","-extract:jpg");755 this->commandMap.insert("textures-> DDS / TGA / PNG / JPG->ONI","-create:txmp");772 this->commandMap.insert("textures->DAT / TXMP ONI->DDS","-extract:dds"); 773 this->commandMap.insert("textures->DAT / TXMP ONI->TGA","-extract:tga"); 774 this->commandMap.insert("textures->DAT / TXMP ONI->PNG","-extract:png"); 775 this->commandMap.insert("textures->DAT / TXMP ONI->JPG","-extract:jpg"); 776 this->commandMap.insert("textures->TGA / DDS / PNG / JPG->TXMP ONI","-create:txmp"); 756 777 //######################Textures Options 757 778 this->commandMap.insert("textures->"+ui->rbBGR32->text(),"-format:bgr32"); … … 767 788 this->commandMap.insert("textures->"+ui->cbEnvMap->text(),"-envmap:"); 768 789 //Possible Combinations 769 this->commandMap.insertMulti("textures->DAT / ONI","DDS");770 this->commandMap.insertMulti("textures->DAT / ONI","TGA");771 this->commandMap.insertMulti("textures->DAT / ONI","PNG");772 this->commandMap.insertMulti("textures->DAT / ONI","JPG");773 this->commandMap.insertMulti("textures-> DDS / TGA / PNG / JPG","ONI");774 775 //////////////////////////////////////////////////////////////////////// Models Commands776 this->commandMap.insert(" models->ONI->OBJ","-extract:obj");777 this->commandMap.insert(" models->ONI->DAE","-extract:dae -search "+Util::insertQuotes(this->AeLocation+"/GameDataFolder/level0_Final"));778 this->commandMap.insert(" models->OBJ->ONI","-create:m3gm");779 this->commandMap.insert(" models->DAE->ONI","-create:trbs");780 //######################Models Options781 this->commandMap.insert("models->"+ui->cbCellShading->text(),"-cel"); 782 this->commandMap.insert("models->"+ui->cbNormals->text(),"-normals");783 this->commandMap.insert(" models->"+ui->cbTexture->text(),"-tex:");784 this->commandMap.insert(" models->"+ui->cbWithAnimation->text(),"-anim:");785 this->commandMap.insert(" models->No Animation","-noanim"); //No label with this name so can't be dynamic790 this->commandMap.insertMulti("textures->DAT / TXMP ONI","TGA"); 791 this->commandMap.insertMulti("textures->DAT / TXMP ONI","DDS"); 792 this->commandMap.insertMulti("textures->DAT / TXMP ONI","PNG"); 793 this->commandMap.insertMulti("textures->DAT / TXMP ONI","JPG"); 794 this->commandMap.insertMulti("textures->TGA / DDS / PNG / JPG","TXMP ONI"); 795 796 ////////////////////////////////////////////////////////////////////////Characters Commands 797 this->commandMap.insert("characters->TRAM ONI->XML / XML & DAE","-extract:xml"); 798 this->commandMap.insert("characters->TRBS / ONCC ONI->DAE","-extract:dae"); 799 this->commandMap.insert("characters->TRBS XML->TRBS ONI","-create"); 800 this->commandMap.insert("characters->TRBS DAE->TRBS ONI","-create:trbs"); 801 this->commandMap.insert("characters->FILM DAT->XML","film2xml"); 802 803 //######################Characters Options 804 this->commandMap.insert("characters->"+ui->cbWithTRBS_ONCC->text(),"-anim-body:"); 805 this->commandMap.insert("characters->"+ui->cbCellShading->text(),"-cel"); 806 this->commandMap.insert("characters->"+ui->cbNormals->text(),"-normals"); 786 807 //Possible Combinations 787 this->commandMap.insertMulti("models->ONI","OBJ"); 788 this->commandMap.insertMulti("models->ONI","DAE"); 789 this->commandMap.insertMulti("models->OBJ","ONI"); 790 this->commandMap.insertMulti("models->DAE","ONI"); 791 792 ////////////////////////////////////////////////////////////////////////Animations Commands 793 this->commandMap.insert("animations->ONI->DAE","-extract:dae"); 794 this->commandMap.insert("animations->FILM DAT->XML","film2xml"); 795 //######################Animations Options 796 this->commandMap.insert("animations->"+ui->cbCamera->text(),"-geom:camera"); 797 this->commandMap.insert("animations->"+ui->cbGeometry->text(),"-geom:"); 808 this->commandMap.insertMulti("characters->TRAM ONI","XML / XML & DAE"); 809 this->commandMap.insertMulti("characters->TRBS / ONCC ONI","DAE"); 810 this->commandMap.insertMulti("characters->DAE","TRBS ONI"); 811 this->commandMap.insertMulti("characters->TRBS DAE","TRBS ONI"); 812 this->commandMap.insertMulti("characters->TRBS XML","TRBS ONI"); 813 this->commandMap.insertMulti("characters->FILM DAT","XML"); 814 815 ////////////////////////////////////////////////////////////////////////Objects Commands 816 this->commandMap.insert("objects->M3GM ONI->OBJ","-extract:obj"); 817 this->commandMap.insert("objects->M3GM ONI->DAE","-extract:dae"); 818 this->commandMap.insert("objects->ONWC ONI->OBJ","-extract:obj"); 819 this->commandMap.insert("objects->ONWC ONI->DAE","-extract:dae"); 820 this->commandMap.insert("objects->OBAN ONI (cam)->DAE","-extract:dae"); 821 this->commandMap.insert("objects->OBJ->M3GM ONI","-create:m3gm"); 822 //######################Characters Options 823 this->commandMap.insert("objects->"+ui->cbTexture->text(),"-tex:"); 824 this->commandMap.insert("objects->"+ui->cbWithAnimation->text(),"-geom:"); 798 825 //Possible Combinations 799 this->commandMap.insertMulti("animations->ONI","DAE"); 800 this->commandMap.insertMulti("animations->DAE","ONI"); 801 this->commandMap.insertMulti("animations->FILM DAT","XML"); 826 this->commandMap.insertMulti("objects->M3GM ONI","OBJ"); 827 this->commandMap.insertMulti("objects->M3GM ONI","DAE"); 828 this->commandMap.insertMulti("objects->ONWC ONI","OBJ"); 829 this->commandMap.insertMulti("objects->ONWC ONI","DAE"); 830 this->commandMap.insertMulti("objects->OBAN ONI (cam)","DAE"); 831 this->commandMap.insertMulti("objects->OBJ","M3GM ONI"); 832 802 833 803 834 ////////////////////////////////////////////////////////////////////////Levels Commands 804 this->commandMap.insert("levels->ONI->DAE","-extract:dae -search "+Util::insertQuotes(this->AeLocation+"/GameDataFolder/level0_Final")); 805 this->commandMap.insert("levels->DAE->ONI","-create:akev"); 835 this->commandMap.insert("levels->DAT->ONI FILES","-export"); 836 //this->commandMap.insert("levels->ONI FILES->DAT","-import"); //Not used. 837 this->commandMap.insert("levels->ONI FILES->DAT(PC)","-import:nosep"); 838 this->commandMap.insert("levels->ONI FILES->DAT(demoPCMAC)","-import:sep"); 839 this->commandMap.insert("levels->AKEV ONI->DAE","-extract:dae"); 840 this->commandMap.insert("levels->DAE->AKEV ONI","-create:akev"); 806 841 this->commandMap.insert("levels->MASTER XML->DAT","-create:level"); 807 842 this->commandMap.insert("levels->MASTER XML->ONI FILES","-create:level"); … … 809 844 this->commandMap.insert("levels->"+ui->cbGridsLevels->text(),"-grid:create"); 810 845 //Possible Combinations 811 this->commandMap.insertMulti("levels->ONI","DAE"); 812 this->commandMap.insertMulti("levels->DAE","ONI"); 846 this->commandMap.insertMulti("levels->DAT","ONI FILES"); 847 this->commandMap.insertMulti("levels->ONI FILES","DAT"); 848 this->commandMap.insertMulti("levels->AKEV ONI","DAE"); 849 this->commandMap.insertMulti("levels->DAE","AKEV ONI"); 813 850 this->commandMap.insertMulti("levels->MASTER XML","DAT"); 814 851 this->commandMap.insertMulti("levels->MASTER XML","ONI FILES"); 815 852 816 853 ////////////////////////////////////////////////////////////////////////Misc Commands 817 this->commandMap.insert("misc->DAT / ONI->WAV","-extract:wav");818 this->commandMap.insert("misc->DAT / ONI->AIF","-extract:aif");819 this->commandMap.insert("misc->DAT / ONI->TXT","-extract:txt");820 this->commandMap.insert("misc->WAV / AIF-> ONI","-create");821 this->commandMap.insert("misc->TXT-> ONI","-create:subt");854 this->commandMap.insert("misc->DAT / SNDD ONI->WAV","-extract:wav"); 855 this->commandMap.insert("misc->DAT / SNDD ONI->AIF","-extract:aif"); 856 this->commandMap.insert("misc->DAT / SUBT ONI->TXT","-extract:txt"); 857 this->commandMap.insert("misc->WAV / AIF->SNDD ONI","-create"); 858 this->commandMap.insert("misc->TXT->SUBT ONI","-create:subt"); 822 859 //Possible Combinations 823 this->commandMap.insertMulti("misc->DAT / ONI","WAV"); 824 this->commandMap.insertMulti("misc->DAT / ONI","AIF"); 825 this->commandMap.insertMulti("misc->DAT / ONI","TXT"); 826 this->commandMap.insertMulti("misc->WAV / AIF","ONI"); 827 this->commandMap.insertMulti("misc->TXT","ONI"); 828 829 } 830 831 void MainWindow::on_cbFromGeneral_currentIndexChanged(const QString &arg1) 832 { 833 updateComboBox(arg1, ui->cbToGeneral, "general"); 834 } 860 this->commandMap.insertMulti("misc->DAT / SNDD ONI","WAV"); 861 this->commandMap.insertMulti("misc->DAT / SNDD ONI","AIF"); 862 this->commandMap.insertMulti("misc->DAT / SUBT ONI","TXT"); 863 this->commandMap.insertMulti("misc->WAV / AIF","SNDD ONI"); 864 this->commandMap.insertMulti("misc->TXT","SUBT ONI"); 865 866 } 867 868 void MainWindow::on_cbFromXML_currentIndexChanged(const QString &arg1) 869 { 870 updateComboBox(arg1, ui->cbToXML); 871 } 872 835 873 836 874 void MainWindow::on_cbFromTextures_currentIndexChanged(const QString &arg1) … … 844 882 } 845 883 846 updateComboBox(arg1, ui->cbToTextures, "textures"); 847 } 848 849 void MainWindow::on_cbFromModels_currentIndexChanged(const QString &arg1) 850 { 851 884 updateComboBox(arg1, ui->cbToTextures); 885 } 886 887 void MainWindow::on_cbFromObjects_currentIndexChanged(const QString &arg1) 888 { 889 ui->cbTexture->setEnabled(false); 890 ui->cbTexture->setChecked(false); 891 ui->cbWithAnimation->setEnabled(false); 892 ui->cbWithAnimation->setChecked(false); 893 894 if(QString::compare(arg1,"M3GM ONI",Qt::CaseSensitive)==0){ //case sensitive is faster 895 ui->cbWithAnimation->setEnabled(true); 896 } 897 else if(QString::compare(arg1,"OBJ",Qt::CaseSensitive)==0){ 898 ui->cbTexture->setEnabled(true); 899 } 900 901 updateComboBox(arg1, ui->cbToObjects); 902 } 903 904 void MainWindow::on_cbFromCharacters_currentIndexChanged(const QString &arg1) 905 { 906 ui->cbWithTRBS_ONCC->setEnabled(false); 907 ui->cbWithTRBS_ONCC->setChecked(false); 852 908 ui->cbCellShading->setEnabled(false); 853 909 ui->cbCellShading->setChecked(false); 854 910 ui->cbNormals->setEnabled(false); 855 911 ui->cbNormals->setChecked(false); 856 ui->cbTexture->setEnabled(false); 857 ui->cbTexture->setChecked(false); 858 ui->cbWithAnimation->setEnabled(false); 859 ui->cbWithAnimation->setChecked(false); 860 861 if(QString::compare(arg1,"OBJ",Qt::CaseSensitive)==0){ //case sensitive is faster 862 ui->cbTexture->setEnabled(true); 863 } 864 else if(QString::compare(arg1,"DAE",Qt::CaseSensitive)==0){ 912 913 if(QString::compare(arg1,"TRAM ONI",Qt::CaseSensitive)==0){ //case sensitive is faster 914 ui->cbWithTRBS_ONCC->setEnabled(true); 915 } 916 else if(QString::compare(arg1,"TRBS DAE",Qt::CaseSensitive)==0){ 917 ui->cbNormals->setEnabled(true); 865 918 ui->cbCellShading->setEnabled(true); 866 ui->cbNormals->setEnabled(true); 867 } 868 869 updateComboBox(arg1, ui->cbToModels, "models"); 870 } 871 872 void MainWindow::on_cbFromAnimations_currentIndexChanged(const QString &arg1) 873 { 874 ui->cbCamera->setEnabled(false); 875 ui->cbCamera->setChecked(false); 876 ui->cbGeometry->setEnabled(false); 877 ui->cbGeometry->setChecked(false); 878 879 if(QString::compare(arg1,"ONI",Qt::CaseSensitive)==0){ //case sensitive is faster 880 ui->cbCamera->setEnabled(true); 881 ui->cbGeometry->setEnabled(true); 882 } 883 884 updateComboBox(arg1, ui->cbToAnimations, "animations"); 919 } 920 921 updateComboBox(arg1, ui->cbToCharacters); 885 922 } 886 923 887 924 void MainWindow::on_cbFromLevels_currentIndexChanged(const QString &arg1) 888 925 { 889 updateComboBox(arg1, ui->cbToLevels, "levels"); 890 } 891 892 void MainWindow::on_cbFromMisc_currentIndexChanged(const QString &arg1) 893 { 894 updateComboBox(arg1, ui->cbToMisc, "misc"); 895 } 896 897 void MainWindow::updateComboBox(const QString &arg1, QComboBox *comboBox, const QString &identifier){ 898 comboBox->clear(); 899 900 QStringList toUpdate=QStringList(); 901 902 QStringList values=commandMap.values(identifier+"->"+arg1); 903 904 for (int i = values.size()-1; i >= 0; i--){ //By defaut MultiItems have the inversed order (http://qt-project.org/doc/qt-4.8/qhash.html#insertMulti) 905 toUpdate << values.at(i); 906 } 907 908 comboBox->addItems(toUpdate); 909 } 910 911 912 void MainWindow::on_actionWindows_triggered() 913 { 914 ui->actionWindows->setChecked(true); 915 ui->actionMac_Windows_demo->setChecked(false); 916 } 917 918 void MainWindow::on_actionMac_Windows_demo_triggered() 919 { 920 ui->actionMac_Windows_demo->setChecked(true); 921 ui->actionWindows->setChecked(false); 922 } 923 924 void MainWindow::on_pbRemoveSourceGeneral_clicked() 925 { 926 removeTableContents( ui->twSourcesGeneral); 927 } 928 929 void MainWindow::on_pbRemoveSourceTextures_clicked() 930 { 931 removeTableContents(ui->twSourcesTextures); 932 } 933 934 void MainWindow::on_pbRemoveSourceModels_clicked() 935 { 936 removeTableContents(ui->twSourcesModels); 937 } 938 939 void MainWindow::on_pbRemoveSourceAnimations_clicked() 940 { 941 removeTableContents(ui->twSourcesAnimations); 942 } 943 944 void MainWindow::on_pbRemoveSourceLevels_clicked() 945 { 946 removeTableContents(ui->twSourcesLevels); 947 } 948 949 void MainWindow::on_pbRemoveSourceMisc_clicked() 950 { 951 removeTableContents(ui->twSourcesMisc); 952 } 953 954 void MainWindow::on_pbClearSourcesGeneral_clicked() 955 { 956 clearTableContents(ui->twSourcesGeneral); 957 } 958 959 void MainWindow::on_pbClearSourcesTextures_clicked() 960 { 961 clearTableContents(ui->twSourcesTextures); 962 } 963 964 void MainWindow::on_pbClearSourcesModels_clicked() 965 { 966 clearTableContents(ui->twSourcesModels); 967 } 968 969 void MainWindow::on_pbClearSourcesAnimations_clicked() 970 { 971 clearTableContents(ui->twSourcesAnimations); 972 } 973 974 void MainWindow::on_pbClearSourcesLevels_clicked() 975 { 976 clearTableContents(ui->twSourcesLevels); 977 } 978 979 void MainWindow::on_pbClearSourcesMisc_clicked() 980 { 981 clearTableContents(ui->twSourcesMisc); 982 } 983 984 void MainWindow::removeTableContents(DropTableWidget *myTable){ 985 int size = myTable->selectionModel()->selectedRows().size(); 986 987 if(size==0){ 988 Util::showPopUp("Select a row first."); 989 return; 990 } 991 992 if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?")){ 993 for(int i=0; i<size; i++){ 994 //myTable->removeRow(myTable->selectedItems().at(size-i-1)->row()); 995 myTable->removeRow(myTable->selectionModel()->selectedRows().at(size-i-1).row()); 996 } 997 updateItemsLoaded(myTable); 998 } 999 } 1000 1001 void MainWindow::clearTableContents(DropTableWidget *myTable){ 1002 if(myTable->rowCount()==0){ 1003 Util::showPopUp("Nothing to clear."); 1004 return; 1005 } 1006 1007 if(Util::showQuestionPopUp(this,"Are you sure you want to clear the content?")){ 1008 myTable->clearContents(); 1009 myTable->setRowCount(0); 1010 } 1011 updateItemsLoaded(myTable); 1012 } 1013 1014 1015 void MainWindow::on_actionPreferences_triggered() 1016 { 1017 //Show preferences 1018 Preferences *preferencesWindow = new Preferences(this,this->vagoSettings); 1019 preferencesWindow->exec(); //it destroys itself when finished. 1020 } 1021 1022 1023 void MainWindow::closeEvent(QCloseEvent *event){ 1024 if(this->vagoSettings->value("ConfirmExit").toBool()){ 1025 if(!Util::showQuestionPopUp(this,"Exit Vago?")){ 1026 event->ignore(); 1027 } 1028 } 1029 } 1030 1031 void MainWindow::on_cbToGeneral_currentIndexChanged(const QString &arg1) 1032 { 1033 1034 ui->cbDatGeneral->setEnabled(false); 1035 ui->cbDatGeneral->setChecked(false); 1036 ui->cbTRAMGeneral->setEnabled(false); 1037 ui->cbTRAMGeneral->setChecked(false); 1038 1039 if(QString::compare(ui->cbFromGeneral->currentText(),"ONI",Qt::CaseSensitive)==0){ 1040 if(QString::compare(arg1,"DAT",Qt::CaseSensitive)==0){ 1041 ui->cbDatGeneral->setEnabled(true); 1042 } 1043 else{ 1044 ui->cbTRAMGeneral->setEnabled(true); 1045 } 1046 } 1047 1048 } 1049 1050 void MainWindow::on_cbToModels_currentIndexChanged(const QString &arg1) 1051 { 1052 ui->cbWithAnimation->setEnabled(false); 1053 ui->cbWithAnimation->setChecked(false); 1054 1055 if(arg1=="DAE"){ 1056 ui->cbWithAnimation->setEnabled(true); 1057 } 1058 } 1059 1060 void MainWindow::on_cbToLevels_currentIndexChanged(const QString &arg1) 1061 { 1062 926 927 ui->cbSpecificFilesLevels->setEnabled(false); 928 ui->cbSpecificFilesLevels->setChecked(false); 1063 929 ui->cbDatLevels->setEnabled(false); 1064 930 ui->cbDatLevels->setChecked(false); … … 1070 936 ui->cbGridsLevels->setChecked(false); 1071 937 938 if(arg1=="DAT"){ //case sensitive is faster 939 ui->cbSpecificFilesLevels->setEnabled(true); 940 } 941 else if(arg1=="ONI FILES"){ //case sensitive is faster 942 ui->cbDatLevels->setEnabled(true); 943 } 944 else if(arg1=="DAE"){ 945 ui->cbBnvLevels->setEnabled(true); 946 ui->cbAdditionalSourcesLevels->setEnabled(true); 947 } 948 949 updateComboBox(arg1, ui->cbToLevels); 950 } 951 952 void MainWindow::on_cbFromMisc_currentIndexChanged(const QString &arg1) 953 { 954 updateComboBox(arg1, ui->cbToMisc); 955 } 956 957 void MainWindow::updateComboBox(const QString &arg1, QComboBox *comboBox){ 958 QString identifier=ui->tabWidget->tabText(ui->tabWidget->currentIndex()).toLower(); // get current tab title text (lower case) 959 960 comboBox->clear(); 961 962 QStringList toUpdate=QStringList(); 963 964 QStringList values=commandMap.values(identifier+"->"+arg1); 965 966 for (int i = values.size()-1; i >= 0; i--){ //By defaut MultiItems have the inversed order (http://qt-project.org/doc/qt-4.8/qhash.html#insertMulti) 967 toUpdate << values.at(i); 968 } 969 970 comboBox->addItems(toUpdate); 971 } 972 973 974 void MainWindow::on_actionWindows_triggered() 975 { 976 ui->actionWindows->setChecked(true); 977 ui->actionMac_Windows_demo->setChecked(false); 978 } 979 980 void MainWindow::on_actionMac_Windows_demo_triggered() 981 { 982 ui->actionMac_Windows_demo->setChecked(true); 983 ui->actionWindows->setChecked(false); 984 } 985 986 void MainWindow::on_pbRemoveSourceXML_clicked() 987 { 988 removeTableContents( ui->twSourcesXML); 989 } 990 991 void MainWindow::on_pbRemoveSourceTextures_clicked() 992 { 993 removeTableContents(ui->twSourcesTextures); 994 } 995 996 void MainWindow::on_pbRemoveSourceObjects_clicked() 997 { 998 removeTableContents(ui->twSourcesObjects); 999 } 1000 1001 void MainWindow::on_pbRemoveSourceCharacters_clicked() 1002 { 1003 removeTableContents(ui->twSourcesCharacters); 1004 } 1005 1006 void MainWindow::on_pbRemoveSourceLevels_clicked() 1007 { 1008 removeTableContents(ui->twSourcesLevels); 1009 } 1010 1011 void MainWindow::on_pbRemoveSourceMisc_clicked() 1012 { 1013 removeTableContents(ui->twSourcesMisc); 1014 } 1015 1016 void MainWindow::on_pbClearSourcesXML_clicked() 1017 { 1018 clearTableContents(ui->twSourcesXML); 1019 } 1020 1021 void MainWindow::on_pbClearSourcesTextures_clicked() 1022 { 1023 clearTableContents(ui->twSourcesTextures); 1024 } 1025 1026 void MainWindow::on_pbClearSourcesObjects_clicked() 1027 { 1028 clearTableContents(ui->twSourcesObjects); 1029 } 1030 1031 void MainWindow::on_pbClearSourcesCharacters_clicked() 1032 { 1033 clearTableContents(ui->twSourcesCharacters); 1034 } 1035 1036 void MainWindow::on_pbClearSourcesLevels_clicked() 1037 { 1038 clearTableContents(ui->twSourcesLevels); 1039 } 1040 1041 void MainWindow::on_pbClearSourcesMisc_clicked() 1042 { 1043 clearTableContents(ui->twSourcesMisc); 1044 } 1045 1046 void MainWindow::removeTableContents(DropTableWidget *myTable){ 1047 int size = myTable->selectionModel()->selectedRows().size(); 1048 1049 if(size==0){ 1050 Util::showPopUp("Select a row first."); 1051 return; 1052 } 1053 1054 if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?")){ 1055 for(int i=0; i<size; i++){ 1056 //myTable->removeRow(myTable->selectedItems().at(size-i-1)->row()); 1057 myTable->removeRow(myTable->selectionModel()->selectedRows().at(size-i-1).row()); 1058 } 1059 updateItemsLoaded(myTable); 1060 } 1061 } 1062 1063 void MainWindow::clearTableContents(DropTableWidget *myTable){ 1064 if(myTable->rowCount()==0){ 1065 Util::showPopUp("Nothing to clear."); 1066 return; 1067 } 1068 1069 if(Util::showQuestionPopUp(this,"Are you sure you want to clear the content?")){ 1070 myTable->clearContents(); 1071 myTable->setRowCount(0); 1072 } 1073 updateItemsLoaded(myTable); 1074 } 1075 1076 1077 void MainWindow::on_actionPreferences_triggered() 1078 { 1079 //Show preferences 1080 Preferences *preferencesWindow = new Preferences(this,this->vagoSettings); 1081 preferencesWindow->exec(); //it destroys itself when finished. 1082 } 1083 1084 1085 void MainWindow::closeEvent(QCloseEvent *event){ 1086 if(this->vagoSettings->value("ConfirmExit").toBool()){ 1087 if(!Util::showQuestionPopUp(this,"Exit Vago?")){ 1088 event->ignore(); 1089 } 1090 } 1091 } 1092 1093 void MainWindow::on_cbToLevels_currentIndexChanged(const QString &arg1) 1094 { 1095 1072 1096 if(ui->cbFromLevels->currentText()=="MASTER XML" && arg1=="DAT"){ 1073 1097 ui->cbDatLevels->setEnabled(true); 1074 1098 } 1075 else if(ui->cbFromLevels->currentText()=="DAE" && arg1=="ONI"){ 1076 ui->cbBnvLevels->setEnabled(true); 1077 ui->cbAdditionalSourcesLevels->setEnabled(true); 1078 } 1079 } 1080 1081 void MainWindow::on_cbDatGeneral_toggled(bool checked) 1082 { 1083 ui->leTargetDatGeneral->setEnabled(checked); 1084 } 1085 1086 void MainWindow::on_cbTRAMGeneral_toggled(bool checked) 1087 { 1088 ui->leTRAMGeneral->setEnabled(checked); 1089 if(checked){ 1090 QString file=QFileDialog::getOpenFileName(this,"Choose the TRAM.oni file...","./" , "All Files (*.*)"); 1091 if(!file.isEmpty()){ 1092 ui->leTRAMGeneral->setText(file); 1093 } 1094 } 1099 else if(ui->cbFromLevels->currentText()=="MASTER XML" && arg1=="ONI FILES"){ 1100 ui->cbDatLevels->setEnabled(false); 1101 ui->cbDatLevels->setChecked(false); 1102 } 1103 1095 1104 } 1096 1105 … … 1133 1142 } 1134 1143 1144 void MainWindow::on_cbWithTRBS_ONCC_toggled(bool checked) 1145 { 1146 ui->leTRBS_ONCC->setEnabled(checked); 1147 } 1148 1135 1149 void MainWindow::on_actionCheck_OniSplit_version_triggered() 1136 1150 { … … 1161 1175 { 1162 1176 if(arg1.compare("General",Qt::CaseSensitive)==0){ //case sentive is faster 1163 updateItemsLoaded(ui->twSources General);1177 updateItemsLoaded(ui->twSourcesXML); 1164 1178 } 1165 1179 else if(arg1.compare("Textures",Qt::CaseSensitive)==0){ 1166 1180 updateItemsLoaded(ui->twSourcesTextures); 1167 1181 } 1168 else if(arg1.compare(" Models",Qt::CaseSensitive)==0){1169 updateItemsLoaded(ui->twSources Models);1182 else if(arg1.compare("Objects",Qt::CaseSensitive)==0){ 1183 updateItemsLoaded(ui->twSourcesObjects); 1170 1184 } 1171 1185 else if(arg1.compare("Levels",Qt::CaseSensitive)==0){ … … 1230 1244 } 1231 1245 1246 void MainWindow::on_actionOpen_AE_folder_triggered() 1247 { 1248 QDesktopServices::openUrl(QUrl("file:///"+this->AeLocation)); 1249 } 1250 1232 1251 QString MainWindow::getTypeConversion(DropTableWidget *myTable){ 1233 1252 QString from,to; 1234 1253 1235 if(myTable==ui->twSources General){1236 from=ui->cbFrom General->currentText();1237 to=ui->cbTo General->currentText();1254 if(myTable==ui->twSourcesXML){ 1255 from=ui->cbFromXML->currentText(); 1256 to=ui->cbToXML->currentText(); 1238 1257 } 1239 1258 else if(myTable==ui->twSourcesTextures){ … … 1241 1260 to=ui->cbToTextures->currentText(); 1242 1261 } 1243 else if(myTable==ui->twSources Models){1244 from=ui->cbFrom Models->currentText();1245 to=ui->cbTo Models->currentText();1246 } 1247 else if(myTable==ui->twSources Animations){1248 from=ui->cbFrom Animations->currentText();1249 to=ui->cbTo Animations->currentText();1262 else if(myTable==ui->twSourcesObjects){ 1263 from=ui->cbFromObjects->currentText(); 1264 to=ui->cbToObjects->currentText(); 1265 } 1266 else if(myTable==ui->twSourcesCharacters){ 1267 from=ui->cbFromCharacters->currentText(); 1268 to=ui->cbToCharacters->currentText(); 1250 1269 } 1251 1270 else if(myTable==ui->twSourcesLevels){ … … 1473 1492 1474 1493 QString MainWindow::getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file){ 1475 if(myTable==ui->twSourcesGeneral){ //So we only need to parse one command. 1476 return fileParsingGeneral(myOutputFolder,from,to,file); 1494 1495 QString tabTitle=ui->tabWidget->tabText(ui->tabWidget->currentIndex()).toLower(); // get current tab title 1496 1497 if(myTable==ui->twSourcesXML){ //So we only need to parse one command. 1498 return fileParsingXML(tabTitle, myOutputFolder,from,to,file); 1477 1499 } 1478 1500 else if(myTable==ui->twSourcesTextures){ 1479 return fileParsingTextures( myOutputFolder,from,to,file);1480 } 1481 else if(myTable==ui->twSources Models){1482 return fileParsing Models(myOutputFolder,from,to,file);1483 } 1484 else if(myTable==ui->twSources Animations){1485 return fileParsing Animations(myOutputFolder,from,to,file);1501 return fileParsingTextures(tabTitle, myOutputFolder,from,to,file); 1502 } 1503 else if(myTable==ui->twSourcesObjects){ 1504 return fileParsingObjects(tabTitle, myOutputFolder,from,to,file); 1505 } 1506 else if(myTable==ui->twSourcesCharacters){ 1507 return fileParsingCharacters(tabTitle, myOutputFolder,from,to,file); 1486 1508 } 1487 1509 else if(myTable==ui->twSourcesLevels){ 1488 return fileParsingLevels( myOutputFolder,from,to,file);1510 return fileParsingLevels(tabTitle, myOutputFolder,from,to,file); 1489 1511 } 1490 1512 else{ … … 1498 1520 **/ 1499 1521 void MainWindow::setConverterButtonsSize(){ 1500 int height=ui->pbConvert General->sizeHint().height()*1.3;1501 ui->pbConvert General->setMinimumHeight(height);1522 int height=ui->pbConvertXML->sizeHint().height()*1.3; 1523 ui->pbConvertXML->setMinimumHeight(height); 1502 1524 ui->pbConvertTextures->setMinimumHeight(height); 1503 ui->pbConvert Models->setMinimumHeight(height);1504 ui->pbConvert Animations->setMinimumHeight(height);1525 ui->pbConvertObjects->setMinimumHeight(height); 1526 ui->pbConvertCharacters->setMinimumHeight(height); 1505 1527 ui->pbConvertLevels->setMinimumHeight(height); 1506 1528 ui->pbConvertMisc->setMinimumHeight(height); … … 1535 1557 connect(myConverter, SIGNAL(resultConversion(QString,int)), this, SLOT(TresultConversion(QString,int))); 1536 1558 1559 //This signal is for thread that is working notify the gui thread that the conversion was aborted with sucess 1560 connect(myConverter, SIGNAL(conversionAborted()), this, SLOT(TconversionAborted())); 1561 1562 // This signal is to the user be able to terminate a conversion (OniSplit process in class myConverter will be terminated) 1563 connect(this, SIGNAL(terminateCurrProcess()), myConverter, SLOT(terminateCurrProcess())); 1564 1537 1565 //Drop signal for General table 1538 connect(ui->twSources General, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));1566 connect(ui->twSourcesXML, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList))); 1539 1567 1540 1568 //Drop signal for Textures table 1541 1569 connect(ui->twSourcesTextures, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList))); 1542 1570 1543 //Drop signal for Models table1544 connect(ui->twSources Models, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));1545 1546 //Drop signal for Animations table1547 connect(ui->twSources Animations, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));1571 //Drop signal for Objects table 1572 connect(ui->twSourcesObjects, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList))); 1573 1574 //Drop signal for Characters table 1575 connect(ui->twSourcesCharacters, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList))); 1548 1576 1549 1577 //Drop signal for Levels table … … 1554 1582 1555 1583 //Context menu for General table 1556 connect(ui->twSources General, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));1584 connect(ui->twSourcesXML, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*))); 1557 1585 1558 1586 //Context menu for Textures table 1559 1587 connect(ui->twSourcesTextures, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*))); 1560 1588 1561 //Context menu for Models table1562 connect(ui->twSources Models, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));1563 1564 //Context menu for Animations table1565 connect(ui->twSources Animations, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));1589 //Context menu for Objects table 1590 connect(ui->twSourcesObjects, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*))); 1591 1592 //Context menu for Characters table 1593 connect(ui->twSourcesCharacters, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*))); 1566 1594 1567 1595 //Context menu for Levels table … … 1571 1599 connect(ui->twSourcesMisc, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*))); 1572 1600 } 1573 1574 -
Vago/trunk/Vago/mainwindow.h
r811 r897 65 65 void on_actionCheck_For_Updates_triggered(); 66 66 67 void on_pbAddSource General_clicked();68 69 void on_pbConvert General_clicked();67 void on_pbAddSourceXML_clicked(); 68 69 void on_pbConvertXML_clicked(); 70 70 71 71 void TsetupProgressBar(int max); … … 75 75 void TresultConversion(QString result, int numErrors); 76 76 77 void on_cbFromGeneral_currentIndexChanged(const QString &arg1);77 void TconversionAborted(); 78 78 79 79 void on_actionWindows_triggered(); … … 81 81 void on_actionMac_Windows_demo_triggered(); 82 82 83 void on_pbClearSources General_clicked();84 85 void on_pbRemoveSource General_clicked();83 void on_pbClearSourcesXML_clicked(); 84 85 void on_pbRemoveSourceXML_clicked(); 86 86 87 87 void on_pbAddSourceTextures_clicked(); … … 93 93 void on_cbFromTextures_currentIndexChanged(const QString &arg1); 94 94 95 void on_cbFrom Models_currentIndexChanged(const QString &arg1);95 void on_cbFromObjects_currentIndexChanged(const QString &arg1); 96 96 97 97 void on_cbFromLevels_currentIndexChanged(const QString &arg1); … … 99 99 void on_cbFromMisc_currentIndexChanged(const QString &arg1); 100 100 101 void on_pbAddSource Models_clicked();101 void on_pbAddSourceObjects_clicked(); 102 102 103 103 void on_pbAddSourceLevels_clicked(); … … 107 107 void on_pbConvertTextures_clicked(); 108 108 109 void on_pbConvert Models_clicked();109 void on_pbConvertObjects_clicked(); 110 110 111 111 void on_pbConvertLevels_clicked(); … … 113 113 void on_pbConvertMisc_clicked(); 114 114 115 void on_pbRemoveSource Models_clicked();115 void on_pbRemoveSourceObjects_clicked(); 116 116 117 117 void on_pbRemoveSourceLevels_clicked(); … … 119 119 void on_pbRemoveSourceMisc_clicked(); 120 120 121 void on_pbClearSources Models_clicked();121 void on_pbClearSourcesObjects_clicked(); 122 122 123 123 void on_pbClearSourcesLevels_clicked(); … … 127 127 void on_actionPreferences_triggered(); 128 128 129 void on_cbToGeneral_currentIndexChanged(const QString &arg1);130 131 129 void on_cbToLevels_currentIndexChanged(const QString &arg1); 132 130 133 void on_cbDatGeneral_toggled(bool checked);134 135 131 void on_cbDatLevels_toggled(bool checked); 136 132 … … 141 137 void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets 142 138 143 void on_cbTRAMGeneral_toggled(bool checked);144 145 139 void on_tabWidget_selected(const QString &arg1); 146 140 … … 159 153 void on_actionView_log_triggered(); 160 154 161 void on_cbToModels_currentIndexChanged(const QString &arg1); 155 void on_actionAE_Package_Creator_triggered(); 156 157 void on_cbFromCharacters_currentIndexChanged(const QString &arg1); 158 159 void on_pbConvertCharacters_clicked(); 160 161 void on_pbAddSourceCharacters_clicked(); 162 163 void on_pbRemoveSourceCharacters_clicked(); 164 165 void on_pbClearSourcesCharacters_clicked(); 166 167 void on_actionSound_Wizard_triggered(); 168 169 void on_actionCheck_xmlTools_version_triggered(); 170 171 void on_actionOpen_AE_folder_triggered(); 172 173 void on_cbWithTRBS_ONCC_toggled(bool checked); 162 174 163 175 void on_cbWithAnimation_toggled(bool checked); 164 176 165 void on_actionAE_Package_Creator_triggered(); 166 167 void on_cbFromAnimations_currentIndexChanged(const QString &arg1); 168 169 void on_cbCamera_toggled(bool checked); 170 171 void on_cbGeometry_toggled(bool checked); 172 173 void on_pbConvertAnimations_clicked(); 174 175 void on_pbAddSourceAnimations_clicked(); 176 177 void on_pbRemoveSourceAnimations_clicked(); 178 179 void on_pbClearSourcesAnimations_clicked(); 180 181 void on_actionSound_Wizard_triggered(); 182 183 void on_actionCheck_xmlTools_version_triggered(); 177 void on_cbFromXML_currentIndexChanged(const QString &arg1); 178 179 void on_cbSpecificFilesLevels_toggled(bool checked); 180 181 void on_tbAbortConversion_clicked(); 184 182 185 183 private: … … 191 189 QString outputFolder; //Output folder 192 190 QString AeLocation; //Workspace location 191 int startedWindowWidth; 192 int startedWindowHeight; 193 193 QLabel *itemsLoaded; 194 194 QProgressBar *myBar; //Progress Bar … … 206 206 void clearTableContents(DropTableWidget *myTable); 207 207 void removeTableContents(DropTableWidget *myTable); 208 void updateComboBox(const QString &arg1, QComboBox *comboBox , const QString &identifier);208 void updateComboBox(const QString &arg1, QComboBox *comboBox); 209 209 void startConversion(DropTableWidget *myTable); 210 210 void updateItemsLoaded(DropTableWidget *currentTable); … … 213 213 void setConverterButtonsSize(); 214 214 QString getFileOutputFolder(QString fromTo, QString myOutputFolder=""); 215 QString fileParsing General(QString myOutputFolder, QString from, QString to , QString file);216 QString fileParsingTextures(QString myOutputFolder, QString from, QString to , QString file);217 QString fileParsing Models(QString myOutputFolder, QString from, QString to , QString file);218 QString fileParsing Animations(QString myOutputFolder, QString from, QString to , QString file);219 QString fileParsingLevels(QString myOutputFolder, QString from, QString to , QString file);215 QString fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); 216 QString fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); 217 QString fileParsingObjects(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); 218 QString fileParsingCharacters(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); 219 QString fileParsingLevels(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file); 220 220 QString fileParsingMisc(QString myOutputFolder, QString from, QString to , QString file); 221 221 QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file); 222 222 QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table 223 223 QString getOSIndependentAppPath(); 224 225 signals: 226 void terminateCurrProcess(); 224 227 }; 225 228 -
Vago/trunk/Vago/mainwindow.ui
r796 r897 7 7 <x>0</x> 8 8 <y>0</y> 9 <width> 640</width>10 <height> 480</height>9 <width>800</width> 10 <height>600</height> 11 11 </rect> 12 12 </property> … … 23 23 <layout class="QHBoxLayout" name="horizontalLayout_10"> 24 24 <item> 25 <widget class="QToolButton" name="tbAbortConversion"> 26 <property name="toolTip"> 27 <string>Abort current conversion</string> 28 </property> 29 <property name="text"> 30 <string/> 31 </property> 32 <property name="icon"> 33 <iconset resource="resources.qrc"> 34 <normaloff>:/new/icons/abort.png</normaloff>:/new/icons/abort.png</iconset> 35 </property> 36 <property name="autoRaise"> 37 <bool>true</bool> 38 </property> 39 </widget> 40 </item> 41 <item> 25 42 <widget class="QToolButton" name="tbOpenFolder"> 26 43 <property name="toolTip"> … … 156 173 <widget class="QWidget" name="tabGeneral"> 157 174 <attribute name="title"> 158 <string> General</string>175 <string>XML</string> 159 176 </attribute> 160 177 <layout class="QVBoxLayout" name="verticalLayout_18"> … … 177 194 </item> 178 195 <item> 179 <widget class="QComboBox" name="cbFromGeneral"> 180 <item> 181 <property name="text"> 182 <string>DAT</string> 183 </property> 184 </item> 196 <widget class="QComboBox" name="cbFromXML"> 185 197 <item> 186 198 <property name="text"> … … 213 225 </item> 214 226 <item> 215 <widget class="QComboBox" name="cbTo General">216 <item> 217 <property name="text"> 218 <string> ONI</string>227 <widget class="QComboBox" name="cbToXML"> 228 <item> 229 <property name="text"> 230 <string>XML</string> 219 231 </property> 220 232 </item> … … 228 240 <layout class="QHBoxLayout" name="horizontalLayout_11"> 229 241 <item> 230 <widget class="QGroupBox" name="gbSources General">242 <widget class="QGroupBox" name="gbSourcesXML"> 231 243 <property name="title"> 232 244 <string>Sources</string> … … 234 246 <layout class="QHBoxLayout" name="horizontalLayout_13"> 235 247 <item> 236 <widget class="DropTableWidget" name="twSources General"/>248 <widget class="DropTableWidget" name="twSourcesXML"/> 237 249 </item> 238 250 <item> 239 251 <layout class="QVBoxLayout" name="verticalLayout_10"> 240 252 <item> 241 <widget class="QPushButton" name="pbAddSource General">253 <widget class="QPushButton" name="pbAddSourceXML"> 242 254 <property name="minimumSize"> 243 255 <size> … … 252 264 </item> 253 265 <item> 254 <widget class="QPushButton" name="pbRemoveSource General">266 <widget class="QPushButton" name="pbRemoveSourceXML"> 255 267 <property name="text"> 256 268 <string>Remove</string> … … 259 271 </item> 260 272 <item> 261 <widget class="QPushButton" name="pbClearSources General">273 <widget class="QPushButton" name="pbClearSourcesXML"> 262 274 <property name="text"> 263 275 <string>Clear</string> … … 273 285 </item> 274 286 <item> 275 <widget class="QGroupBox" name="gbGeneral">276 <property name="enabled">277 <bool>true</bool>278 </property>279 <property name="title">280 <string>Options</string>281 </property>282 <layout class="QHBoxLayout" name="horizontalLayout_23">283 <item>284 <layout class="QVBoxLayout" name="verticalLayout_38">285 <item>286 <layout class="QHBoxLayout" name="horizontalLayout_29">287 <item>288 <widget class="QCheckBox" name="cbDatGeneral">289 <property name="enabled">290 <bool>false</bool>291 </property>292 <property name="text">293 <string>DAT Filename:</string>294 </property>295 </widget>296 </item>297 <item>298 <widget class="QLineEdit" name="leTargetDatGeneral">299 <property name="enabled">300 <bool>false</bool>301 </property>302 <property name="placeholderText">303 <string>Custom .dat filename</string>304 </property>305 </widget>306 </item>307 </layout>308 </item>309 </layout>310 </item>311 <item>312 <widget class="QCheckBox" name="cbTRAMGeneral">313 <property name="enabled">314 <bool>false</bool>315 </property>316 <property name="toolTip">317 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">318 <html><head><meta name="qrichtext" content="1" /><style type="text/css">319 p, li { white-space: pre-wrap; }320 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;">321 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Extract an ONCC with another character's TRAM</span></p>322 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">For example extract Konoko's ONCC with Muro's TRAM</span></p></body></html></string>323 </property>324 <property name="text">325 <string>Another TRAM:</string>326 </property>327 </widget>328 </item>329 <item>330 <widget class="QLineEdit" name="leTRAMGeneral">331 <property name="enabled">332 <bool>false</bool>333 </property>334 <property name="toolTip">335 <string>Extract an ONCC with another character's TRAM336 For example extract Konoko's ONCC with Muro's TRAM</string>337 </property>338 <property name="placeholderText">339 <string>TRAM.oni source file</string>340 </property>341 </widget>342 </item>343 </layout>344 </widget>345 </item>346 <item>347 287 <widget class="Line" name="line_3"> 348 288 <property name="orientation"> … … 352 292 </item> 353 293 <item> 354 <widget class="QPushButton" name="pbConvertGeneral"> 294 <widget class="QPushButton" name="pbConvertXML"> 295 <property name="minimumSize"> 296 <size> 297 <width>0</width> 298 <height>30</height> 299 </size> 300 </property> 355 301 <property name="text"> 356 302 <string>Convert</string> … … 386 332 <item> 387 333 <property name="text"> 388 <string>DAT / ONI</string>389 </property> 390 </item> 391 <item> 392 <property name="text"> 393 <string> DDS / TGA/ PNG / JPG</string>334 <string>DAT / TXMP ONI</string> 335 </property> 336 </item> 337 <item> 338 <property name="text"> 339 <string>TGA / DDS / PNG / JPG</string> 394 340 </property> 395 341 </item> … … 417 363 <item> 418 364 <property name="text"> 365 <string>TGA</string> 366 </property> 367 </item> 368 <item> 369 <property name="text"> 419 370 <string>DDS</string> 420 </property>421 </item>422 <item>423 <property name="text">424 <string>TGA</string>425 371 </property> 426 372 </item> … … 631 577 </layout> 632 578 </widget> 579 <widget class="QWidget" name="tab"> 580 <attribute name="title"> 581 <string>Characters</string> 582 </attribute> 583 <layout class="QVBoxLayout" name="verticalLayout_4"> 584 <item> 585 <layout class="QHBoxLayout" name="horizontalLayout_49"> 586 <item> 587 <layout class="QVBoxLayout" name="verticalLayout_63"> 588 <item> 589 <widget class="QLabel" name="label_30"> 590 <property name="sizePolicy"> 591 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 592 <horstretch>0</horstretch> 593 <verstretch>0</verstretch> 594 </sizepolicy> 595 </property> 596 <property name="text"> 597 <string>From</string> 598 </property> 599 </widget> 600 </item> 601 <item> 602 <widget class="QComboBox" name="cbFromCharacters"> 603 <item> 604 <property name="text"> 605 <string>TRBS / ONCC ONI</string> 606 </property> 607 </item> 608 <item> 609 <property name="text"> 610 <string>TRBS XML</string> 611 </property> 612 </item> 613 <item> 614 <property name="text"> 615 <string>TRBS DAE</string> 616 </property> 617 </item> 618 <item> 619 <property name="text"> 620 <string>TRAM ONI</string> 621 </property> 622 </item> 623 <item> 624 <property name="text"> 625 <string>FILM DAT</string> 626 </property> 627 </item> 628 </widget> 629 </item> 630 </layout> 631 </item> 632 <item> 633 <layout class="QVBoxLayout" name="verticalLayout_64"> 634 <item> 635 <widget class="QLabel" name="label_31"> 636 <property name="sizePolicy"> 637 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 638 <horstretch>0</horstretch> 639 <verstretch>0</verstretch> 640 </sizepolicy> 641 </property> 642 <property name="text"> 643 <string>To</string> 644 </property> 645 </widget> 646 </item> 647 <item> 648 <widget class="QComboBox" name="cbToCharacters"> 649 <item> 650 <property name="text"> 651 <string>DAE</string> 652 </property> 653 </item> 654 </widget> 655 </item> 656 </layout> 657 </item> 658 </layout> 659 </item> 660 <item> 661 <widget class="QGroupBox" name="gbSourcesAnimations"> 662 <property name="title"> 663 <string>Sources</string> 664 </property> 665 <layout class="QHBoxLayout" name="horizontalLayout_48"> 666 <item> 667 <widget class="DropTableWidget" name="twSourcesCharacters"/> 668 </item> 669 <item> 670 <layout class="QVBoxLayout" name="verticalLayout_62"> 671 <item> 672 <widget class="QPushButton" name="pbAddSourceCharacters"> 673 <property name="minimumSize"> 674 <size> 675 <width>0</width> 676 <height>0</height> 677 </size> 678 </property> 679 <property name="text"> 680 <string>Add</string> 681 </property> 682 </widget> 683 </item> 684 <item> 685 <widget class="QPushButton" name="pbRemoveSourceCharacters"> 686 <property name="text"> 687 <string>Remove</string> 688 </property> 689 </widget> 690 </item> 691 <item> 692 <widget class="QPushButton" name="pbClearSourcesCharacters"> 693 <property name="text"> 694 <string>Clear</string> 695 </property> 696 </widget> 697 </item> 698 </layout> 699 </item> 700 </layout> 701 </widget> 702 </item> 703 <item> 704 <widget class="QGroupBox" name="gbModels"> 705 <property name="title"> 706 <string>Options</string> 707 </property> 708 <layout class="QHBoxLayout" name="horizontalLayout_3"> 709 <item> 710 <widget class="QCheckBox" name="cbCellShading"> 711 <property name="enabled"> 712 <bool>false</bool> 713 </property> 714 <property name="text"> 715 <string>Cell Shading</string> 716 </property> 717 </widget> 718 </item> 719 <item> 720 <widget class="QCheckBox" name="cbNormals"> 721 <property name="enabled"> 722 <bool>false</bool> 723 </property> 724 <property name="text"> 725 <string>Normals</string> 726 </property> 727 </widget> 728 </item> 729 <item> 730 <widget class="QCheckBox" name="cbWithTRBS_ONCC"> 731 <property name="enabled"> 732 <bool>false</bool> 733 </property> 734 <property name="toolTip"> 735 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 736 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 737 p, li { white-space: pre-wrap; } 738 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 739 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Extract a TRAM (animation) with character's TRBS / ONCC</p> 740 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">For example extract a Muro's TRAM with Konoko's ONCC</span></p></body></html></string> 741 </property> 742 <property name="text"> 743 <string>Extract with TRBS / ONCC:</string> 744 </property> 745 </widget> 746 </item> 747 <item> 748 <widget class="QLineEdit" name="leTRBS_ONCC"> 749 <property name="enabled"> 750 <bool>false</bool> 751 </property> 752 <property name="toolTip"> 753 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 754 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 755 p, li { white-space: pre-wrap; } 756 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 757 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Extract a TRAM (animation) with character's TRBS / ONCC</p> 758 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">For example extract a Muro's TRAM with Konoko's ONCC</span></p></body></html></string> 759 </property> 760 <property name="placeholderText"> 761 <string>TRBS / ONCC.oni source file</string> 762 </property> 763 </widget> 764 </item> 765 </layout> 766 </widget> 767 </item> 768 <item> 769 <widget class="Line" name="line_15"> 770 <property name="orientation"> 771 <enum>Qt::Horizontal</enum> 772 </property> 773 </widget> 774 </item> 775 <item> 776 <widget class="QPushButton" name="pbConvertCharacters"> 777 <property name="minimumSize"> 778 <size> 779 <width>0</width> 780 <height>30</height> 781 </size> 782 </property> 783 <property name="text"> 784 <string>Convert</string> 785 </property> 786 </widget> 787 </item> 788 </layout> 789 </widget> 633 790 <widget class="QWidget" name="tabModels"> 634 791 <attribute name="title"> 635 <string> Models</string>792 <string>Objects</string> 636 793 </attribute> 637 <layout class="QVBoxLayout" name="verticalLayout_2 5">794 <layout class="QVBoxLayout" name="verticalLayout_2"> 638 795 <item> 639 796 <layout class="QHBoxLayout" name="horizontalLayout_26"> … … 654 811 </item> 655 812 <item> 656 <widget class="QComboBox" name="cbFromModels"> 657 <item> 658 <property name="text"> 659 <string>ONI</string> 813 <widget class="QComboBox" name="cbFromObjects"> 814 <item> 815 <property name="text"> 816 <string>M3GM ONI</string> 817 </property> 818 </item> 819 <item> 820 <property name="text"> 821 <string>ONWC ONI</string> 822 </property> 823 </item> 824 <item> 825 <property name="text"> 826 <string>OBAN ONI (cam)</string> 660 827 </property> 661 828 </item> … … 663 830 <property name="text"> 664 831 <string>OBJ</string> 665 </property>666 </item>667 <item>668 <property name="text">669 <string>DAE</string>670 832 </property> 671 833 </item> … … 690 852 </item> 691 853 <item> 692 <widget class="QComboBox" name="cbTo Models">854 <widget class="QComboBox" name="cbToObjects"> 693 855 <item> 694 856 <property name="text"> … … 714 876 <layout class="QHBoxLayout" name="horizontalLayout_16"> 715 877 <item> 716 <widget class="DropTableWidget" name="twSources Models"/>878 <widget class="DropTableWidget" name="twSourcesObjects"/> 717 879 </item> 718 880 <item> 719 881 <layout class="QVBoxLayout" name="verticalLayout_11"> 720 882 <item> 721 <widget class="QPushButton" name="pbAddSource Models">883 <widget class="QPushButton" name="pbAddSourceObjects"> 722 884 <property name="minimumSize"> 723 885 <size> … … 732 894 </item> 733 895 <item> 734 <widget class="QPushButton" name="pbRemoveSource Models">896 <widget class="QPushButton" name="pbRemoveSourceObjects"> 735 897 <property name="text"> 736 898 <string>Remove</string> … … 739 901 </item> 740 902 <item> 741 <widget class="QPushButton" name="pbClearSources Models">903 <widget class="QPushButton" name="pbClearSourcesObjects"> 742 904 <property name="text"> 743 905 <string>Clear</string> … … 751 913 </item> 752 914 <item> 753 <widget class="QGroupBox" name="gb Models">915 <widget class="QGroupBox" name="gbAnimations"> 754 916 <property name="title"> 755 917 <string>Options</string> 756 918 </property> 757 <layout class="QVBoxLayout" name="verticalLayout_26"> 758 <item> 759 <layout class="QVBoxLayout" name="verticalLayout_27"> 760 <item> 761 <layout class="QHBoxLayout" name="horizontalLayout_24"> 762 <item> 763 <widget class="QCheckBox" name="cbCellShading"> 764 <property name="enabled"> 765 <bool>false</bool> 766 </property> 767 <property name="text"> 768 <string>Cell Shading</string> 769 </property> 770 </widget> 771 </item> 772 <item> 773 <widget class="QCheckBox" name="cbNormals"> 774 <property name="enabled"> 775 <bool>false</bool> 776 </property> 777 <property name="text"> 778 <string>Normals</string> 779 </property> 780 </widget> 781 </item> 782 <item> 783 <widget class="QCheckBox" name="cbWithAnimation"> 784 <property name="enabled"> 785 <bool>false</bool> 786 </property> 787 <property name="toolTip"> 788 <string>Extract the model with a specific animation. 789 If none inputted (and checkbox is selected) it will search for one at ONCC>TRAC. 790 It's the name of a TRAM.oni file, don't include the extension.</string> 791 </property> 792 <property name="text"> 793 <string>With Animation:</string> 794 </property> 795 </widget> 796 </item> 797 <item> 798 <widget class="QLineEdit" name="leAnimationName"> 799 <property name="enabled"> 800 <bool>false</bool> 801 </property> 802 <property name="toolTip"> 803 <string>Extract the model with a specific animation. 804 If none inputted (and checkbox is selected) it will search for one at ONCC>TRAC. 805 It's the name of a TRAM.oni file, don't include the extension.</string> 806 </property> 807 <property name="placeholderText"> 808 <string>Animation name</string> 809 </property> 810 </widget> 811 </item> 812 <item> 813 <widget class="QCheckBox" name="cbTexture"> 814 <property name="enabled"> 815 <bool>false</bool> 816 </property> 817 <property name="toolTip"> 818 <string>Give model a texture. 919 <layout class="QHBoxLayout" name="horizontalLayout"> 920 <item> 921 <widget class="QCheckBox" name="cbTexture"> 922 <property name="enabled"> 923 <bool>false</bool> 924 </property> 925 <property name="toolTip"> 926 <string>Give model a texture. 819 927 It's the name of a TXMP.oni file, don't include the extension.</string> 820 821 822 823 824 825 826 827 828 829 830 831 832 928 </property> 929 <property name="text"> 930 <string>Texture:</string> 931 </property> 932 </widget> 933 </item> 934 <item> 935 <widget class="QLineEdit" name="leTextureName"> 936 <property name="enabled"> 937 <bool>false</bool> 938 </property> 939 <property name="toolTip"> 940 <string>Give model a texture. 833 941 It's the name of a TXMP.oni file, don't include the extension.</string> 834 </property> 835 <property name="placeholderText"> 836 <string>Texture name</string> 837 </property> 838 </widget> 839 </item> 840 </layout> 841 </item> 842 </layout> 942 </property> 943 <property name="text"> 944 <string>TXMP.oni source file</string> 945 </property> 946 <property name="placeholderText"> 947 <string>Texture name</string> 948 </property> 949 </widget> 950 </item> 951 <item> 952 <widget class="QCheckBox" name="cbWithAnimation"> 953 <property name="enabled"> 954 <bool>true</bool> 955 </property> 956 <property name="toolTip"> 957 <string>Give model a texture. 958 It's the name of a TXMP.oni file, don't include the extension.</string> 959 </property> 960 <property name="text"> 961 <string>With Animation:</string> 962 </property> 963 </widget> 964 </item> 965 <item> 966 <widget class="QLineEdit" name="leAnimationName"> 967 <property name="enabled"> 968 <bool>false</bool> 969 </property> 970 <property name="toolTip"> 971 <string>Give model a texture. 972 It's the name of a TXMP.oni file, don't include the extension.</string> 973 </property> 974 <property name="placeholderText"> 975 <string>OBAN.oni source file</string> 976 </property> 977 </widget> 843 978 </item> 844 979 </layout> … … 853 988 </item> 854 989 <item> 855 <widget class="QPushButton" name="pbConvertModels"> 856 <property name="minimumSize"> 857 <size> 858 <width>0</width> 859 <height>30</height> 860 </size> 861 </property> 862 <property name="text"> 863 <string>Convert</string> 864 </property> 865 </widget> 866 </item> 867 </layout> 868 </widget> 869 <widget class="QWidget" name="tab"> 870 <attribute name="title"> 871 <string>Animations</string> 872 </attribute> 873 <layout class="QVBoxLayout" name="verticalLayout_2"> 874 <item> 875 <layout class="QHBoxLayout" name="horizontalLayout_49"> 876 <item> 877 <layout class="QVBoxLayout" name="verticalLayout_63"> 878 <item> 879 <widget class="QLabel" name="label_30"> 880 <property name="sizePolicy"> 881 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 882 <horstretch>0</horstretch> 883 <verstretch>0</verstretch> 884 </sizepolicy> 885 </property> 886 <property name="text"> 887 <string>From</string> 888 </property> 889 </widget> 890 </item> 891 <item> 892 <widget class="QComboBox" name="cbFromAnimations"> 893 <item> 894 <property name="text"> 895 <string>ONI</string> 896 </property> 897 </item> 898 <item> 899 <property name="text"> 900 <string>FILM DAT</string> 901 </property> 902 </item> 903 </widget> 904 </item> 905 </layout> 906 </item> 907 <item> 908 <layout class="QVBoxLayout" name="verticalLayout_64"> 909 <item> 910 <widget class="QLabel" name="label_31"> 911 <property name="sizePolicy"> 912 <sizepolicy hsizetype="Preferred" vsizetype="Fixed"> 913 <horstretch>0</horstretch> 914 <verstretch>0</verstretch> 915 </sizepolicy> 916 </property> 917 <property name="text"> 918 <string>To</string> 919 </property> 920 </widget> 921 </item> 922 <item> 923 <widget class="QComboBox" name="cbToAnimations"> 924 <item> 925 <property name="text"> 926 <string>DAE</string> 927 </property> 928 </item> 929 </widget> 930 </item> 931 </layout> 932 </item> 933 </layout> 934 </item> 935 <item> 936 <widget class="QGroupBox" name="gbSourcesAnimations"> 937 <property name="title"> 938 <string>Sources</string> 939 </property> 940 <layout class="QHBoxLayout" name="horizontalLayout_48"> 941 <item> 942 <widget class="DropTableWidget" name="twSourcesAnimations"/> 943 </item> 944 <item> 945 <layout class="QVBoxLayout" name="verticalLayout_62"> 946 <item> 947 <widget class="QPushButton" name="pbAddSourceAnimations"> 948 <property name="minimumSize"> 949 <size> 950 <width>0</width> 951 <height>0</height> 952 </size> 953 </property> 954 <property name="text"> 955 <string>Add</string> 956 </property> 957 </widget> 958 </item> 959 <item> 960 <widget class="QPushButton" name="pbRemoveSourceAnimations"> 961 <property name="text"> 962 <string>Remove</string> 963 </property> 964 </widget> 965 </item> 966 <item> 967 <widget class="QPushButton" name="pbClearSourcesAnimations"> 968 <property name="text"> 969 <string>Clear</string> 970 </property> 971 </widget> 972 </item> 973 </layout> 974 </item> 975 </layout> 976 </widget> 977 </item> 978 <item> 979 <widget class="QGroupBox" name="gbAnimations"> 980 <property name="title"> 981 <string>Options</string> 982 </property> 983 <layout class="QVBoxLayout" name="verticalLayout_60"> 984 <item> 985 <layout class="QVBoxLayout" name="verticalLayout_61"> 986 <item> 987 <layout class="QHBoxLayout" name="horizontalLayout_47"> 988 <item> 989 <widget class="QCheckBox" name="cbCamera"> 990 <property name="enabled"> 991 <bool>true</bool> 992 </property> 993 <property name="text"> 994 <string>Camera</string> 995 </property> 996 </widget> 997 </item> 998 <item> 999 <widget class="QCheckBox" name="cbGeometry"> 1000 <property name="enabled"> 1001 <bool>true</bool> 1002 </property> 1003 <property name="toolTip"> 1004 <string/> 1005 </property> 1006 <property name="text"> 1007 <string>Geometry:</string> 1008 </property> 1009 </widget> 1010 </item> 1011 <item> 1012 <widget class="QLineEdit" name="leGeometryName"> 1013 <property name="enabled"> 1014 <bool>false</bool> 1015 </property> 1016 <property name="toolTip"> 1017 <string/> 1018 </property> 1019 <property name="placeholderText"> 1020 <string>Geometry file path</string> 1021 </property> 1022 </widget> 1023 </item> 1024 </layout> 1025 </item> 1026 </layout> 1027 </item> 1028 </layout> 1029 </widget> 1030 </item> 1031 <item> 1032 <widget class="Line" name="line_15"> 1033 <property name="orientation"> 1034 <enum>Qt::Horizontal</enum> 1035 </property> 1036 </widget> 1037 </item> 1038 <item> 1039 <widget class="QPushButton" name="pbConvertAnimations"> 990 <widget class="QPushButton" name="pbConvertObjects"> 1040 991 <property name="minimumSize"> 1041 992 <size> … … 1055 1006 <string>Levels</string> 1056 1007 </attribute> 1057 <layout class="QVBoxLayout" name="verticalLayout_ 31">1008 <layout class="QVBoxLayout" name="verticalLayout_5"> 1058 1009 <item> 1059 1010 <layout class="QHBoxLayout" name="horizontalLayout_28"> … … 1077 1028 <item> 1078 1029 <property name="text"> 1079 <string>ONI</string> 1030 <string>DAT</string> 1031 </property> 1032 </item> 1033 <item> 1034 <property name="text"> 1035 <string>ONI FILES</string> 1036 </property> 1037 </item> 1038 <item> 1039 <property name="text"> 1040 <string>MASTER XML</string> 1041 </property> 1042 </item> 1043 <item> 1044 <property name="text"> 1045 <string>AKEV ONI</string> 1080 1046 </property> 1081 1047 </item> … … 1083 1049 <property name="text"> 1084 1050 <string>DAE</string> 1085 </property>1086 </item>1087 <item>1088 <property name="text">1089 <string>MASTER XML</string>1090 1051 </property> 1091 1052 </item> … … 1113 1074 <item> 1114 1075 <property name="text"> 1115 <string> DAE</string>1076 <string>ONI FILES</string> 1116 1077 </property> 1117 1078 </item> … … 1173 1134 <string>Options</string> 1174 1135 </property> 1175 <layout class="QVBoxLayout" name="verticalLayout_30"> 1136 <layout class="QVBoxLayout" name="verticalLayout_3"> 1137 <item> 1138 <layout class="QHBoxLayout" name="horizontalLayout_4"> 1139 <item> 1140 <widget class="QCheckBox" name="cbSpecificFilesLevels"> 1141 <property name="enabled"> 1142 <bool>true</bool> 1143 </property> 1144 <property name="minimumSize"> 1145 <size> 1146 <width>122</width> 1147 <height>0</height> 1148 </size> 1149 </property> 1150 <property name="toolTip"> 1151 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1152 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1153 p, li { white-space: pre-wrap; } 1154 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 1155 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Extract specific files oni files from the DAT file</span></p> 1156 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> 1157 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Example of input:</span></p> 1158 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">AKEVEnvWarehouse</span></p> 1159 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This will extract only the file AKEVEnvWarehouse.oni from the dat.</span></p> 1160 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> 1161 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can extract multiple files using wildcards e.g.: </span></p> 1162 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">M3GM* </span></p> 1163 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This will extract all files which begin with M3GM. </span></p></body></html></string> 1164 </property> 1165 <property name="text"> 1166 <string>Extract specific files:</string> 1167 </property> 1168 </widget> 1169 </item> 1170 <item> 1171 <widget class="QLineEdit" name="leSpecificFilesLevels"> 1172 <property name="enabled"> 1173 <bool>false</bool> 1174 </property> 1175 <property name="toolTip"> 1176 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1177 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1178 p, li { white-space: pre-wrap; } 1179 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 1180 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Extract specific files oni files from the DAT file</span></p> 1181 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> 1182 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Example of input:</span></p> 1183 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">AKEVEnvWarehouse</span></p> 1184 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This will extract only the file AKEVEnvWarehouse.oni from the dat.</span></p> 1185 <p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-size:8pt;"></p> 1186 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">You can extract multiple files using wildcards e.g.: </span></p> 1187 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">M3GM* </span></p> 1188 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">This will extract all files which begin with M3GM. </span></p></body></html></string> 1189 </property> 1190 <property name="text"> 1191 <string/> 1192 </property> 1193 <property name="placeholderText"> 1194 <string>Pattern to file or files (e.g. AKEVEnvWarehouse)</string> 1195 </property> 1196 </widget> 1197 </item> 1198 </layout> 1199 </item> 1176 1200 <item> 1177 1201 <layout class="QHBoxLayout" name="horizontalLayout_27"> … … 1183 1207 <property name="minimumSize"> 1184 1208 <size> 1185 <width>1 15</width>1209 <width>122</width> 1186 1210 <height>0</height> 1187 1211 </size> … … 1222 1246 </widget> 1223 1247 </item> 1248 <item> 1249 <widget class="QCheckBox" name="cbGridsLevels"> 1250 <property name="enabled"> 1251 <bool>false</bool> 1252 </property> 1253 <property name="toolTip"> 1254 <string>Generate pathfinding grids (master xml generates them automatically). Needs Bnv source.</string> 1255 </property> 1256 <property name="text"> 1257 <string>Generate Grids</string> 1258 </property> 1259 </widget> 1260 </item> 1224 1261 </layout> 1225 1262 </item> 1226 1263 <item> 1227 <layout class="QHBoxLayout" name="horizontalLayout_ 31">1264 <layout class="QHBoxLayout" name="horizontalLayout_2"> 1228 1265 <item> 1229 1266 <widget class="QCheckBox" name="cbAdditionalSourcesLevels"> … … 1231 1268 <bool>false</bool> 1232 1269 </property> 1270 <property name="minimumSize"> 1271 <size> 1272 <width>122</width> 1273 <height>0</height> 1274 </size> 1275 </property> 1233 1276 <property name="text"> 1234 1277 <string>Additional Sources:</string> … … 1242 1285 </property> 1243 1286 <property name="toolTip"> 1244 <string>Use "space" as separator for each file</string> 1287 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 1288 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 1289 p, li { white-space: pre-wrap; } 1290 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 1291 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Use &quot;;&quot; as separator for each file</span></p></body></html></string> 1245 1292 </property> 1246 1293 <property name="placeholderText"> 1247 1294 <string>Additional .dae sources for akev (e.g. env_markers.dae)</string> 1248 </property>1249 </widget>1250 </item>1251 <item>1252 <widget class="QCheckBox" name="cbGridsLevels">1253 <property name="enabled">1254 <bool>false</bool>1255 </property>1256 <property name="toolTip">1257 <string>Generate pathfinding grids (master xml generates them automatically). Needs Bnv source.</string>1258 </property>1259 <property name="text">1260 <string>Generate Grids</string>1261 1295 </property> 1262 1296 </widget> … … 1315 1349 <item> 1316 1350 <property name="text"> 1317 <string>DAT / ONI</string> 1351 <string>DAT / SNDD ONI</string> 1352 </property> 1353 </item> 1354 <item> 1355 <property name="text"> 1356 <string>DAT / SUBT ONI</string> 1318 1357 </property> 1319 1358 </item> … … 1357 1396 <property name="text"> 1358 1397 <string>AIF</string> 1359 </property>1360 </item>1361 <item>1362 <property name="text">1363 <string>TXT</string>1364 1398 </property> 1365 1399 </item> … … 1444 1478 <x>0</x> 1445 1479 <y>0</y> 1446 <width> 640</width>1480 <width>800</width> 1447 1481 <height>21</height> 1448 1482 </rect> … … 1485 1519 <addaction name="menuOutput_directly_to"/> 1486 1520 <addaction name="separator"/> 1521 <addaction name="actionOpen_AE_folder"/> 1487 1522 <addaction name="actionView_log"/> 1488 1523 </widget> … … 1619 1654 </property> 1620 1655 </action> 1656 <action name="actionOpen_AE_folder"> 1657 <property name="text"> 1658 <string>Open AE folder</string> 1659 </property> 1660 </action> 1621 1661 </widget> 1622 1662 <layoutdefault spacing="6" margin="11"/> -
Vago/trunk/Vago/packageWizard/packagepage2.ui
r811 r897 245 245 <widget class="QLabel" name="lbFieldsReadOnly"> 246 246 <property name="text"> 247 <string><html><span style=" color:#0000ff;">* Fields read only by AEI2 when the package isn't at the mod depot.</span></html></string> 247 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 248 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 249 p, li { white-space: pre-wrap; } 250 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 251 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#0000ff;">* Edit this text in packagepage2.cpp</span></p></body></html></string> 248 252 </property> 249 253 <property name="wordWrap"> -
Vago/trunk/Vago/packageWizard/packagepage4.ui
r790 r897 28 28 </property> 29 29 <property name="text"> 30 <string><html><b>Common</b></html></string> 30 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 31 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 32 p, li { white-space: pre-wrap; } 33 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 34 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Common [edit this text in packagepage4.cpp]</span></p></body></html></string> 31 35 </property> 32 36 </widget> -
Vago/trunk/Vago/packageWizard/packagepagefinal.ui
r792 r897 18 18 <widget class="QLabel" name="lbComplete"> 19 19 <property name="text"> 20 <string><html> 21 The wizard is now complete. The package will be created when you click in finish.<br/> 22 After that you can upload the package to <a href="www.mods.oni2.net">mods.oni2.net</a> to get your mod listed in the AEI. 23 </html></string> 20 <string>The wizard is now complete. Edit this text in packagepagefinal.cpp</string> 24 21 </property> 25 22 <property name="wordWrap"> -
Vago/trunk/Vago/preferences.cpp
r771 r897 13 13 ui->leAEfolder->setText(this->vagoSettings->value("AeFolder").toString()); 14 14 ui->leWorkspace->setText(this->vagoSettings->value("Workspace").toString()); 15 ui->leWidth->setText(this->vagoSettings->value("WindowWidth").toString()); 16 ui->leHeight->setText(this->vagoSettings->value("WindowHeight").toString()); 15 17 ui->cbOniWindow->setChecked(this->vagoSettings->value("OniWindow").toBool()); 16 18 ui->cbSeparate->setChecked(this->vagoSettings->value("SeparateInWorkspace").toBool()); … … 24 26 } 25 27 26 void Preferences::on_buttonBox_accepted() 27 { 28 // Need to override to do the verification 29 // http://stackoverflow.com/questions/3261676/how-to-make-qdialogbuttonbox-not-close-its-parent-qdialog 30 void Preferences::accept (){ 31 QStringList options; 32 QRect screenRes = Util::getScreenResolution(); 33 34 options << ui->leAEfolder->text() << ui->leWorkspace->text() << ui->leWidth->text() << ui->leHeight->text(); 35 36 if(Util::checkEmptySpaces(options)){ 37 Util::showErrorPopUp("Setting not saved! There are empty settings."); 38 return; 39 } 40 41 if(Util::checkIfIntegers(QStringList() << ui->leWidth->text() << ui->leHeight->text() )){ 42 Util::showErrorPopUp("Setting not saved! Width and Height must be numbers."); 43 return; 44 } 45 46 if(ui->leWidth->text().toInt() > screenRes.width() || ui->leHeight->text().toInt() > screenRes.height()){ 47 Util::showErrorPopUp("Setting not saved! Width or Height specified are greater than actual screen resolution."); 48 return; 49 } 50 51 if(ui->leWidth->text().toInt() <= 0 || ui->leHeight->text().toInt() <= 0 ){ 52 Util::showErrorPopUp("Settings not saved! Width and Height must be greater than 0."); 53 return; 54 } 55 28 56 this->vagoSettings->setValue("AeFolder",ui->leAEfolder->text()); 29 57 this->vagoSettings->setValue("Workspace",ui->leWorkspace->text()); 58 this->vagoSettings->setValue("WindowWidth",ui->leWidth->text()); 59 this->vagoSettings->setValue("WindowHeight",ui->leHeight->text()); 30 60 this->vagoSettings->setValue("OniWindow",ui->cbOniWindow->isChecked()); 31 61 this->vagoSettings->setValue("SeparateInWorkspace",ui->cbSeparate->isChecked()); … … 33 63 34 64 Util::showPopUp("You need to restart the application to all changes take effect."); 65 66 QDialog::accept(); 35 67 } 36 68 -
Vago/trunk/Vago/preferences.h
r811 r897 20 20 Preferences(QWidget *parent, QSettings *vagoSettings); 21 21 ~Preferences(); 22 23 public slots: 24 void accept (); 22 25 23 26 private slots: 24 25 void on_buttonBox_accepted();26 27 27 28 void on_pbChooseWorkspace_clicked(); -
Vago/trunk/Vago/preferences.ui
r811 r897 20 20 <string>Preferences</string> 21 21 </property> 22 <layout class="QFormLayout" name="formLayout"> 23 <item row="0" column="0"> 24 <widget class="QLabel" name="label"> 25 <property name="minimumSize"> 26 <size> 27 <width>130</width> 28 <height>0</height> 29 </size> 30 </property> 31 <property name="text"> 32 <string>Vago Workspace Folder:</string> 33 </property> 34 </widget> 35 </item> 36 <item row="0" column="1"> 37 <layout class="QHBoxLayout" name="horizontalLayout"> 38 <item> 39 <widget class="QLineEdit" name="leWorkspace"/> 40 </item> 41 <item> 42 <widget class="QPushButton" name="pbChooseWorkspace"> 22 <layout class="QVBoxLayout" name="verticalLayout_2"> 23 <item> 24 <layout class="QFormLayout" name="formLayout"> 25 <item row="0" column="0"> 26 <widget class="QLabel" name="label"> 27 <property name="minimumSize"> 28 <size> 29 <width>0</width> 30 <height>0</height> 31 </size> 32 </property> 43 33 <property name="text"> 44 <string> Choose</string>34 <string>Vago Workspace Folder:</string> 45 35 </property> 46 36 </widget> 47 37 </item> 48 </layout> 49 </item> 50 <item row="1" column="0"> 51 <widget class="QLabel" name="label_2"> 52 <property name="text"> 53 <string>Anniversary Edition Folder:</string> 54 </property> 55 </widget> 56 </item> 57 <item row="1" column="1"> 58 <layout class="QHBoxLayout" name="horizontalLayout_2"> 59 <item> 60 <widget class="QLineEdit" name="leAEfolder"/> 61 </item> 62 <item> 63 <widget class="QPushButton" name="pbChooseAE"> 38 <item row="1" column="0"> 39 <widget class="QLabel" name="label_2"> 64 40 <property name="text"> 65 <string> Choose</string>41 <string>Anniversary Edition Folder:</string> 66 42 </property> 67 43 </widget> 68 44 </item> 45 <item row="2" column="0"> 46 <widget class="QLabel" name="label_3"> 47 <property name="minimumSize"> 48 <size> 49 <width>0</width> 50 <height>0</height> 51 </size> 52 </property> 53 <property name="text"> 54 <string>Default Vago Window Resolution:</string> 55 </property> 56 </widget> 57 </item> 58 <item row="0" column="1"> 59 <layout class="QHBoxLayout" name="horizontalLayout"> 60 <item> 61 <widget class="QLineEdit" name="leWorkspace"/> 62 </item> 63 <item> 64 <widget class="QPushButton" name="pbChooseWorkspace"> 65 <property name="text"> 66 <string>Choose</string> 67 </property> 68 </widget> 69 </item> 70 </layout> 71 </item> 72 <item row="1" column="1"> 73 <layout class="QHBoxLayout" name="horizontalLayout_2"> 74 <item> 75 <widget class="QLineEdit" name="leAEfolder"/> 76 </item> 77 <item> 78 <widget class="QPushButton" name="pbChooseAE"> 79 <property name="text"> 80 <string>Choose</string> 81 </property> 82 </widget> 83 </item> 84 </layout> 85 </item> 86 <item row="2" column="1"> 87 <layout class="QHBoxLayout" name="horizontalLayout_3"> 88 <item> 89 <widget class="QLineEdit" name="leWidth"> 90 <property name="placeholderText"> 91 <string>Width</string> 92 </property> 93 </widget> 94 </item> 95 <item> 96 <widget class="QLabel" name="label_4"> 97 <property name="text"> 98 <string>x</string> 99 </property> 100 </widget> 101 </item> 102 <item> 103 <widget class="QLineEdit" name="leHeight"> 104 <property name="placeholderText"> 105 <string>Height</string> 106 </property> 107 </widget> 108 </item> 109 </layout> 110 </item> 69 111 </layout> 70 112 </item> 71 <item row="2" column="0">113 <item> 72 114 <widget class="QCheckBox" name="cbOniWindow"> 73 115 <property name="text"> … … 76 118 </widget> 77 119 </item> 78 <item row="3" column="0" colspan="2">120 <item> 79 121 <widget class="QCheckBox" name="cbSeparate"> 80 122 <property name="toolTip"> … … 90 132 </widget> 91 133 </item> 92 <item row="4" column="0" colspan="2">134 <item> 93 135 <widget class="QCheckBox" name="cbVagoExit"> 94 136 <property name="text"> -
Vago/trunk/Vago/readme.txt
r800 r897 1 1 Readme.txt 2 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 Vago GUI v0. 83 Vago GUI v0.9 4 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 5 … … 37 37 ---------------------------------- 38 38 Change Log: 39 ---------------------------------- 40 0.9, 05-01-2014 41 -Updated OniSplit to 0.9.94.0 version 42 -Added option to open AE folder 43 -Redesigned the tabs of file conversions and its options (thanks paradox!) 44 -Windows version also starts with a resolution of 800x600 as Mac did before 45 -Added option in preferences to user set up the default window resolution 46 -Added option to abort conversion 47 -Textures tab: TGA made as default image type for .oni conversions 48 -Levels tab: Added option to extract only specific files from DAT files 49 -Characters tab: Added option to convert TRAM XML > TRBS ONI 50 -Characters tab: Added option to convert TRAM ONI > XML / XML & DAE 39 51 ---------------------------------- 40 52 0.8, 01-04-2012 -
Vago/trunk/Vago/resources.qrc
r790 r897 14 14 <file>sound.png</file> 15 15 <file>oni_icon_mac.png</file> 16 <file>abort.png</file> 16 17 </qresource> 17 18 <qresource prefix="/new/about"> -
Vago/trunk/Vago/soundWizard/soundpage2.ui
r790 r897 21 21 <widget class="QLabel" name="label"> 22 22 <property name="text"> 23 <string> <html>Add here the files you want to convert. All the files will have the same properties applied.<br/>Don't forget to first convert the files to an oni compatible codec. More information <a href=" ">here.</a></html></string>23 <string>Edit this text in soundpage2.cpp</string> 24 24 </property> 25 25 <property name="wordWrap"> -
Vago/trunk/Vago/soundWizard/soundpagefinal.ui
r790 r897 18 18 <widget class="QLabel" name="lbComplete"> 19 19 <property name="text"> 20 <string> <html>The wizard is now complete. The sounds have been converted. You can view all converted files clicking <a href=" ">here.</a><br /><br />Click restart to create more sounds from the wizard beggining, otherwise click finish.</html></string>20 <string>The wizard is now complete. Edit this text in soundpagefinal.cpp</string> 21 21 </property> 22 22 <property name="wordWrap"> -
Vago/trunk/Vago/util.cpp
r771 r897 101 101 if(current.trimmed().isEmpty()){ 102 102 return true; //There are empty spaces 103 } 104 } 105 return false; 106 } 107 108 bool checkIfIntegers(QStringList toCheck){ 109 foreach (QString current, toCheck){ 110 if(!isStringInteger(current)){ 111 return true; // Some aren't valid integers 103 112 } 104 113 } … … 235 244 } 236 245 237 } 246 // From here: http://stackoverflow.com/questions/17893328/qt-getting-the-screen-resolution-without-the-extended-monitor ty Chris 247 QRect getScreenResolution(){ 248 QDesktopWidget widget; 249 return widget.availableGeometry(widget.primaryScreen()); // or screenGeometry(), depending on your needs 250 } 251 252 } -
Vago/trunk/Vago/util.h
r801 r897 10 10 #include <QUrl> 11 11 #include <QCoreApplication> 12 #include <QDesktopWidget> 12 13 13 14 namespace GlobalVars{ 14 const QString AppVersion="0. 8";15 const QString AppVersion="0.9"; 15 16 const QString OniSplitString="OniSplit.exe"; 16 17 const QString XmlToolsString="xmlTools.exe"; … … 27 28 28 29 const QString AppLogName="logVago.txt"; 29 const QString BuiltOniSplitVersion="0.9. 86.0";30 const QString BuiltOniSplitVersion="0.9.94.0"; 30 31 const QString BuiltXmlToolsVersion="0.8d"; 31 32 const QString ModsDomain="mods.oni2.net"; … … 35 36 const QString VagoTemporaryDir=QDir::tempPath()+"/VagoTemp"; 36 37 const QString HelpDir="help"; 38 const int DefaultWindowWidth=800; 39 const int DefaultWindowHeight=600; 37 40 const char OniSplitProcSeparator=';'; 38 41 } … … 54 57 bool showQuestionPopUp(QWidget * parent, QString message); 55 58 bool checkEmptySpaces(QStringList toCheck); 59 bool checkIfIntegers(QStringList toCheck); 56 60 bool checkIfDoubles(QStringList toCheck); 57 61 bool isStringInteger(QString myString); … … 60 64 bool rmDir(const QString &dirPath); 61 65 bool removeDir(const QString &dirName); 66 QRect getScreenResolution(); 62 67 void showPopUp(QString message); 63 68 void showRichPopUp(QString message);
Note:
See TracChangeset
for help on using the changeset viewer.