Changeset 897 for Vago/trunk


Ignore:
Timestamp:
Jan 8, 2014, 12:32:55 PM (11 years ago)
Author:
s10k
Message:

Vago 09

Location:
Vago/trunk/Vago
Files:
1 added
19 edited

Legend:

Unmodified
Added
Removed
  • Vago/trunk/Vago/about.cpp

    r790 r897  
    2020                         "Samer/Mukade/EdT for allow me to use Jubei as icon<br />"
    2121                         "Alloc for AIE2 and support<br />"
    22                          "Paradox for Sound excel plugin and documentation<br />"
     22                         "Paradox for Sound documentation and testing<br />"
    2323                         "Wiki contributors for the documentation<br />"
    2424                         "AE contributors<br />"
  • Vago/trunk/Vago/about.ui

    r790 r897  
    5353         </property>
    5454         <property name="text">
    55           <string>&lt;html&gt;
    56 &lt;b&gt;Vago GUI&lt;/b&gt;
    57 &lt;p style=&quot;font-size:small;&quot;&gt;
    58 Written by s10k&lt;br /&gt;&lt;br/&gt;
    59 Thanks to:&lt;br/&gt;
    60 Neo for OniSplit&lt;br /&gt;
    61 EdT for testing, suggestions and icon&lt;br /&gt;
    62 demos_kratos for original OniSplit GUI&lt;br /&gt;
    63 Samer/Mukade/EdT for allow me to use Jubei as icon&lt;br /&gt;
    64 Alloc for AIE2 and support&lt;br /&gt;
    65 Paradox for Sound excel plugin and documentation&lt;br /&gt;
    66 Wiki contributors for the documentation&lt;br /&gt;
    67 AE contributors&lt;br /&gt;
    68 and in general to all OniCentral Community&lt;br /&gt;&lt;br/&gt;
    69 Also thanks to: &lt;br /&gt;
    70 StackOverflow Community&lt;br /&gt;
    71 Fabrizio Angius for PKZIP 2.0 for zip handling&lt;br /&gt;
    72 smashingmagazine for the folder icon :)&lt;br /&gt;
    73 &lt;center&gt;
    74 Visit us at:&lt;br /&gt;
    75 &lt;a href=&quot;http://oni.bungie.org&quot;&gt;
    76 oni.bungie.org
    77 &lt;/center&gt;
    78 &lt;/a&gt;
    79 &lt;/p&gt;
    80 &lt;/html&gt;</string>
     55          <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     56&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     57p, li { white-space: pre-wrap; }
     58&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     59&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;Vago GUI&lt;/span&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt; &lt;/span&gt;&lt;/p&gt;
     60&lt;p style=&quot; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Written by s10k&lt;br /&gt;&lt;br /&gt;Thanks to:&lt;br /&gt;Edit in About.cpp&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
     61&lt;p align=&quot;center&quot; style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Visit us at:&lt;br /&gt;&lt;/span&gt;&lt;a href=&quot;http://oni.bungie.org&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;oni.bungie.org &lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    8162         </property>
    8263        </widget>
  • Vago/trunk/Vago/converter.cpp

    r815 r897  
    1010void Converter::run()
    1111{
    12     QProcess *myProcess = new QProcess();
     12    this->processHasKilled=false;
     13    this->myProcess = new QProcess();
    1314    QString result = QString();
    1415    QString errorMessage = "";
    1516    int numErrors=0;
    1617
    17     myProcess->setWorkingDirectory(this->AppDir);
     18    myProcess->setWorkingDirectory(this->AppDir); // Set working directory (for work with AEI2/Mac OS)
    1819
    1920    if(this->myData->size()!=1){
     
    2324        emit setupPB(0); //Intermitent bar, we don't have any estimation when the task is done
    2425    }
    25 
    26     //myProcess->setProcessChannelMode(QProcess::MergedChannels); //we want both stdout and stderr
    2726
    2827    for(int i=0; i<this->myData->size(); i++){
     
    3736
    3837            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();
    4249
    4350            if(!result.isEmpty()){ //if(!result.startsWith("Importing",Qt::CaseSensitive) && !result.startsWith("Importing",Qt::CaseSensitive)){ //case sensitive is faster
     
    5764    }
    5865
    59     delete myProcess; //delete object and make pointer invalid
     66    delete this->myProcess; //delete object and make pointer invalid
    6067    this->myData->clear(); //clean list
    6168
     
    7178}
    7279
     80// Kill the process if requested
     81void 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  
    66
    77#include "logger.h"
    8 #include "util.h"
    9 //#include <QDebug>
    108
    119class Converter : public QThread
     
    1816    Logger *myLogger;
    1917    QStringList *myData;
     18    QProcess *myProcess;
     19    bool processHasKilled;
    2020
    2121protected:
    2222    void run(); //for thread
    2323private slots:
     24    void terminateCurrProcess();
    2425signals:
    2526    void setupPB(int numberTasks);
    2627    void taskDone();
    2728    void resultConversion(QString result, int numErrors);
     29    void conversionAborted();
    2830};
    2931
  • Vago/trunk/Vago/mainwindow.cpp

    r815 r897  
    5858        iniChanged=true;
    5959    }
     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    }
    6068    if(!this->vagoSettings->contains("OniWindow")){
    6169        this->vagoSettings->setValue("OniWindow", true);
     
    8088    this->AeLocation=this->vagoSettings->value("AeFolder").toString();
    8189    this->outputFolder=this->workspaceLocation;
     90    this->startedWindowWidth=this->vagoSettings->value("WindowWidth").toInt();
     91    this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt();
    8292
    8393    //Create our workspace if it doesn't exists yet
     
    93103    this->myBar->setMinimumWidth(150);
    94104    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);
    97109
    98110    //Initialize list pointers
     
    123135    ui->actionWindows->setChecked(false);
    124136    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 better
    126     // because the components on mac use more space
     137    // 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
    127139#else
    128     resize(640,480);
     140    //resize(640,480); // windows stuff
    129141#endif
     142
     143    resize(this->startedWindowWidth,this->startedWindowHeight);
    130144
    131145    connectSlots();
     
    135149    mapCommands();
    136150
    137     updateItemsLoaded(ui->twSourcesGeneral);
     151    updateItemsLoaded(ui->twSourcesXML);
    138152
    139153    this->myLogger->writeString("Application started.");
     
    204218}
    205219
     220void 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
    206227void MainWindow::on_cbEnvMap_toggled(bool checked)
    207228{
     
    219240}
    220241
    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     }
     242void MainWindow::on_cbSpecificFilesLevels_toggled(bool checked)
     243{
     244    ui->leSpecificFilesLevels->setEnabled(checked);
    234245}
    235246
     
    270281}
    271282
    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..."));
     283void MainWindow::on_pbAddSourceXML_clicked()
     284{
     285    addFilesSource( ui->twSourcesXML,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)"));
     286}
     287
     288void MainWindow::on_pbAddSourceTextures_clicked()
     289{
     290    addFilesSource( ui->twSourcesTextures, QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)"));
     291}
     292
     293void MainWindow::on_pbAddSourceObjects_clicked()
     294{
     295    addFilesSource( ui->twSourcesObjects,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)"));
     296}
     297
     298void MainWindow::on_pbAddSourceCharacters_clicked()
     299{
     300    addFilesSource( ui->twSourcesCharacters,QFileDialog::getOpenFileNames(this,"Choose the files...","./" , "All Files (*.*)"));
     301}
     302
     303void 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..."));
    276307    }
    277308    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    }
    300311}
    301312
     
    329340
    330341    //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"){
    332343        //check if it's a folder
    333344        foreach(QString myFile, files){
     
    381392}
    382393
    383 QString MainWindow::fileParsingGeneral(QString myOutputFolder, QString from, QString to , QString file){
     394QString MainWindow::fileParsingXML(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){
    384395
    385396    QString command;
    386397
    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
     409QString MainWindow::fileParsingTextures(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){
     410
     411    QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder;
    428412
    429413    if(ui->gbTextures->isEnabled()){ //faster than compare strings (if is DAT/ONI)
    430414
    431415        if(ui->cbMipMapsTextures->isChecked()){
    432             command+=" "+this->commandMap.value("textures->"+ui->cbMipMapsTextures->text());
     416            command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbMipMapsTextures->text());
    433417        }
    434418
    435419        if(ui->cbNoUwrap->isChecked()){
    436             command+=" "+this->commandMap.value("textures->"+ui->cbNoUwrap->text());
     420            command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbNoUwrap->text());
    437421        }
    438422
    439423        if(ui->cbNoVwrap->isChecked()){
    440             command+=" "+this->commandMap.value("textures->"+ui->cbNoVwrap->text());
     424            command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbNoVwrap->text());
    441425        }
    442426
    443427        if(ui->cbLarge->isChecked()){
    444             command+=" "+this->commandMap.value("textures->"+ui->cbLarge->text());
     428            command+=" "+this->commandMap.value(tabTitle+"->"+ui->cbLarge->text());
    445429        }
    446430
    447431        if(ui->rbBGR32->isChecked()){
    448             command+=" "+this->commandMap.value("textures->"+ui->rbBGR32->text());
     432            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGR32->text());
    449433        }
    450434        else if(ui->rbBGRA32->isChecked()){
    451             command+=" "+this->commandMap.value("textures->"+ui->rbBGRA32->text());
     435            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA32->text());
    452436        }
    453437        else if(ui->rbBGR555->isChecked()){
    454             command+=" "+this->commandMap.value("textures->"+ui->rbBGR555->text());
     438            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGR555->text());
    455439        }
    456440        else if(ui->rbBGRA5551->isChecked()){
    457             command+=" "+this->commandMap.value("textures->"+ui->rbBGRA5551->text());
     441            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA5551->text());
    458442        }
    459443        else if(ui->rbBGRA444->isChecked()){
    460             command+=" "+this->commandMap.value("textures->"+ui->rbBGRA444->text());
     444            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbBGRA444->text());
    461445        }
    462446        else{ //dxt1 checked
    463             command+=" "+this->commandMap.value("textures->"+ui->rbDxt1->text());
     447            command+=" "+this->commandMap.value(tabTitle+"->"+ui->rbDxt1->text());
    464448        }
    465449
     
    469453                return "";
    470454            }
    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);
    472456        }
    473457    }
     
    476460}
    477461
    478 QString MainWindow::fileParsingModels(QString myOutputFolder, QString from, QString to , QString file){
    479 
    480     QString command=this->commandMap.value("models->"+from+"->"+to)+" "+myOutputFolder;
     462QString 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
     488QString MainWindow::fileParsingObjects(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){
     489
     490    QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder;
    481491
    482492    //TODO: This can be optimized. When some are not enable others are.
    483493    if(ui->cbTexture->isChecked()){
    484494        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.");
    486496            return "";
    487497        }
    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    }
    508512
    509513    return command+=" "+file; //add source
    510514}
    511515
    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){
     516QString MainWindow::fileParsingLevels(QString tabTitle, QString myOutputFolder, QString from, QString to , QString file){
    531517
    532518    QString datName, command;
    533519
    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
    539538        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
    540544        if(ui->cbDatLevels->isChecked()){
    541545            if(ui->leTargetDatLevels->text().isEmpty()){
     
    549553        }
    550554        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            }
    559577        }
    560578    }
     
    582600        //parse all files (separated by spaces)
    583601        while(true){
    584             nextIndex=additionalFiles.indexOf(" ",currentIndex+1);
     602            nextIndex=additionalFiles.indexOf(";",currentIndex+1);
    585603
    586604            command += " "+Util::normalizeAndQuote(additionalFiles.mid(currentIndex,(nextIndex-currentIndex)));
     
    594612
    595613    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;
    597615    }
    598616
     
    623641}
    624642
    625 void MainWindow::on_pbConvertGeneral_clicked()
    626 {
    627     startConversion(ui->twSourcesGeneral);
     643void MainWindow::on_pbConvertXML_clicked()
     644{
     645    startConversion(ui->twSourcesXML);
    628646}
    629647
     
    633651}
    634652
    635 void MainWindow::on_pbConvertModels_clicked()
    636 {
    637     startConversion(ui->twSourcesModels);
    638 }
    639 
    640 void MainWindow::on_pbConvertAnimations_clicked()
    641 {
    642     startConversion(ui->twSourcesAnimations);
     653void MainWindow::on_pbConvertObjects_clicked()
     654{
     655    startConversion(ui->twSourcesObjects);
     656}
     657
     658void MainWindow::on_pbConvertCharacters_clicked()
     659{
     660    startConversion(ui->twSourcesCharacters);
    643661}
    644662
     
    668686    }
    669687
    670     if(myBar->isVisible()){
     688    if(this->myBar->isVisible()){
    671689        Util::showErrorPopUp("Another conversion is progress. Please wait until it finishes.");
    672690        return;
     
    687705    this->myBar->show();
    688706    this->myBar->setMaximum(max);
     707    ui->tbAbortConversion->show();
    689708}
    690709
     
    696715    QApplication::alert(this); //Show a notification if window is not active
    697716    this->myBar->hide();
     717    ui->tbAbortConversion->hide();
    698718
    699719    if(numErrors!=0){
     
    714734}
    715735
     736void MainWindow::TconversionAborted(){
     737    this->myBar->hide();
     738    ui->tbAbortConversion->hide();
     739
     740    showErrStatusMessage("Conversion was aborted.");
     741}
     742
    716743void MainWindow::showErrStatusMessage(QString message){
    717744
     
    733760
    734761void 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");
    742765    //######################General Options
    743     this->commandMap.insert("general->"+ui->cbTRAMGeneral->text(),"-anim-body:");
     766
    744767    //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");
    749770
    750771    ////////////////////////////////////////////////////////////////////////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");
    756777    //######################Textures Options
    757778    this->commandMap.insert("textures->"+ui->rbBGR32->text(),"-format:bgr32");
     
    767788    this->commandMap.insert("textures->"+ui->cbEnvMap->text(),"-envmap:");
    768789    //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 Commands
    776     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 Options
    781     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 dynamic
     790    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");
    786807    //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:");
    798825    //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
    802833
    803834    ////////////////////////////////////////////////////////////////////////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");
    806841    this->commandMap.insert("levels->MASTER XML->DAT","-create:level");
    807842    this->commandMap.insert("levels->MASTER XML->ONI FILES","-create:level");
     
    809844    this->commandMap.insert("levels->"+ui->cbGridsLevels->text(),"-grid:create");
    810845    //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");
    813850    this->commandMap.insertMulti("levels->MASTER XML","DAT");
    814851    this->commandMap.insertMulti("levels->MASTER XML","ONI FILES");
    815852
    816853    ////////////////////////////////////////////////////////////////////////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");
    822859    //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
     868void MainWindow::on_cbFromXML_currentIndexChanged(const QString &arg1)
     869{
     870    updateComboBox(arg1, ui->cbToXML);
     871}
     872
    835873
    836874void MainWindow::on_cbFromTextures_currentIndexChanged(const QString &arg1)
     
    844882    }
    845883
    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
     887void 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
     904void MainWindow::on_cbFromCharacters_currentIndexChanged(const QString &arg1)
     905{
     906    ui->cbWithTRBS_ONCC->setEnabled(false);
     907    ui->cbWithTRBS_ONCC->setChecked(false);
    852908    ui->cbCellShading->setEnabled(false);
    853909    ui->cbCellShading->setChecked(false);
    854910    ui->cbNormals->setEnabled(false);
    855911    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);
    865918        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);
    885922}
    886923
    887924void MainWindow::on_cbFromLevels_currentIndexChanged(const QString &arg1)
    888925{
    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);
    1063929    ui->cbDatLevels->setEnabled(false);
    1064930    ui->cbDatLevels->setChecked(false);
     
    1070936    ui->cbGridsLevels->setChecked(false);
    1071937
     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
     952void MainWindow::on_cbFromMisc_currentIndexChanged(const QString &arg1)
     953{
     954    updateComboBox(arg1, ui->cbToMisc);
     955}
     956
     957void 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
     974void MainWindow::on_actionWindows_triggered()
     975{
     976    ui->actionWindows->setChecked(true);
     977    ui->actionMac_Windows_demo->setChecked(false);
     978}
     979
     980void MainWindow::on_actionMac_Windows_demo_triggered()
     981{
     982    ui->actionMac_Windows_demo->setChecked(true);
     983    ui->actionWindows->setChecked(false);
     984}
     985
     986void MainWindow::on_pbRemoveSourceXML_clicked()
     987{
     988    removeTableContents( ui->twSourcesXML);
     989}
     990
     991void MainWindow::on_pbRemoveSourceTextures_clicked()
     992{
     993    removeTableContents(ui->twSourcesTextures);
     994}
     995
     996void MainWindow::on_pbRemoveSourceObjects_clicked()
     997{
     998    removeTableContents(ui->twSourcesObjects);
     999}
     1000
     1001void MainWindow::on_pbRemoveSourceCharacters_clicked()
     1002{
     1003    removeTableContents(ui->twSourcesCharacters);
     1004}
     1005
     1006void MainWindow::on_pbRemoveSourceLevels_clicked()
     1007{
     1008    removeTableContents(ui->twSourcesLevels);
     1009}
     1010
     1011void MainWindow::on_pbRemoveSourceMisc_clicked()
     1012{
     1013    removeTableContents(ui->twSourcesMisc);
     1014}
     1015
     1016void MainWindow::on_pbClearSourcesXML_clicked()
     1017{
     1018    clearTableContents(ui->twSourcesXML);
     1019}
     1020
     1021void MainWindow::on_pbClearSourcesTextures_clicked()
     1022{
     1023    clearTableContents(ui->twSourcesTextures);
     1024}
     1025
     1026void MainWindow::on_pbClearSourcesObjects_clicked()
     1027{
     1028    clearTableContents(ui->twSourcesObjects);
     1029}
     1030
     1031void MainWindow::on_pbClearSourcesCharacters_clicked()
     1032{
     1033    clearTableContents(ui->twSourcesCharacters);
     1034}
     1035
     1036void MainWindow::on_pbClearSourcesLevels_clicked()
     1037{
     1038    clearTableContents(ui->twSourcesLevels);
     1039}
     1040
     1041void MainWindow::on_pbClearSourcesMisc_clicked()
     1042{
     1043    clearTableContents(ui->twSourcesMisc);
     1044}
     1045
     1046void 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
     1063void 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
     1077void 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
     1085void 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
     1093void MainWindow::on_cbToLevels_currentIndexChanged(const QString &arg1)
     1094{
     1095
    10721096    if(ui->cbFromLevels->currentText()=="MASTER XML" && arg1=="DAT"){
    10731097        ui->cbDatLevels->setEnabled(true);
    10741098    }
    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
    10951104}
    10961105
     
    11331142}
    11341143
     1144void MainWindow::on_cbWithTRBS_ONCC_toggled(bool checked)
     1145{
     1146    ui->leTRBS_ONCC->setEnabled(checked);
     1147}
     1148
    11351149void MainWindow::on_actionCheck_OniSplit_version_triggered()
    11361150{
     
    11611175{
    11621176    if(arg1.compare("General",Qt::CaseSensitive)==0){ //case sentive is faster
    1163         updateItemsLoaded(ui->twSourcesGeneral);
     1177        updateItemsLoaded(ui->twSourcesXML);
    11641178    }
    11651179    else if(arg1.compare("Textures",Qt::CaseSensitive)==0){
    11661180        updateItemsLoaded(ui->twSourcesTextures);
    11671181    }
    1168     else if(arg1.compare("Models",Qt::CaseSensitive)==0){
    1169         updateItemsLoaded(ui->twSourcesModels);
     1182    else if(arg1.compare("Objects",Qt::CaseSensitive)==0){
     1183        updateItemsLoaded(ui->twSourcesObjects);
    11701184    }
    11711185    else if(arg1.compare("Levels",Qt::CaseSensitive)==0){
     
    12301244}
    12311245
     1246void MainWindow::on_actionOpen_AE_folder_triggered()
     1247{
     1248    QDesktopServices::openUrl(QUrl("file:///"+this->AeLocation));
     1249}
     1250
    12321251QString MainWindow::getTypeConversion(DropTableWidget *myTable){
    12331252    QString from,to;
    12341253
    1235     if(myTable==ui->twSourcesGeneral){
    1236         from=ui->cbFromGeneral->currentText();
    1237         to=ui->cbToGeneral->currentText();
     1254    if(myTable==ui->twSourcesXML){
     1255        from=ui->cbFromXML->currentText();
     1256        to=ui->cbToXML->currentText();
    12381257    }
    12391258    else if(myTable==ui->twSourcesTextures){
     
    12411260        to=ui->cbToTextures->currentText();
    12421261    }
    1243     else if(myTable==ui->twSourcesModels){
    1244         from=ui->cbFromModels->currentText();
    1245         to=ui->cbToModels->currentText();
    1246     }
    1247     else if(myTable==ui->twSourcesAnimations){
    1248         from=ui->cbFromAnimations->currentText();
    1249         to=ui->cbToAnimations->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();
    12501269    }
    12511270    else if(myTable==ui->twSourcesLevels){
     
    14731492
    14741493QString 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);
    14771499    }
    14781500    else if(myTable==ui->twSourcesTextures){
    1479         return fileParsingTextures(myOutputFolder,from,to,file);
    1480     }
    1481     else if(myTable==ui->twSourcesModels){
    1482         return fileParsingModels(myOutputFolder,from,to,file);
    1483     }
    1484     else if(myTable==ui->twSourcesAnimations){
    1485         return fileParsingAnimations(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);
    14861508    }
    14871509    else if(myTable==ui->twSourcesLevels){
    1488         return fileParsingLevels(myOutputFolder,from,to,file);
     1510        return fileParsingLevels(tabTitle, myOutputFolder,from,to,file);
    14891511    }
    14901512    else{
     
    14981520  **/
    14991521void MainWindow::setConverterButtonsSize(){
    1500     int height=ui->pbConvertGeneral->sizeHint().height()*1.3;
    1501     ui->pbConvertGeneral->setMinimumHeight(height);
     1522    int height=ui->pbConvertXML->sizeHint().height()*1.3;
     1523    ui->pbConvertXML->setMinimumHeight(height);
    15021524    ui->pbConvertTextures->setMinimumHeight(height);
    1503     ui->pbConvertModels->setMinimumHeight(height);
    1504     ui->pbConvertAnimations->setMinimumHeight(height);
     1525    ui->pbConvertObjects->setMinimumHeight(height);
     1526    ui->pbConvertCharacters->setMinimumHeight(height);
    15051527    ui->pbConvertLevels->setMinimumHeight(height);
    15061528    ui->pbConvertMisc->setMinimumHeight(height);
     
    15351557    connect(myConverter, SIGNAL(resultConversion(QString,int)), this, SLOT(TresultConversion(QString,int)));
    15361558
     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
    15371565    //Drop signal for General table
    1538     connect(ui->twSourcesGeneral, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));
     1566    connect(ui->twSourcesXML, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));
    15391567
    15401568    //Drop signal for Textures table
    15411569    connect(ui->twSourcesTextures, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));
    15421570
    1543     //Drop signal for Models table
    1544     connect(ui->twSourcesModels, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addFilesSource(DropTableWidget*,QStringList)));
    1545 
    1546     //Drop signal for Animations table
    1547     connect(ui->twSourcesAnimations, 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)));
    15481576
    15491577    //Drop signal for Levels table
     
    15541582
    15551583    //Context menu for General table
    1556     connect(ui->twSourcesGeneral, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));
     1584    connect(ui->twSourcesXML, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));
    15571585
    15581586    //Context menu for Textures table
    15591587    connect(ui->twSourcesTextures, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));
    15601588
    1561     //Context menu for Models table
    1562     connect(ui->twSourcesModels, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));
    1563 
    1564     //Context menu for Animations table
    1565     connect(ui->twSourcesAnimations, 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*)));
    15661594
    15671595    //Context menu for Levels table
     
    15711599    connect(ui->twSourcesMisc, SIGNAL(dtContextMenu(DropTableWidget*,QContextMenuEvent*)), this, SLOT(dtContextMenu(DropTableWidget*,QContextMenuEvent*)));
    15721600}
    1573 
    1574 
  • Vago/trunk/Vago/mainwindow.h

    r811 r897  
    6565    void on_actionCheck_For_Updates_triggered();
    6666
    67     void on_pbAddSourceGeneral_clicked();
    68 
    69     void on_pbConvertGeneral_clicked();
     67    void on_pbAddSourceXML_clicked();
     68
     69    void on_pbConvertXML_clicked();
    7070
    7171    void TsetupProgressBar(int max);
     
    7575    void TresultConversion(QString result, int numErrors);
    7676
    77     void on_cbFromGeneral_currentIndexChanged(const QString &arg1);
     77    void TconversionAborted();
    7878
    7979    void on_actionWindows_triggered();
     
    8181    void on_actionMac_Windows_demo_triggered();
    8282
    83     void on_pbClearSourcesGeneral_clicked();
    84 
    85     void on_pbRemoveSourceGeneral_clicked();
     83    void on_pbClearSourcesXML_clicked();
     84
     85    void on_pbRemoveSourceXML_clicked();
    8686
    8787    void on_pbAddSourceTextures_clicked();
     
    9393    void on_cbFromTextures_currentIndexChanged(const QString &arg1);
    9494
    95     void on_cbFromModels_currentIndexChanged(const QString &arg1);
     95    void on_cbFromObjects_currentIndexChanged(const QString &arg1);
    9696
    9797    void on_cbFromLevels_currentIndexChanged(const QString &arg1);
     
    9999    void on_cbFromMisc_currentIndexChanged(const QString &arg1);
    100100
    101     void on_pbAddSourceModels_clicked();
     101    void on_pbAddSourceObjects_clicked();
    102102
    103103    void on_pbAddSourceLevels_clicked();
     
    107107    void on_pbConvertTextures_clicked();
    108108
    109     void on_pbConvertModels_clicked();
     109    void on_pbConvertObjects_clicked();
    110110
    111111    void on_pbConvertLevels_clicked();
     
    113113    void on_pbConvertMisc_clicked();
    114114
    115     void on_pbRemoveSourceModels_clicked();
     115    void on_pbRemoveSourceObjects_clicked();
    116116
    117117    void on_pbRemoveSourceLevels_clicked();
     
    119119    void on_pbRemoveSourceMisc_clicked();
    120120
    121     void on_pbClearSourcesModels_clicked();
     121    void on_pbClearSourcesObjects_clicked();
    122122
    123123    void on_pbClearSourcesLevels_clicked();
     
    127127    void on_actionPreferences_triggered();
    128128
    129     void on_cbToGeneral_currentIndexChanged(const QString &arg1);
    130 
    131129    void on_cbToLevels_currentIndexChanged(const QString &arg1);
    132130
    133     void on_cbDatGeneral_toggled(bool checked);
    134 
    135131    void on_cbDatLevels_toggled(bool checked);
    136132
     
    141137    void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets
    142138
    143     void on_cbTRAMGeneral_toggled(bool checked);
    144 
    145139    void on_tabWidget_selected(const QString &arg1);
    146140
     
    159153    void on_actionView_log_triggered();
    160154
    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);
    162174
    163175    void on_cbWithAnimation_toggled(bool checked);
    164176
    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();
    184182
    185183private:
     
    191189    QString outputFolder; //Output folder
    192190    QString AeLocation; //Workspace location
     191    int startedWindowWidth;
     192    int startedWindowHeight;
    193193    QLabel *itemsLoaded;
    194194    QProgressBar *myBar; //Progress Bar
     
    206206    void clearTableContents(DropTableWidget *myTable);
    207207    void removeTableContents(DropTableWidget *myTable);
    208     void updateComboBox(const QString &arg1, QComboBox *comboBox, const QString &identifier);
     208    void updateComboBox(const QString &arg1, QComboBox *comboBox);
    209209    void startConversion(DropTableWidget *myTable);
    210210    void updateItemsLoaded(DropTableWidget *currentTable);
     
    213213    void setConverterButtonsSize();
    214214    QString getFileOutputFolder(QString fromTo, QString myOutputFolder="");
    215     QString fileParsingGeneral(QString myOutputFolder, QString from, QString to , QString file);
    216     QString fileParsingTextures(QString myOutputFolder, QString from, QString to , QString file);
    217     QString fileParsingModels(QString myOutputFolder, QString from, QString to , QString file);
    218     QString fileParsingAnimations(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);
    220220    QString fileParsingMisc(QString myOutputFolder, QString from, QString to , QString file);
    221221    QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file);
    222222    QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table
    223223    QString getOSIndependentAppPath();
     224
     225signals:
     226    void terminateCurrProcess();
    224227};
    225228
  • Vago/trunk/Vago/mainwindow.ui

    r796 r897  
    77    <x>0</x>
    88    <y>0</y>
    9     <width>640</width>
    10     <height>480</height>
     9    <width>800</width>
     10    <height>600</height>
    1111   </rect>
    1212  </property>
     
    2323     <layout class="QHBoxLayout" name="horizontalLayout_10">
    2424      <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>
    2542       <widget class="QToolButton" name="tbOpenFolder">
    2643        <property name="toolTip">
     
    156173      <widget class="QWidget" name="tabGeneral">
    157174       <attribute name="title">
    158         <string>General</string>
     175        <string>XML</string>
    159176       </attribute>
    160177       <layout class="QVBoxLayout" name="verticalLayout_18">
     
    177194            </item>
    178195            <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">
    185197              <item>
    186198               <property name="text">
     
    213225            </item>
    214226            <item>
    215              <widget class="QComboBox" name="cbToGeneral">
    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>
    219231               </property>
    220232              </item>
     
    228240         <layout class="QHBoxLayout" name="horizontalLayout_11">
    229241          <item>
    230            <widget class="QGroupBox" name="gbSourcesGeneral">
     242           <widget class="QGroupBox" name="gbSourcesXML">
    231243            <property name="title">
    232244             <string>Sources</string>
     
    234246            <layout class="QHBoxLayout" name="horizontalLayout_13">
    235247             <item>
    236               <widget class="DropTableWidget" name="twSourcesGeneral"/>
     248              <widget class="DropTableWidget" name="twSourcesXML"/>
    237249             </item>
    238250             <item>
    239251              <layout class="QVBoxLayout" name="verticalLayout_10">
    240252               <item>
    241                 <widget class="QPushButton" name="pbAddSourceGeneral">
     253                <widget class="QPushButton" name="pbAddSourceXML">
    242254                 <property name="minimumSize">
    243255                  <size>
     
    252264               </item>
    253265               <item>
    254                 <widget class="QPushButton" name="pbRemoveSourceGeneral">
     266                <widget class="QPushButton" name="pbRemoveSourceXML">
    255267                 <property name="text">
    256268                  <string>Remove</string>
     
    259271               </item>
    260272               <item>
    261                 <widget class="QPushButton" name="pbClearSourcesGeneral">
     273                <widget class="QPushButton" name="pbClearSourcesXML">
    262274                 <property name="text">
    263275                  <string>Clear</string>
     
    273285        </item>
    274286        <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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
    318 &lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
    319 p, li { white-space: pre-wrap; }
    320 &lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
    321 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;Extract an ONCC with another character's TRAM&lt;/span&gt;&lt;/p&gt;
    322 &lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt; font-weight:600;&quot;&gt;For example extract Konoko's ONCC with Muro's TRAM&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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 TRAM
    336 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>
    347287         <widget class="Line" name="line_3">
    348288          <property name="orientation">
     
    352292        </item>
    353293        <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>
    355301          <property name="text">
    356302           <string>Convert</string>
     
    386332              <item>
    387333               <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>
    394340               </property>
    395341              </item>
     
    417363              <item>
    418364               <property name="text">
     365                <string>TGA</string>
     366               </property>
     367              </item>
     368              <item>
     369               <property name="text">
    419370                <string>DDS</string>
    420                </property>
    421               </item>
    422               <item>
    423                <property name="text">
    424                 <string>TGA</string>
    425371               </property>
    426372              </item>
     
    631577       </layout>
    632578      </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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     736&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     737p, li { white-space: pre-wrap; }
     738&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     739&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Extract a TRAM (animation) with character's TRBS / ONCC&lt;/p&gt;
     740&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;For example extract a Muro's TRAM  with Konoko's ONCC&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     754&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     755p, li { white-space: pre-wrap; }
     756&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     757&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Extract a TRAM (animation) with character's TRBS / ONCC&lt;/p&gt;
     758&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;For example extract a Muro's TRAM  with Konoko's ONCC&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>
    633790      <widget class="QWidget" name="tabModels">
    634791       <attribute name="title">
    635         <string>Models</string>
     792        <string>Objects</string>
    636793       </attribute>
    637        <layout class="QVBoxLayout" name="verticalLayout_25">
     794       <layout class="QVBoxLayout" name="verticalLayout_2">
    638795        <item>
    639796         <layout class="QHBoxLayout" name="horizontalLayout_26">
     
    654811            </item>
    655812            <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>
    660827               </property>
    661828              </item>
     
    663830               <property name="text">
    664831                <string>OBJ</string>
    665                </property>
    666               </item>
    667               <item>
    668                <property name="text">
    669                 <string>DAE</string>
    670832               </property>
    671833              </item>
     
    690852            </item>
    691853            <item>
    692              <widget class="QComboBox" name="cbToModels">
     854             <widget class="QComboBox" name="cbToObjects">
    693855              <item>
    694856               <property name="text">
     
    714876          <layout class="QHBoxLayout" name="horizontalLayout_16">
    715877           <item>
    716             <widget class="DropTableWidget" name="twSourcesModels"/>
     878            <widget class="DropTableWidget" name="twSourcesObjects"/>
    717879           </item>
    718880           <item>
    719881            <layout class="QVBoxLayout" name="verticalLayout_11">
    720882             <item>
    721               <widget class="QPushButton" name="pbAddSourceModels">
     883              <widget class="QPushButton" name="pbAddSourceObjects">
    722884               <property name="minimumSize">
    723885                <size>
     
    732894             </item>
    733895             <item>
    734               <widget class="QPushButton" name="pbRemoveSourceModels">
     896              <widget class="QPushButton" name="pbRemoveSourceObjects">
    735897               <property name="text">
    736898                <string>Remove</string>
     
    739901             </item>
    740902             <item>
    741               <widget class="QPushButton" name="pbClearSourcesModels">
     903              <widget class="QPushButton" name="pbClearSourcesObjects">
    742904               <property name="text">
    743905                <string>Clear</string>
     
    751913        </item>
    752914        <item>
    753          <widget class="QGroupBox" name="gbModels">
     915         <widget class="QGroupBox" name="gbAnimations">
    754916          <property name="title">
    755917           <string>Options</string>
    756918          </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&gt;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&gt;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.
    819927It's the name of a TXMP.oni file, don't include the extension.</string>
    820                  </property>
    821                  <property name="text">
    822                   <string>Texture:</string>
    823                  </property>
    824                 </widget>
    825                </item>
    826                <item>
    827                 <widget class="QLineEdit" name="leTextureName">
    828                  <property name="enabled">
    829                   <bool>false</bool>
    830                  </property>
    831                  <property name="toolTip">
    832                   <string>Give model a texture.
     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.
    833941It'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.
     958It'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.
     972It'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>
    843978           </item>
    844979          </layout>
     
    853988        </item>
    854989        <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">
    1040991          <property name="minimumSize">
    1041992           <size>
     
    10551006        <string>Levels</string>
    10561007       </attribute>
    1057        <layout class="QVBoxLayout" name="verticalLayout_31">
     1008       <layout class="QVBoxLayout" name="verticalLayout_5">
    10581009        <item>
    10591010         <layout class="QHBoxLayout" name="horizontalLayout_28">
     
    10771028              <item>
    10781029               <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>
    10801046               </property>
    10811047              </item>
     
    10831049               <property name="text">
    10841050                <string>DAE</string>
    1085                </property>
    1086               </item>
    1087               <item>
    1088                <property name="text">
    1089                 <string>MASTER XML</string>
    10901051               </property>
    10911052              </item>
     
    11131074              <item>
    11141075               <property name="text">
    1115                 <string>DAE</string>
     1076                <string>ONI FILES</string>
    11161077               </property>
    11171078              </item>
     
    11731134           <string>Options</string>
    11741135          </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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     1152&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     1153p, li { white-space: pre-wrap; }
     1154&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     1155&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Extract specific files oni files from the DAT file&lt;/span&gt;&lt;/p&gt;
     1156&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
     1157&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Example of input:&lt;/span&gt;&lt;/p&gt;
     1158&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;AKEVEnvWarehouse&lt;/span&gt;&lt;/p&gt;
     1159&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This will extract only the file AKEVEnvWarehouse.oni from the dat.&lt;/span&gt;&lt;/p&gt;
     1160&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
     1161&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can extract multiple files using wildcards e.g.: &lt;/span&gt;&lt;/p&gt;
     1162&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;M3GM* &lt;/span&gt;&lt;/p&gt;
     1163&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This will extract all files which begin with M3GM. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     1177&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     1178p, li { white-space: pre-wrap; }
     1179&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     1180&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Extract specific files oni files from the DAT file&lt;/span&gt;&lt;/p&gt;
     1181&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
     1182&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Example of input:&lt;/span&gt;&lt;/p&gt;
     1183&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;AKEVEnvWarehouse&lt;/span&gt;&lt;/p&gt;
     1184&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This will extract only the file AKEVEnvWarehouse.oni from the dat.&lt;/span&gt;&lt;/p&gt;
     1185&lt;p style=&quot;-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;&quot;&gt;&lt;/p&gt;
     1186&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;You can extract multiple files using wildcards e.g.: &lt;/span&gt;&lt;/p&gt;
     1187&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;M3GM* &lt;/span&gt;&lt;/p&gt;
     1188&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;This will extract all files which begin with M3GM. &lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</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>
    11761200           <item>
    11771201            <layout class="QHBoxLayout" name="horizontalLayout_27">
     
    11831207               <property name="minimumSize">
    11841208                <size>
    1185                  <width>115</width>
     1209                 <width>122</width>
    11861210                 <height>0</height>
    11871211                </size>
     
    12221246              </widget>
    12231247             </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>
    12241261            </layout>
    12251262           </item>
    12261263           <item>
    1227             <layout class="QHBoxLayout" name="horizontalLayout_31">
     1264            <layout class="QHBoxLayout" name="horizontalLayout_2">
    12281265             <item>
    12291266              <widget class="QCheckBox" name="cbAdditionalSourcesLevels">
     
    12311268                <bool>false</bool>
    12321269               </property>
     1270               <property name="minimumSize">
     1271                <size>
     1272                 <width>122</width>
     1273                 <height>0</height>
     1274                </size>
     1275               </property>
    12331276               <property name="text">
    12341277                <string>Additional Sources:</string>
     
    12421285               </property>
    12431286               <property name="toolTip">
    1244                 <string>Use &quot;space&quot; as separator for each file</string>
     1287                <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     1288&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     1289p, li { white-space: pre-wrap; }
     1290&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     1291&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Use &amp;quot;;&amp;quot; as separator for each file&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    12451292               </property>
    12461293               <property name="placeholderText">
    12471294                <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>
    12611295               </property>
    12621296              </widget>
     
    13151349              <item>
    13161350               <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>
    13181357               </property>
    13191358              </item>
     
    13571396               <property name="text">
    13581397                <string>AIF</string>
    1359                </property>
    1360               </item>
    1361               <item>
    1362                <property name="text">
    1363                 <string>TXT</string>
    13641398               </property>
    13651399              </item>
     
    14441478     <x>0</x>
    14451479     <y>0</y>
    1446      <width>640</width>
     1480     <width>800</width>
    14471481     <height>21</height>
    14481482    </rect>
     
    14851519    <addaction name="menuOutput_directly_to"/>
    14861520    <addaction name="separator"/>
     1521    <addaction name="actionOpen_AE_folder"/>
    14871522    <addaction name="actionView_log"/>
    14881523   </widget>
     
    16191654   </property>
    16201655  </action>
     1656  <action name="actionOpen_AE_folder">
     1657   <property name="text">
     1658    <string>Open AE folder</string>
     1659   </property>
     1660  </action>
    16211661 </widget>
    16221662 <layoutdefault spacing="6" margin="11"/>
  • Vago/trunk/Vago/packageWizard/packagepage2.ui

    r811 r897  
    245245    <widget class="QLabel" name="lbFieldsReadOnly">
    246246     <property name="text">
    247       <string>&lt;html&gt;&lt;span style=&quot; color:#0000ff;&quot;&gt;* Fields read only  by AEI2 when the package isn't at the mod depot.&lt;/span&gt;&lt;/html&gt;</string>
     247      <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     248&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     249p, li { white-space: pre-wrap; }
     250&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     251&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; color:#0000ff;&quot;&gt;* Edit this text in packagepage2.cpp&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    248252     </property>
    249253     <property name="wordWrap">
  • Vago/trunk/Vago/packageWizard/packagepage4.ui

    r790 r897  
    2828         </property>
    2929         <property name="text">
    30           <string>&lt;html&gt;&lt;b&gt;Common&lt;/b&gt;&lt;/html&gt;</string>
     30          <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
     31&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
     32p, li { white-space: pre-wrap; }
     33&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
     34&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Common [edit this text in packagepage4.cpp]&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
    3135         </property>
    3236        </widget>
  • Vago/trunk/Vago/packageWizard/packagepagefinal.ui

    r792 r897  
    1818    <widget class="QLabel" name="lbComplete">
    1919     <property name="text">
    20       <string>&lt;html&gt;
    21 The wizard is now complete. The package will be created when you click in finish.&lt;br/&gt;
    22 After that you can upload the package to &lt;a href=&quot;www.mods.oni2.net&quot;&gt;mods.oni2.net&lt;/a&gt; to get your mod listed in the AEI.
    23 &lt;/html&gt;</string>
     20      <string>The wizard is now complete. Edit this text in packagepagefinal.cpp</string>
    2421     </property>
    2522     <property name="wordWrap">
  • Vago/trunk/Vago/preferences.cpp

    r771 r897  
    1313    ui->leAEfolder->setText(this->vagoSettings->value("AeFolder").toString());
    1414    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());
    1517    ui->cbOniWindow->setChecked(this->vagoSettings->value("OniWindow").toBool());
    1618    ui->cbSeparate->setChecked(this->vagoSettings->value("SeparateInWorkspace").toBool());
     
    2426}
    2527
    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
     30void 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
    2856    this->vagoSettings->setValue("AeFolder",ui->leAEfolder->text());
    2957    this->vagoSettings->setValue("Workspace",ui->leWorkspace->text());
     58    this->vagoSettings->setValue("WindowWidth",ui->leWidth->text());
     59    this->vagoSettings->setValue("WindowHeight",ui->leHeight->text());
    3060    this->vagoSettings->setValue("OniWindow",ui->cbOniWindow->isChecked());
    3161    this->vagoSettings->setValue("SeparateInWorkspace",ui->cbSeparate->isChecked());
     
    3363
    3464    Util::showPopUp("You need to restart the application to all changes take effect.");
     65
     66    QDialog::accept();
    3567}
    3668
  • Vago/trunk/Vago/preferences.h

    r811 r897  
    2020    Preferences(QWidget *parent, QSettings *vagoSettings);
    2121    ~Preferences();
     22
     23public slots:
     24    void accept ();
    2225   
    2326private slots:
    24 
    25     void on_buttonBox_accepted();
    2627
    2728    void on_pbChooseWorkspace_clicked();
  • Vago/trunk/Vago/preferences.ui

    r811 r897  
    2020      <string>Preferences</string>
    2121     </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>
    4333          <property name="text">
    44            <string>Choose</string>
     34           <string>Vago Workspace Folder:</string>
    4535          </property>
    4636         </widget>
    4737        </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">
    6440          <property name="text">
    65            <string>Choose</string>
     41           <string>Anniversary Edition Folder:</string>
    6642          </property>
    6743         </widget>
    6844        </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>
    69111       </layout>
    70112      </item>
    71       <item row="2" column="0">
     113      <item>
    72114       <widget class="QCheckBox" name="cbOniWindow">
    73115        <property name="text">
     
    76118       </widget>
    77119      </item>
    78       <item row="3" column="0" colspan="2">
     120      <item>
    79121       <widget class="QCheckBox" name="cbSeparate">
    80122        <property name="toolTip">
     
    90132       </widget>
    91133      </item>
    92       <item row="4" column="0" colspan="2">
     134      <item>
    93135       <widget class="QCheckBox" name="cbVagoExit">
    94136        <property name="text">
  • Vago/trunk/Vago/readme.txt

    r800 r897  
    11Readme.txt
    22~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 Vago GUI v0.8
     3Vago GUI v0.9
    44~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    55
     
    3737----------------------------------
    3838Change Log:
     39----------------------------------
     400.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
    3951----------------------------------
    40520.8, 01-04-2012
  • Vago/trunk/Vago/resources.qrc

    r790 r897  
    1414        <file>sound.png</file>
    1515        <file>oni_icon_mac.png</file>
     16        <file>abort.png</file>
    1617    </qresource>
    1718    <qresource prefix="/new/about">
  • Vago/trunk/Vago/soundWizard/soundpage2.ui

    r790 r897  
    2121    <widget class="QLabel" name="label">
    2222     <property name="text">
    23       <string>&lt;html&gt;Add here the files you want to convert. All the files will have the same properties applied.&lt;br/&gt;Don't forget to first convert the files to an oni compatible codec. More information &lt;a href=&quot; &quot;&gt;here.&lt;/a&gt;&lt;/html&gt;</string>
     23      <string>Edit this text in soundpage2.cpp</string>
    2424     </property>
    2525     <property name="wordWrap">
  • Vago/trunk/Vago/soundWizard/soundpagefinal.ui

    r790 r897  
    1818    <widget class="QLabel" name="lbComplete">
    1919     <property name="text">
    20       <string>&lt;html&gt;The wizard is now complete. The sounds have been converted. You can view all converted files clicking &lt;a href=&quot; &quot;&gt;here.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click restart to create more sounds from the wizard beggining, otherwise click finish.&lt;/html&gt;</string>
     20      <string>The wizard is now complete. Edit this text in soundpagefinal.cpp</string>
    2121     </property>
    2222     <property name="wordWrap">
  • Vago/trunk/Vago/util.cpp

    r771 r897  
    101101        if(current.trimmed().isEmpty()){
    102102            return true; //There are empty spaces
     103        }
     104    }
     105    return false;
     106}
     107
     108bool checkIfIntegers(QStringList toCheck){
     109    foreach (QString current, toCheck){
     110        if(!isStringInteger(current)){
     111            return true; // Some aren't valid integers
    103112        }
    104113    }
     
    235244}
    236245
    237 }
     246// From here: http://stackoverflow.com/questions/17893328/qt-getting-the-screen-resolution-without-the-extended-monitor ty Chris
     247QRect 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  
    1010#include <QUrl>
    1111#include <QCoreApplication>
     12#include <QDesktopWidget>
    1213
    1314namespace GlobalVars{
    14 const QString AppVersion="0.8";
     15const QString AppVersion="0.9";
    1516const QString OniSplitString="OniSplit.exe";
    1617const QString XmlToolsString="xmlTools.exe";
     
    2728
    2829const QString AppLogName="logVago.txt";
    29 const QString BuiltOniSplitVersion="0.9.86.0";
     30const QString BuiltOniSplitVersion="0.9.94.0";
    3031const QString BuiltXmlToolsVersion="0.8d";
    3132const QString ModsDomain="mods.oni2.net";
     
    3536const QString VagoTemporaryDir=QDir::tempPath()+"/VagoTemp";
    3637const QString HelpDir="help";
     38const int DefaultWindowWidth=800;
     39const int DefaultWindowHeight=600;
    3740const char OniSplitProcSeparator=';';
    3841}
     
    5457bool showQuestionPopUp(QWidget * parent, QString message);
    5558bool checkEmptySpaces(QStringList toCheck);
     59bool checkIfIntegers(QStringList toCheck);
    5660bool checkIfDoubles(QStringList toCheck);
    5761bool isStringInteger(QString myString);
     
    6064bool rmDir(const QString &dirPath);
    6165bool removeDir(const QString &dirName);
     66QRect getScreenResolution();
    6267void showPopUp(QString message);
    6368void showRichPopUp(QString message);
Note: See TracChangeset for help on using the changeset viewer.