ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/bgImageWizard/bgimagepagefinal.cpp
(Generate patch)

Comparing s10k/Vago/bgImageWizard/bgimagepagefinal.cpp (file contents):
Revision 1092 by s10k, Sat Dec 30 13:43:28 2017 UTC vs.
Revision 1093 by s10k, Sat Dec 30 13:57:32 2017 UTC

# Line 1 | Line 1
1   #include "BGImagePageFinal.h"
2   #include "ui_BGImagePageFinal.h"
3  
4 < BGImagePageFinal::BGImagePageFinal(QString appDir, Logger *myLogger, QString bgImagesLocation, QWidget *parent) :
4 > BGImagePageFinal::BGImagePageFinal(QString appDir, QString bgImagesLocation, QWidget *parent) :
5      QWizardPage(parent),
6      ui(new Ui::BGImagePageFinal)
7   {
8      ui->setupUi(this);
9      this->appDir = appDir;
10    this->myLogger = myLogger;
10      this->bgImagesLocation = bgImagesLocation;
11      this->oniSplitCommands = new QStringList();
12 <    this->myOniSplitConverter = new Converter(this->appDir, this->myLogger, this->oniSplitCommands);
12 >    this->myOniSplitConverter = new Converter(this->appDir, this->oniSplitCommands);
13  
14      ui->lbComplete->setText("<html>The wizard is now complete. The images have been created. "
15                              "You can view all created files clicking <a href=' '>here.</a><br />"
# Line 64 | Line 63 | void BGImagePageFinal::startProcessing()
63          this->oniSplitCommands->clear();
64  
65          for(const QString &currentFile : imagesSplitted){
66 <            this->oniSplitCommands->append("-create:txmp " + Util::insertQuotes(this->bgImagesLocation) + " -format:bgr32 " + Util::insertQuotes(currentFile));
66 >            this->oniSplitCommands->append("-create:txmp " + Util::String::insertQuotes(this->bgImagesLocation) + " -format:bgr32 " + Util::String::insertQuotes(currentFile));
67          }
68  
69          this->myOniSplitConverter->start(); // finally process the onisplit commands
# Line 76 | Line 75 | void BGImagePageFinal::startProcessing()
75  
76              if(txmbXmlFile.isEmpty())
77              {
78 <                UtilVago::showAndLogErrorPopUp(this->myLogger, "Couldn't create TXMB xml file!");
78 >                UtilVago::showAndLogErrorPopUp("Couldn't create TXMB xml file!");
79                  return;
80              }
81  
82              // Create TXMB oni files
83              this->oniSplitCommands->clear();
84 <            this->oniSplitCommands->append("-create " + Util::insertQuotes(this->bgImagesLocation) + " " + Util::insertQuotes(txmbXmlFile));
84 >            this->oniSplitCommands->append("-create " + Util::String::insertQuotes(this->bgImagesLocation) + " " + Util::String::insertQuotes(txmbXmlFile));
85              this->myOniSplitConverter->start();
86              this->myOniSplitConverter->wait();
87          }
# Line 108 | Line 107 | QString BGImagePageFinal::createTxmbXmlF
107      for(const QString &currSplittedImage : imagesSplitted)
108      {
109          QFileInfo currImageFile(currSplittedImage);
110 <        texturesNode.append_child("Link").append_child(pugi::xml_node_type::node_pcdata).set_value(Util::qStrToCstr(currImageFile.baseName()));
110 >        texturesNode.append_child("Link").append_child(pugi::xml_node_type::node_pcdata).set_value(QSTR_TO_CSTR(currImageFile.baseName()));
111      }
112  
113 <    txmbNode.append_attribute("id").set_value(Util::qStrToCstr(levelId));
113 >    txmbNode.append_attribute("id").set_value(QSTR_TO_CSTR(levelId));
114  
115 <    if(!doc.save_file(Util::qStrToCstr(filePath))){
115 >    if(!doc.save_file(QSTR_TO_CSTR(filePath))){
116          return "";
117      }
118  
# Line 147 | Line 146 | QList<QString> BGImagePageFinal::splitIn
146              QString imageDestinationPath = this->bgImagesLocation + "/" + imageName + currentImageId + "." + imageType;
147  
148              if(!dividedImage.save(imageDestinationPath)){
149 <                UtilVago::showAndLogErrorPopUp(this->myLogger, "Couldn't save image " + imageDestinationPath + "! Files weren't created correctly.");
149 >                UtilVago::showAndLogErrorPopUp("Couldn't save image " + imageDestinationPath + "! Files weren't created correctly.");
150                  return QList<QString>();
151              }
152  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)