Changeset 998
- Timestamp:
- Apr 25, 2014, 11:05:54 PM (11 years ago)
- Location:
- Vago/trunk/Vago
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
Vago/trunk/Vago/Vago.pro
r790 r998 8 8 QT += network #network communication 9 9 QT += script #for json parse 10 QT += widgets 10 11 12 INCLUDEPATH += $$[QT_INSTALL_HEADERS]/QtZlib 11 13 INCLUDEPATH += ./libs 12 14 INCLUDEPATH += ./packageWizard -
Vago/trunk/Vago/droptablewidget.h
r811 r998 3 3 4 4 #include <QTableWidget> 5 #include <Qt Gui>5 #include <QtWidgets> 6 6 7 7 #include "util.h" -
Vago/trunk/Vago/libs/unzip.cpp
r771 r998 327 327 return UnZip::ReadFailed; 328 328 329 QString filename = QString::from Ascii(buffer2, szName);329 QString filename = QString::fromUtf8(buffer2, szName); 330 330 if (filename != path) { 331 331 qDebug() << "Filename in local header mismatches."; … … 556 556 skipEntry = true; 557 557 } else { 558 filename = QString::from Ascii(buffer2, szName);558 filename = QString::fromUtf8(buffer2, szName); 559 559 } 560 560 … … 611 611 } 612 612 613 h->comment = QString::from Ascii(buffer2, szComment);613 h->comment = QString::fromUtf8(buffer2, szComment); 614 614 } 615 615 … … 1005 1005 keys[2] = 878082192L; 1006 1006 1007 QByteArray pwdBytes = pwd.to Ascii();1007 QByteArray pwdBytes = pwd.toUtf8(); 1008 1008 int sz = pwdBytes.size(); 1009 1009 const char* ascii = pwdBytes.data(); -
Vago/trunk/Vago/libs/unzip.h
r771 r998 35 35 #include <QtCore/QtGlobal> 36 36 37 #include < zlib/zlib.h>37 #include <QtZlib/zlib.h> 38 38 39 39 class QDir; -
Vago/trunk/Vago/libs/zip.cpp
r771 r998 822 822 823 823 // filename length 824 QByteArray entryNameBytes = entryName.toAscii();824 QByteArray entryNameBytes = entryName.toUtf8(); 825 825 int sz = entryNameBytes.size(); 826 826 … … 971 971 keys[2] = 878082192L; 972 972 973 QByteArray pwdBytes = password.toAscii();973 QByteArray pwdBytes = password.toUtf8(); 974 974 int sz = pwdBytes.size(); 975 975 const char* ascii = pwdBytes.data(); … … 1192 1192 1193 1193 // filename 1194 QByteArray fileNameBytes = fileName.toAscii();1194 QByteArray fileNameBytes = fileName.toUtf8(); 1195 1195 sz = fileNameBytes.size(); 1196 1196 buffer1[ZIP_CD_OFF_NAMELEN] = sz & 0xFF; … … 1267 1267 1268 1268 // ZIP file comment length 1269 QByteArray commentBytes = comment.toAscii();1269 QByteArray commentBytes = comment.toUtf8(); 1270 1270 quint16 commentLength = commentBytes.size(); 1271 1271 -
Vago/trunk/Vago/libs/zip.h
r771 r998 34 34 #include <QtCore/QtGlobal> 35 35 36 #include < zlib/zlib.h>36 #include <QtZlib/zlib.h> 37 37 38 38 class QIODevice; -
Vago/trunk/Vago/main.cpp
r792 r998 6 6 #endif 7 7 8 #include <Qt Gui/QApplication>8 #include <QtWidgets/QApplication> 9 9 #include "mainwindow.h" 10 10 -
Vago/trunk/Vago/mainwindow.cpp
r897 r998 78 78 iniChanged=true; 79 79 } 80 #ifdef Q_OS_MAC 81 if(!this->vagoSettings->contains("UseYesButtonClear")){ 82 this->vagoSettings->setValue("UseYesButtonClear", false); 83 iniChanged=true; 84 } 85 #endif 80 86 81 87 if(iniChanged){ … … 90 96 this->startedWindowWidth=this->vagoSettings->value("WindowWidth").toInt(); 91 97 this->startedWindowHeight=this->vagoSettings->value("WindowHeight").toInt(); 98 #ifdef Q_OS_MAC 99 this->useYesAsDefaultInClearButton=this->vagoSettings->value("UseYesButtonClear").toBool(); 100 #endif 92 101 93 102 //Create our workspace if it doesn't exists yet … … 127 136 setConverterButtonsSize(); 128 137 129 #ifdef Q_ WS_MAC138 #ifdef Q_OS_MAC 130 139 // setUnifiedTitleAndToolBarOnMac(true); // Qt suggests to use it on mac | http://www.slideshare.net/qtbynokia/how-to-make-your-qt-app-look-native // align on left doesn't work if active 131 140 ui->tbOni->setIcon(QIcon(":/new/icons/oni_icon_mac.png")); // Oni executable on mac have a different icon than windows … … 191 200 arguments << "-noswitch"; 192 201 } 193 #ifdef Q_ WS_WIN202 #ifdef Q_OS_WIN 194 203 else{ 195 204 arguments << "-switch"; // only supported on windows. Was added by daodan dll. … … 531 540 command+=":"+ui->leSpecificFilesLevels->text(); 532 541 } 533 command+=" "+myOutputFolder+" "+file; 542 543 if(from=="DAT" && to=="ONI FILES"){ // extract files to a subdir with the files name ex: level0_Final 544 command += " " + myOutputFolder.insert(myOutputFolder.size()-2,QString(Util::cutName(file)).replace(".dat","")) + " " + file; 545 } 546 else{ 547 command+=" "+myOutputFolder+" "+file; 548 } 534 549 535 550 } … … 1047 1062 int size = myTable->selectionModel()->selectedRows().size(); 1048 1063 1064 QMessageBox::StandardButton defaultButton = QMessageBox::NoButton; // default button for clear asking question, only customizable in mac os 1065 1049 1066 if(size==0){ 1050 1067 Util::showPopUp("Select a row first."); … … 1052 1069 } 1053 1070 1054 if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?")){ 1071 #ifdef Q_OS_MAC 1072 if(this->useYesAsDefaultInClearButton){ 1073 defaultButton = QMessageBox::Yes; 1074 } 1075 else{ 1076 defaultButton = QMessageBox::No; 1077 } 1078 #endif 1079 1080 1081 if(Util::showQuestionPopUp(this,"Are you sure you want to delete the selected rows?",defaultButton)){ 1055 1082 for(int i=0; i<size; i++){ 1056 1083 //myTable->removeRow(myTable->selectedItems().at(size-i-1)->row()); … … 1171 1198 /** 1172 1199 Update items loaded 1173 **/ 1174 void MainWindow::on_tabWidget_selected(const QString &arg1) 1175 { 1176 if(arg1.compare("General",Qt::CaseSensitive)==0){ //case sentive is faster 1200 **/ 1201 void MainWindow::on_tabWidget_currentChanged(int index) 1202 { 1203 QString tabtext = ui->tabWidget->tabText(index); 1204 1205 if(tabtext.compare("XML",Qt::CaseSensitive)==0){ //case sentive is faster 1177 1206 updateItemsLoaded(ui->twSourcesXML); 1178 1207 } 1179 else if( arg1.compare("Textures",Qt::CaseSensitive)==0){1208 else if(tabtext.compare("Textures",Qt::CaseSensitive)==0){ 1180 1209 updateItemsLoaded(ui->twSourcesTextures); 1181 1210 } 1182 else if(arg1.compare("Objects",Qt::CaseSensitive)==0){ 1211 else if(tabtext.compare("Characters",Qt::CaseSensitive)==0){ 1212 updateItemsLoaded(ui->twSourcesCharacters); 1213 } 1214 else if(tabtext.compare("Objects",Qt::CaseSensitive)==0){ 1183 1215 updateItemsLoaded(ui->twSourcesObjects); 1184 1216 } 1185 else if( arg1.compare("Levels",Qt::CaseSensitive)==0){1217 else if(tabtext.compare("Levels",Qt::CaseSensitive)==0){ 1186 1218 updateItemsLoaded(ui->twSourcesLevels); 1187 1219 } … … 1533 1565 **/ 1534 1566 QString MainWindow::getOSIndependentAppPath(){ 1535 #ifdef Q_ WS_MAC1567 #ifdef Q_OS_MAC 1536 1568 QDir dir = QDir::current(); 1537 1569 if(dir.absolutePath().contains(".app")){ // include bundle, but we don't want it -
Vago/trunk/Vago/mainwindow.h
r897 r998 137 137 void dtContextMenu(DropTableWidget* myTable, QContextMenuEvent *event); //Context menu options for table widgets 138 138 139 void on_tabWidget_selected(const QString &arg1);140 141 139 void checkVagoLastVersion(QNetworkReply *result); //check vago last version 142 140 … … 180 178 181 179 void on_tbAbortConversion_clicked(); 180 181 void on_tabWidget_currentChanged(int index); 182 182 183 183 private: … … 191 191 int startedWindowWidth; 192 192 int startedWindowHeight; 193 #ifdef Q_OS_MAC 194 bool useYesAsDefaultInClearButton; 195 #endif 193 196 QLabel *itemsLoaded; 194 197 QProgressBar *myBar; //Progress Bar -
Vago/trunk/Vago/packageWizard/packagewizard.cpp
r793 r998 15 15 16 16 //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) 17 #ifdef Q_ WS_WIN17 #ifdef Q_OS_WIN 18 18 myWizard.resize(640,480); 19 19 #else -
Vago/trunk/Vago/preferences.cpp
r897 r998 18 18 ui->cbSeparate->setChecked(this->vagoSettings->value("SeparateInWorkspace").toBool()); 19 19 ui->cbVagoExit->setChecked(this->vagoSettings->value("ConfirmExit").toBool()); 20 21 #ifdef Q_OS_WIN 22 ui->cbClearButtonYes->hide(); // don't display this mac os only option in windows 23 #endif 20 24 21 25 } … … 61 65 this->vagoSettings->setValue("SeparateInWorkspace",ui->cbSeparate->isChecked()); 62 66 this->vagoSettings->setValue("ConfirmExit",ui->cbVagoExit->isChecked()); 67 #ifdef Q_OS_MAC 68 this->vagoSettings->setValue("UseYesButtonClear",ui->cbClearButtonYes->isChecked()); 69 #endif 70 63 71 64 72 Util::showPopUp("You need to restart the application to all changes take effect."); -
Vago/trunk/Vago/preferences.ui
r897 r998 139 139 </widget> 140 140 </item> 141 <item> 142 <widget class="QCheckBox" name="cbClearButtonYes"> 143 <property name="text"> 144 <string>Use Yes button as default for Clear items</string> 145 </property> 146 </widget> 147 </item> 141 148 </layout> 142 149 </widget> -
Vago/trunk/Vago/readme.txt
r899 r998 1 1 Readme.txt 2 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 Vago GUI v0.9 3 Vago GUI v0.9a 4 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 5 … … 37 37 ---------------------------------- 38 38 Change Log: 39 ---------------------------------- 40 0.9a, 25-04-2014 41 -Upgraded Qt libraries to version 5 42 -Updated OniSplit to 0.9.96.0 version 43 -Fixed the bug where the items loaded counter in status bar wasn't updated 44 when changing tabs 45 -Now levels->dat - oni files get extracted to a subfolder with the level's 46 extracted name (requested by paradox) 47 -Now in Mac OS is possible to choose Yes button by default when clearing the 48 files contents (requested by edt) 39 49 ---------------------------------- 40 50 0.9, 08-01-2014 -
Vago/trunk/Vago/soundWizard/soundwizard.cpp
r815 r998 23 23 24 24 //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) 25 #ifdef Q_ WS_WIN25 #ifdef Q_OS_WIN 26 26 this->myWizard->resize(640,480); 27 27 #else -
Vago/trunk/Vago/util.cpp
r897 r998 68 68 } 69 69 70 bool showQuestionPopUp(QWidget * parent, QString message ){71 return QMessageBox::question (parent, "Are you sure?", message, QMessageBox::Yes , QMessageBox::No)==QMessageBox::Yes;70 bool showQuestionPopUp(QWidget * parent, QString message, QMessageBox::StandardButton standardButton){ 71 return QMessageBox::question (parent, "Are you sure?", message, QMessageBox::Yes | QMessageBox::No, standardButton)==QMessageBox::Yes; 72 72 } 73 73 … … 162 162 } 163 163 } else { 164 qDebug("Unhandled item" + info.filePath().to Ascii() + "in cpDir");164 qDebug("Unhandled item" + info.filePath().toUtf8() + "in cpDir"); 165 165 } 166 166 } -
Vago/trunk/Vago/util.h
r900 r998 13 13 14 14 namespace GlobalVars{ 15 const QString AppVersion="0.9 ";15 const QString AppVersion="0.9a"; 16 16 const QString OniSplitString="OniSplit.exe"; 17 17 const QString XmlToolsString="xmlTools.exe"; 18 18 19 #ifdef Q_ WS_WIN19 #ifdef Q_OS_WIN 20 20 const QString OniExe="Oni.exe"; 21 21 const QString OniSplitExeName=OniSplitString; … … 28 28 29 29 const QString AppLogName="logVago.txt"; 30 const QString BuiltOniSplitVersion="0.9.9 4.0";30 const QString BuiltOniSplitVersion="0.9.96.0"; 31 31 const QString BuiltXmlToolsVersion="0.8d"; 32 32 const QString ModsDomain="mods.oni2.net"; 33 #ifdef Q_ WS_WIN33 #ifdef Q_OS_WIN 34 34 const QString VagoNode = "247"; 35 35 #else … … 59 59 QStringList substring(QString myString,QString separator,Qt::CaseSensitivity cs = Qt::CaseSensitive); 60 60 int indexOfBackward(QString myString, QString toSearch, int from = -1); 61 bool showQuestionPopUp(QWidget * parent, QString message );61 bool showQuestionPopUp(QWidget * parent, QString message, QMessageBox::StandardButton standardButton=QMessageBox::NoButton); 62 62 bool checkEmptySpaces(QStringList toCheck); 63 63 bool checkIfIntegers(QStringList toCheck);
Note:
See TracChangeset
for help on using the changeset viewer.