Changeset 1061
- Timestamp:
- Dec 9, 2016, 8:04:18 PM (8 years ago)
- Location:
- Vago/trunk/Vago
- Files:
-
- 29 added
- 3 deleted
- 26 edited
Legend:
- Unmodified
- Added
- Removed
-
Vago/trunk/Vago/Vago.pro
r1058 r1061 13 13 CONFIG += c++14 14 14 15 #INCLUDEPATH += ./libs16 15 INCLUDEPATH += ./packageWizard 17 16 INCLUDEPATH += ./soundWizard 18 17 INCLUDEPATH += ./bgImageWizard 18 INCLUDEPATH += ./bgImageWizard 19 19 INCLUDEPATH += ./xmlToolsInterface 20 INCLUDEPATH += ./windowMessagesWizard 20 21 21 22 # Used this great tutorial to build zlib and quazip: … … 36 37 } 37 38 39 INCLUDEPATH += ./libs/DropTableWidget 40 INCLUDEPATH += ./libs/DropLineEdit 41 INCLUDEPATH += ../Libs/pugixml 42 38 43 win32 { 39 44 RC_FILE = icon_resource.rc #for windows explorer icon … … 50 55 main.cpp \ 51 56 logger.cpp \ 52 droptablewidget.cpp \53 57 converter.cpp \ 54 58 about.cpp \ … … 66 70 bgImageWizard/bgimagepage2.cpp \ 67 71 xmlprocessor.cpp \ 68 libs/pugixml/pugixml.cpp \69 72 utilvago.cpp \ 70 73 bgImageWizard/bgimagewizard.cpp \ … … 74 77 libs/BasicXMLSyntaxHighlighter/BasicXMLSyntaxHighlighter.cpp \ 75 78 xmlToolsInterface/xmltoolsinterfacecommandpreview.cpp \ 76 libs/LineNumberDisplay/LineNumberDisplay.cpp 79 libs/LineNumberDisplay/LineNumberDisplay.cpp \ 80 abstractwizard.cpp \ 81 windowMessagesWizard/wmsetuppage.cpp \ 82 windowMessagesWizard/wmformatpage.cpp \ 83 windowMessagesWizard/wmpage.cpp \ 84 windowMessagesWizard/wmwizard.cpp \ 85 windowMessagesWizard/wmfinalpage.cpp \ 86 ./libs/DropTableWidget/droptablewidget.cpp \ 87 ./libs/DropLineEdit/droplineedit.cpp \ 88 ../Libs/pugixml/pugixml.cpp 77 89 78 90 HEADERS += \ … … 82 94 mainwindow.h \ 83 95 logger.h \ 84 droptablewidget.h \85 96 converter.h \ 86 97 about.h \ … … 98 109 bgImageWizard/bgimagepage2.h \ 99 110 xmlprocessor.h \ 100 libs/pugixml/pugixml.hpp \101 111 utilvago.h \ 102 112 bgImageWizard/bgimagewizard.h \ … … 106 116 libs/BasicXMLSyntaxHighlighter/BasicXMLSyntaxHighlighter.h \ 107 117 xmlToolsInterface/xmltoolsinterfacecommandpreview.h \ 108 libs/LineNumberDisplay/LineNumberDisplay.h 118 libs/LineNumberDisplay/LineNumberDisplay.h \ 119 wizardfactory.h \ 120 abstractwizard.h \ 121 windowMessagesWizard/wmsetuppage.h \ 122 windowMessagesWizard/wmformatpage.h \ 123 windowMessagesWizard/wmpage.h \ 124 windowMessagesWizard/wmwizard.h \ 125 windowMessagesWizard/wmfinalpage.h \ 126 ./libs/DropTableWidget/droptablewidget.h \ 127 ./libs/DropLineEdit/droplineedit.h \ 128 ../Libs/pugixml/pugixml.hpp 109 129 110 130 FORMS += \ … … 126 146 bgImageWizard/bgimagepagefinal.ui \ 127 147 xmlToolsInterface/xmltoolsinterface.ui \ 128 xmlToolsInterface/xmltoolsinterfacecommandpreview.ui 148 xmlToolsInterface/xmltoolsinterfacecommandpreview.ui \ 149 windowMessagesWizard/wmsetuppage.ui \ 150 windowMessagesWizard/wmformatpage.ui \ 151 windowMessagesWizard/wmfinalpage.ui 129 152 130 153 RESOURCES += \ -
Vago/trunk/Vago/about.cpp
r1058 r1061 8 8 ui->setupUi(this); 9 9 this->setAttribute(Qt::WA_DeleteOnClose,true ); //destroy itself once finished. 10 this->layout()->setSizeConstraint( QLayout::SetFixedSize ); //fixed size11 ui->lbAbout->setOpenExternalLinks(true); //allow navigate to oni central12 10 ui->lbAbout->setText("<html>" 13 "< b>Vago GUI "+GlobalVars::AppVersion+"</b>"14 "<p style='font-size: small;'>"11 "<p style='font-size:x-large;'><b>Vago GUI " + GlobalVars::AppVersion + "</b></p>" 12 "<p style='font-size:large;line-height: 18px;'>" 15 13 "Written by s10k<br /><br/>" 16 14 "Build Date " + __DATE__ + " " + __TIME__ + "<br /><br />" … … 32 30 "Arseny Kapoulkine (and contributors)for pugixml library<br />" 33 31 "smashingmagazine for the folder icon :)<br />" 34 "Freepik and Flaticon by the background image wizard icon<br />"32 "Freepik and Flaticon by the background image wizard and text editing icons<br />" 35 33 "qtiplot authors for line numbers in QTextEdit<br />" 36 34 "d1vanov for basic-xml-syntax-highlighter class <br />" 37 "<center>"38 "Visit us at:<br />"39 "<a href='http://oni.bungie.org'>"40 "oni.bungie.org"41 "</center>"42 "</a>"43 35 "</p>" 44 36 "</html>"); // Don't use rich text in qtdesigner because it generates platform dependent code 37 38 ui->lbOniCommunity->setText("<html>" 39 "<p style='font-size:large;'>" 40 "<center>" 41 "Visit us at:<br />" 42 "<a href='http://oni.bungie.org'>" 43 "oni.bungie.org" 44 "</a>" 45 "</center>" 46 "</p>" 47 "</html>" 48 ); 45 49 } 46 50 -
Vago/trunk/Vago/about.ui
r897 r1061 45 45 <layout class="QVBoxLayout" name="verticalLayout"> 46 46 <item> 47 <widget class="QLabel" name="lbAbout"> 48 <property name="sizePolicy"> 49 <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> 50 <horstretch>0</horstretch> 51 <verstretch>0</verstretch> 52 </sizepolicy> 47 <widget class="QScrollArea" name="scrollArea"> 48 <property name="widgetResizable"> 49 <bool>true</bool> 53 50 </property> 54 <property name="text"> 55 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 51 <widget class="QWidget" name="scrollAreaWidgetContents"> 52 <property name="geometry"> 53 <rect> 54 <x>0</x> 55 <y>0</y> 56 <width>341</width> 57 <height>283</height> 58 </rect> 59 </property> 60 <layout class="QVBoxLayout" name="verticalLayout_3"> 61 <item> 62 <widget class="QLabel" name="lbAbout"> 63 <property name="sizePolicy"> 64 <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> 65 <horstretch>0</horstretch> 66 <verstretch>0</verstretch> 67 </sizepolicy> 68 </property> 69 <property name="text"> 70 <string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> 56 71 <html><head><meta name="qrichtext" content="1" /><style type="text/css"> 57 72 p, li { white-space: pre-wrap; } 58 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;"> 59 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt; font-weight:600;">Vago GUI</span><span style=" font-size:8pt;"> </span></p> 60 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Written by s10k<br /><br />Thanks to:<br />Edit in About.cpp<br /></span></p> 61 <p align="center" style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:8pt;">Visit us at:<br /></span><a href="http://oni.bungie.org"><span style=" font-size:8pt; text-decoration: underline; color:#0000ff;">oni.bungie.org </span></a></p></body></html></string> 73 </style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400; font-style:normal;"> 74 <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Vago GUI</span> </p> 75 <p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Written by s10k<br /><br />Thanks to:<br />Edit in About.cpp</p></body></html></string> 76 </property> 77 <property name="wordWrap"> 78 <bool>true</bool> 79 </property> 80 <property name="openExternalLinks"> 81 <bool>true</bool> 82 </property> 83 </widget> 84 </item> 85 </layout> 86 </widget> 87 </widget> 88 </item> 89 <item> 90 <spacer name="verticalSpacer_2"> 91 <property name="orientation"> 92 <enum>Qt::Vertical</enum> 93 </property> 94 <property name="sizeType"> 95 <enum>QSizePolicy::Fixed</enum> 96 </property> 97 <property name="sizeHint" stdset="0"> 98 <size> 99 <width>20</width> 100 <height>10</height> 101 </size> 102 </property> 103 </spacer> 104 </item> 105 <item> 106 <widget class="QLabel" name="lbOniCommunity"> 107 <property name="text"> 108 <string><html><head/><body><p align="center">Visit us at:<br/><a href="http://oni.bungie.org"><span style=" text-decoration: underline; color:#0000ff;">oni.bungie.org </span></a></p></body></html></string> 109 </property> 110 <property name="wordWrap"> 111 <bool>true</bool> 112 </property> 113 <property name="openExternalLinks"> 114 <bool>true</bool> 62 115 </property> 63 116 </widget> … … 67 120 <property name="orientation"> 68 121 <enum>Qt::Vertical</enum> 122 </property> 123 <property name="sizeType"> 124 <enum>QSizePolicy::Fixed</enum> 69 125 </property> 70 126 <property name="sizeHint" stdset="0"> -
Vago/trunk/Vago/bgImageWizard/bgimagepagefinal.h
r1054 r1061 4 4 #include <QWizardPage> 5 5 #include <QImage> 6 #include <pugixml.hpp> 7 6 8 #include "utilvago.h" 7 #include "libs/pugixml/pugixml.hpp"8 9 #include "converter.h" 9 10 -
Vago/trunk/Vago/bgImageWizard/bgimagewizard.cpp
r1054 r1061 2 2 3 3 BGImageWizard::BGImageWizard(const QString &appDir, const QString &workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger) 4 :AbstractWizard(appDir, workspaceWizardLocation, vagoSettings, myLogger, true) 4 5 { 5 6 this->appDir = appDir; … … 10 11 } 11 12 12 int BGImageWizard::exec(){ 13 14 QPushButton *restartButton = new QPushButton("Restart"); 15 this->myWizard.setButton(QWizard::CustomButton1,restartButton); 16 this->myWizard.setOption(QWizard::HaveCustomButton1, true); 17 18 connect(&this->myWizard, SIGNAL(currentIdChanged(int)), this, SLOT(pageChanged(int))); 19 connect(restartButton, SIGNAL(clicked(bool)), this, SLOT(restartWizard())); 20 21 this->myWizard.setWindowIcon(QIcon(":/new/icons/background_image.png")); 22 23 //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) 24 #ifdef Q_OS_WIN 25 this->myWizard.resize(640,480); 26 #else 27 this->myWizard.resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better 28 // because the components on mac use more space 29 #endif 30 QRect position = this->myWizard.frameGeometry(); 31 position.moveCenter(QDesktopWidget().availableGeometry().center()); 32 this->myWizard.move(position.topLeft()); 33 // 13 void BGImageWizard::exec(){ 34 14 35 15 BGImagePage2 *page2 = new BGImagePage2(this->myLogger); … … 37 17 BGImagePageFinal *pageFinal = new BGImagePageFinal(this->appDir, this->myLogger, this->bgImagesLocation); 38 18 39 this->myWizard.addPage(createIntroPage()); 19 this->myWizard.addPage 20 ( 21 createIntroPage 22 ( 23 "Welcome to the Oni Background Image Wizard.\n" 24 "This wizard will allow you to create in a few and simple steps Oni background images (TXMB) " 25 "that can be used in the menus or as backgrounds screens for the levels." 26 ) 27 ); 28 40 29 this->myWizard.addPage(page2); 41 30 this->myWizard.addPage(page3); 42 31 this->myWizard.addPage(pageFinal); 43 32 44 this->myWizard.setWindowTitle("Background Image Wizard"); 45 46 if(this->myWizard.exec()){ //modal and wait for finalization 47 48 } 49 50 return 0; 33 showWizard("Background Image Wizard", ":/new/icons/background_image.png"); 51 34 } 52 35 53 QWizardPage* BGImageWizard::createIntroPage() { 54 QWizardPage *page = new QWizardPage; 55 page->setTitle("Introduction"); 36 void BGImageWizard::beforeClose(QDialog::DialogCode){ 56 37 57 QLabel *label = new QLabel("Welcome to the Oni Background Image Wizard.\n"58 "This wizard will allow you to create in a few and simple steps Oni background images (TXMB) "59 "that can be used in the menus or as backgrounds screens for the levels.");60 label->setWordWrap(true);61 62 QVBoxLayout *layout = new QVBoxLayout;63 layout->addWidget(label);64 page->setLayout(layout);65 66 return page;67 38 } 68 69 void BGImageWizard::restartWizard(){70 this->myWizard.restart();71 }72 73 void BGImageWizard::pageChanged(int pageId){74 // Last page?75 if(pageId==3){76 this->myWizard.setOption(QWizard::HaveCustomButton1, true); // set visible77 this->myWizard.button(QWizard::BackButton)->setEnabled(false); // disable back button, use restart if needed78 return;79 }80 this->myWizard.setOption(QWizard::HaveCustomButton1, false); // set invisible81 this->myWizard.button(QWizard::BackButton)->setEnabled(true); // set enable back button82 } -
Vago/trunk/Vago/bgImageWizard/bgimagewizard.h
r1054 r1061 2 2 #define BGIMAGEWIZARD_H 3 3 4 // System includes5 #include <QString>6 #include <QWizard>7 #include <QWizardPage>8 #include <QLabel>9 #include <QDesktopWidget>10 #include <QVBoxLayout>11 #include <QPushButton>12 13 4 // Local includes 5 #include "abstractwizard.h" 14 6 #include "bgimagepage2.h" 15 7 #include "bgimagepage3.h" 16 8 #include "bgimagepagefinal.h" 17 9 18 class BGImageWizard: public QObject// for signals and slots10 class BGImageWizard: public AbstractWizard // for signals and slots 19 11 { 20 Q_OBJECT // for signals and slots 21 public: 12 protected: 22 13 BGImageWizard(const QString &appDir, const QString &workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger); 23 intexec();14 void exec(); 24 15 private: 25 QWizard myWizard;26 QWizardPage *createIntroPage();27 28 Logger *myLogger;29 QString workspaceWizardLocation;30 16 QString bgImagesLocation; 31 QString appDir; 32 QSettings *vagoSettings; 33 private slots: 34 void restartWizard(); 35 void pageChanged(int pageId); 17 private: 18 void beforeClose(QDialog::DialogCode resultStatus); 36 19 }; 37 20 -
Vago/trunk/Vago/main.cpp
r1058 r1061 2 2 #include "mainwindow.h" 3 3 4 4 // TODO add lineedit to other lineedits that can receive files or folders, create additional funtions in lineedit where we can specify what kind of argument it accepts 5 // Example: setAllowFolders(), setAllowFiles() or setAcceptedTypes(Enum from QtFiles) 5 6 int main(int argc, char *argv[]) 6 7 { … … 11 12 a.setStyleSheet("QStatusBar::item { border: 0px; }"); //hide QLabels border in status bar //http://qt-project.org/forums/viewthread/18743 12 13 13 // XmlToolsInterface *xmlToolsWindow = new XmlToolsInterface(new Logger(UtilVago::getAppPath(), GlobalVars::AppLogName));14 // xmlToolsWindow->show(); //it destroys itself when finished.15 16 14 return a.exec(); 17 15 } -
Vago/trunk/Vago/mainwindow.cpp
r1058 r1061 242 242 void MainWindow::on_actionAE_Package_Creator_triggered() 243 243 { 244 PackageWizard myWizard = PackageWizard(this->workspaceWizardsLocation, this->vagoSettings, this->myLogger);245 myWizard.exec();244 // it deletes itself once closed 245 WizardFactory<PackageWizard>::startInstance(UtilVago::getAppPath(), this->workspaceWizardsLocation, this->vagoSettings, this->myLogger); 246 246 } 247 247 248 248 void MainWindow::on_actionSound_Wizard_triggered() 249 249 { 250 SoundWizard myWizard (UtilVago::getAppPath(), this->workspaceWizardsLocation, this->myLogger, &this->commandMap);251 myWizard.exec();250 // it deletes itself once closed 251 WizardFactory<SoundWizard>::startInstance(UtilVago::getAppPath(), this->workspaceWizardsLocation, this->vagoSettings, this->myLogger, &this->commandMap); 252 252 } 253 253 254 254 void MainWindow::on_actionBackground_Image_Wizard_triggered() 255 255 { 256 BGImageWizard myWizard (UtilVago::getAppPath(), this->workspaceWizardsLocation, this->vagoSettings, this->myLogger); 257 myWizard.exec(); 256 // it deletes itself once closed 257 WizardFactory<BGImageWizard>::startInstance(UtilVago::getAppPath(), this->workspaceWizardsLocation, this->vagoSettings, this->myLogger); 258 } 259 260 void MainWindow::on_actionWindow_Messages_Wizard_triggered() 261 { 262 // it deletes itself once closed 263 WizardFactory<WmWizard>::startInstance(UtilVago::getAppPath(), this->workspaceWizardsLocation, this->vagoSettings, this->myLogger); 258 264 } 259 265 … … 557 563 QString command=this->commandMap.value(tabTitle+"->"+from+"->"+to)+" "+myOutputFolder; 558 564 559 //TODO: This can be optimized. When some are not enable others are.560 565 if(ui->cbTexture->isChecked()){ 561 566 if(ui->leTextureName->text().isEmpty()){ … … 979 984 ui->cbNormals->setEnabled(false); 980 985 ui->cbNormals->setChecked(false); 981 986 //#error add drag and drop to Extract TRAM with TRBS/ONCC 982 987 if(QString::compare(arg1,"TRAM ONI",Qt::CaseSensitive)==0){ //case sensitive is faster 983 988 ui->cbWithTRBS_ONCC->setEnabled(true); -
Vago/trunk/Vago/mainwindow.h
r1058 r1061 9 9 #include "soundwizard.h" 10 10 #include "bgimagewizard.h" 11 #include "wmwizard.h" 11 12 #include "converter.h" 12 #include "droptablewidget.h"13 13 #include "xmltoolsinterface.h" 14 #include "wizardfactory.h" 14 15 15 16 #include <QMainWindow> … … 31 32 #include <QScriptEngine> 32 33 #include <QScriptValueIterator> 34 #include <droptablewidget.h> 35 #include <pugixml.hpp> 33 36 #ifdef Q_OS_WIN 34 37 #include <QWinTaskbarProgress> … … 36 39 #endif 37 40 38 #include "libs/pugixml/pugixml.hpp"39 40 41 namespace Ui { 41 42 class MainWindow; … … 200 201 201 202 void on_tbXmlToolsInterface_clicked(); 203 204 void on_actionWindow_Messages_Wizard_triggered(); 202 205 203 206 private: -
Vago/trunk/Vago/mainwindow.ui
r1058 r1061 727 727 <property name="toolTip"> 728 728 <string>Extract a TRAM (animation) with character's TRBS / ONCC 729 For example extract a Muro's TRAM with Konoko's ONCC</string> 729 For example extract a Muro's TRAM with Konoko's ONCC 730 (input the full path for the TRBS / ONCC.oni file)</string> 730 731 </property> 731 732 <property name="text"> … … 735 736 </item> 736 737 <item> 737 <widget class=" QLineEdit" name="leTRBS_ONCC">738 <widget class="DropLineEdit" name="leTRBS_ONCC"> 738 739 <property name="enabled"> 739 740 <bool>false</bool> … … 741 742 <property name="toolTip"> 742 743 <string>Extract a TRAM (animation) with character's TRBS / ONCC 743 For example extract a Muro's TRAM with Konoko's ONCC</string> 744 For example extract a Muro's TRAM with Konoko's ONCC 745 (input the full path for the TRBS / ONCC.oni file)</string> 744 746 </property> 745 747 <property name="placeholderText"> 746 <string> TRBS / ONCC.oni source file</string>748 <string>Full path to TRBS / ONCC.oni source file</string> 747 749 </property> 748 750 </widget> … … 1464 1466 <addaction name="actionSound_Wizard"/> 1465 1467 <addaction name="actionBackground_Image_Wizard"/> 1466 <addaction name=" separator"/>1468 <addaction name="actionWindow_Messages_Wizard"/> 1467 1469 </widget> 1468 1470 <addaction name="menuFile"/> … … 1679 1681 </property> 1680 1682 </action> 1683 <action name="actionWindow_Messages_Wizard"> 1684 <property name="icon"> 1685 <iconset resource="resources.qrc"> 1686 <normaloff>:/new/icons/windowmessages.png</normaloff>:/new/icons/windowmessages.png</iconset> 1687 </property> 1688 <property name="text"> 1689 <string>Window Messages Wizard</string> 1690 </property> 1691 </action> 1681 1692 </widget> 1682 1693 <layoutdefault spacing="6" margin="11"/> … … 1685 1696 <class>DropTableWidget</class> 1686 1697 <extends>QTableWidget</extends> 1687 <header>droptablewidget.h</header> 1698 <header location="global">droptablewidget.h</header> 1699 </customwidget> 1700 <customwidget> 1701 <class>DropLineEdit</class> 1702 <extends>QLineEdit</extends> 1703 <header location="global">droplineedit.h</header> 1688 1704 </customwidget> 1689 1705 </customwidgets> -
Vago/trunk/Vago/packageWizard/packagepage4.h
r771 r1061 3 3 4 4 #include <QWizardPage> 5 6 #include "droptablewidget.h" 5 #include <droptablewidget.h> 7 6 8 7 namespace Ui { -
Vago/trunk/Vago/packageWizard/packagewizard.cpp
r1047 r1061 1 1 #include "packagewizard.h" 2 2 3 PackageWizard::PackageWizard(QString workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger) 3 PackageWizard::PackageWizard(const QString &appDir, QString workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger) 4 :AbstractWizard(appDir, workspaceWizardLocation, vagoSettings, myLogger, false) 4 5 { 5 this->workspaceWizardLocation=workspaceWizardLocation;6 this->vagoSettings=vagoSettings;7 this->myLogger=myLogger;8 6 this->packagesLocation=this->workspaceWizardLocation+"/Packages"; 9 7 } 10 8 11 int PackageWizard::exec(){ 12 QWizard myWizard; 13 14 myWizard.setWindowIcon(QIcon(":/new/icons/package.png")); 15 16 //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) 17 #ifdef Q_OS_WIN 18 myWizard.resize(640,480); 19 #else 20 myWizard.resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better 21 // because the components on mac use more space 22 #endif 23 QRect position = myWizard.frameGeometry(); 24 position.moveCenter(QDesktopWidget().availableGeometry().center()); 25 myWizard.move(position.topLeft()); 26 // 27 9 void PackageWizard::exec(){ 28 10 PackagePage2 *page2 = new PackagePage2(this->myLogger); 29 11 PackagePage3 *page3 = new PackagePage3(); 30 12 PackagePage4 *page4 = new PackagePage4(); 13 this->page4Pointer = page4; // save the pointer in class variable 31 14 PackagePageFinal *pageFinal = new PackagePageFinal(this->vagoSettings); 32 15 33 myWizard.addPage(createIntroPage()); 16 myWizard.addPage( 17 createIntroPage( 18 "Welcome to the Anniversary Edition Installer 2 (AIE2) package" 19 " creator wizard.\n" 20 "This wizard will allow you to create in a few and simple steps a package for AIE2." 21 ) 22 ); 34 23 myWizard.addPage(page2); 35 24 myWizard.addPage(page3); … … 37 26 myWizard.addPage(pageFinal); 38 27 39 myWizard.setWindowTitle("AIE2 Package Creator"); 40 41 //If wizard finished with sucess 42 if(myWizard.exec()){ //modal and wait for finalization 43 createPackage(myWizard, page4); 44 } 45 46 return 0; 28 showWizard("AIE2 Package Creator", ":/new/icons/package.png"); 47 29 } 48 30 49 QWizardPage* PackageWizard::createIntroPage() {50 QWizardPage *page = new QWizardPage;51 page->setTitle("Introduction");52 31 53 QLabel *label = new QLabel("Welcome to the Anniversary Edition Installer 2 (AIE2) package" 54 " creator wizard.\n" 55 "This wizard will allow you to create in a few and simple steps a package for AIE2."); 56 label->setWordWrap(true); 57 58 QVBoxLayout *layout = new QVBoxLayout; 59 layout->addWidget(label); 60 page->setLayout(layout); 61 62 return page; 63 } 64 65 void PackageWizard::createPackage(const QWizard &myWizard, PackagePage4 *page4){ 32 void PackageWizard::createPackage(){ 66 33 const QString aeVersion="2.0"; 67 34 68 35 //Get info page 2 69 QString modName= myWizard.field("leModName").toString();70 QString authors= myWizard.field("leAuthors").toString();71 QString version= myWizard.field("leVersion").toString();72 QString description= myWizard.field("ptDescription").toString();73 QString packageNumber= myWizard.field("lePackageNumber").toString();74 bool bslReplace= myWizard.field("rbReplace").toBool();36 QString modName=this->myWizard.field("leModName").toString(); 37 QString authors=this->myWizard.field("leAuthors").toString(); 38 QString version=this->myWizard.field("leVersion").toString(); 39 QString description=this->myWizard.field("ptDescription").toString(); 40 QString packageNumber=this->myWizard.field("lePackageNumber").toString(); 41 bool bslReplace=this->myWizard.field("rbReplace").toBool(); 75 42 76 43 //Get info page 3 77 QString dependentPackages= myWizard.field("leDependentPackages").toString();78 QString incompatiblePackages= myWizard.field("leIncompatiblePackages").toString();79 QString unlockLevels= myWizard.field("leUnlockLevels").toString();44 QString dependentPackages=this->myWizard.field("leDependentPackages").toString(); 45 QString incompatiblePackages=this->myWizard.field("leIncompatiblePackages").toString(); 46 QString unlockLevels=this->myWizard.field("leUnlockLevels").toString(); 80 47 81 48 //Get info page 4 82 const DropTableWidget *commonTable= page4->commonTable;83 const DropTableWidget *windowsTable= page4->windowsTable;84 const DropTableWidget *macTable= page4->macTable;49 const DropTableWidget *commonTable=this->page4Pointer->commonTable; 50 const DropTableWidget *windowsTable=this->page4Pointer->windowsTable; 51 const DropTableWidget *macTable=this->page4Pointer->macTable; 85 52 86 53 //Get info from final page 87 bool openFolder= myWizard.field("cbOpenFolder").toBool();88 bool createZip= myWizard.field("cbCreateZip").toBool();54 bool openFolder=this->myWizard.field("cbOpenFolder").toBool(); 55 bool createZip=this->myWizard.field("cbCreateZip").toBool(); 89 56 //Remember the final page choices to next time 90 57 this->vagoSettings->setValue("PackageCreator/OpenFolder",openFolder); … … 202 169 } 203 170 } 171 172 void PackageWizard::beforeClose(QDialog::DialogCode resultStatus){ 173 174 //If wizard finished with sucess, create the package 175 if(resultStatus == QDialog::Accepted){ 176 createPackage(); 177 } 178 } 179 -
Vago/trunk/Vago/packageWizard/packagewizard.h
r1047 r1061 2 2 #define PACKAGEWIZARD_H 3 3 4 #include " logger.h"4 #include "abstractwizard.h" 5 5 #include "packagepage2.h" 6 6 #include "packagepage3.h" … … 8 8 #include "packagepagefinal.h" 9 9 10 #include <QLabel>11 #include <QVBoxLayout>12 #include <QLineEdit>13 #include <QRect>14 #include <QDesktopWidget>15 #include <QTextStream>16 #include <QSettings>17 10 #include <JlCompress.h> 18 11 19 class PackageWizard 12 class PackageWizard: public AbstractWizard // for signals and slots 20 13 { 21 public:22 PackageWizard(QString workspaceWizardLocation,QSettings *vagoSettings, Logger *myLogger);23 int exec();24 14 private: 25 QWizardPage *createIntroPage(); 15 QString packagesLocation; 16 PackagePage4 *page4Pointer = nullptr; 17 private: 26 18 void copyPackageFolders(const DropTableWidget *myTable, QString tableDir, QString modDir, bool &bslExist); 27 void createPackage(const QWizard &myWizard, PackagePage4 *page4); 28 29 Logger *myLogger; 30 QString workspaceWizardLocation; 31 QString packagesLocation; 32 QSettings *vagoSettings; 19 void createPackage(); 20 void beforeClose(QDialog::DialogCode resultStatus); 21 protected: 22 PackageWizard(const QString &appDir, QString workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger); 23 void exec(); 33 24 }; 34 25 -
Vago/trunk/Vago/readme.txt
r1058 r1061 1 1 Readme.txt 2 2 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3 Vago GUI v1. 23 Vago GUI v1.3 4 4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 5 5 … … 37 37 ---------------------------------- 38 38 Change Log: 39 ---------------------------------- 40 1.3, 08-12-2016 41 - Changed Sound Wizard default settings to create files that are playable as music ingame 42 - Now wizard have no longer modal windows. You can minimize and open multiple at the same time 43 - Added some tooltips to XmlTools interface 44 - Added wizard to create ingame pages like weapon / item pages or text for consoles 45 - Added drag and drop support to Extract TRAM with TRBS/ONCC 46 - Changed how about window displays the information 39 47 ---------------------------------- 40 48 1.2, 30-10-2016 -
Vago/trunk/Vago/resources.qrc
r1058 r1061 17 17 <file>background_image.png</file> 18 18 <file>xmltoolsinterface.png</file> 19 <file>windowmessages.png</file> 20 <file>formatting_bold.png</file> 21 <file>formatting_color.png</file> 22 <file>formatting_italic.png</file> 23 <file>formatting_underline.png</file> 19 24 </qresource> 20 25 <qresource prefix="/new/about"> -
Vago/trunk/Vago/sampleFiles/OSBDsample_file.amb.xml
r771 r1061 22 22 <InSound></InSound> 23 23 <OutSound></OutSound> 24 <Treshold> 3</Treshold>24 <Treshold>1</Treshold> 25 25 <MinOcclusion>0</MinOcclusion> 26 26 </AmbientSound> -
Vago/trunk/Vago/sampleFiles/OSBDsample_file.grp.xml
r771 r1061 3 3 <SoundGroup> 4 4 <Volume>1</Volume> 5 <Pitch> 1</Pitch>6 <Flags> PreventRepeat</Flags>5 <Pitch>0</Pitch> 6 <Flags></Flags> 7 7 <NumberOfChannels>2</NumberOfChannels> 8 8 <Permutations> 9 9 <Permutation> 10 <Weight>1 0</Weight>10 <Weight>1</Weight> 11 11 <Volume> 12 12 <Min>1</Min> … … 14 14 </Volume> 15 15 <Pitch> 16 <Min> 1</Min>17 <Max> 1</Max>16 <Min>0</Min> 17 <Max>0</Max> 18 18 </Pitch> 19 19 <Sound>sample_file.wav</Sound> -
Vago/trunk/Vago/soundWizard/soundpage2.h
r801 r1061 3 3 4 4 #include <QWizardPage> 5 #include <droptablewidget.h> 5 6 6 7 #include "util.h" 7 #include "droptablewidget.h"8 8 9 9 namespace Ui { -
Vago/trunk/Vago/soundWizard/soundpage3.ui
r790 r1061 181 181 <widget class="QLineEdit" name="leMinOcclusion"> 182 182 <property name="text"> 183 <string> 3</string>183 <string>0</string> 184 184 </property> 185 185 </widget> … … 195 195 <widget class="QLineEdit" name="leTreshold"> 196 196 <property name="text"> 197 <string> 0</string>197 <string>1</string> 198 198 </property> 199 199 </widget> -
Vago/trunk/Vago/soundWizard/soundpage4.ui
r811 r1061 76 76 <widget class="QLineEdit" name="lePitch"> 77 77 <property name="text"> 78 <string> 1</string>78 <string>0</string> 79 79 </property> 80 80 </widget> … … 90 90 <widget class="QLineEdit" name="leMinPitch"> 91 91 <property name="text"> 92 <string> 1</string>92 <string>0</string> 93 93 </property> 94 94 </widget> … … 104 104 <widget class="QLineEdit" name="leMaxPitch"> 105 105 <property name="text"> 106 <string> 1</string>106 <string>0</string> 107 107 </property> 108 108 </widget> … … 118 118 <widget class="QLineEdit" name="leWeight"> 119 119 <property name="text"> 120 <string>1 0</string>120 <string>1</string> 121 121 </property> 122 122 </widget> -
Vago/trunk/Vago/soundWizard/soundpagefinal.cpp
r1059 r1061 97 97 priorityHigh=field("rbPriorityHigh").toBool(); 98 98 priorityHighest=field("rbPriorityHighest").toBool(); 99 100 if(priorityNormal){101 priority="Normal";102 }103 else if(priorityLow){104 priority="Low";105 }106 else if(priorityHigh){107 priority="High";108 }109 else if(priorityHighest){110 priority="Highest";111 }112 113 if(interruptOnStop){114 flags << "InterruptTracksOnStop";115 }116 117 if(playOnce){118 flags << "PlayOnce";119 }120 121 if(canPan){122 flags << "CanPan";123 }124 125 99 interruptOnStop=field("cbInterruptOnStop").toBool(); 126 100 playOnce=field("cbPlayOnce").toBool(); 127 101 canPan=field("cbCanPan").toBool(); 102 103 if(priorityNormal){ 104 priority="Normal"; 105 } 106 else if(priorityLow){ 107 priority="Low"; 108 } 109 else if(priorityHigh){ 110 priority="High"; 111 } 112 else if(priorityHighest){ 113 priority="Highest"; 114 } 115 116 if(interruptOnStop){ 117 flags << "InterruptTracksOnStop"; 118 } 119 120 if(playOnce){ 121 flags << "PlayOnce"; 122 } 123 124 if(canPan){ 125 flags << "CanPan"; 126 } 128 127 129 128 sphereRadious=Util::normalizeDecimalSeparator(field("leSphereRadious").toString()); … … 207 206 (*this->xmlCommands) 208 207 << "--replace-all-values -e Priority -n "+Util::insertQuotes(priority)+" -f "+Util::insertQuotes(ambFileLocation)+" --no-backups --no-verbose" 209 << "--replace-all-values -e Flags -n "+(flags.join(" ").isEmpty() ? "\" \"": Util::insertQuotes(flags.join(" ")))+" -f "+Util::insertQuotes(ambFileLocation)+" --no-backups --no-verbose"208 << "--replace-all-values -e Flags -n "+(flags.join(" ").isEmpty() ? Util::insertQuotes("") : Util::insertQuotes(flags.join(" ")))+" -f "+Util::insertQuotes(ambFileLocation)+" --no-backups --no-verbose" 210 209 << "--replace-all-values -e SphereRadius -n "+Util::insertQuotes(sphereRadious)+" -f "+Util::insertQuotes(ambFileLocation)+" --no-backups --no-verbose" 211 210 << "--replace-all-values -e Treshold -n "+Util::insertQuotes(treshold)+" -f "+Util::insertQuotes(ambFileLocation)+" --no-backups --no-verbose" -
Vago/trunk/Vago/soundWizard/soundpagefinal.h
r815 r1061 5 5 #include <QDesktopServices> 6 6 #include <QUrl> 7 #include <droptablewidget.h> 7 8 8 #include "droptablewidget.h"9 9 #include "logger.h" 10 10 #include "xmlprocessor.h" -
Vago/trunk/Vago/soundWizard/soundwizard.cpp
r1054 r1061 1 1 #include "soundwizard.h" 2 2 3 SoundWizard::SoundWizard(QString AppDir, QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap) 3 SoundWizard::SoundWizard(QString appDir, QString workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger, QHash<QString, QString> *commandMap) 4 :AbstractWizard(appDir, workspaceWizardLocation, vagoSettings, myLogger, true) 4 5 { 5 this->appLocation=AppDir; 6 this->workspaceWizardLocation=workspaceWizardLocation; 7 this->myLogger=myLogger; 6 this->appDir=appDir; 8 7 this->soundsLocation=this->workspaceWizardLocation+"/Sounds"; 9 8 this->commandMap=commandMap; 10 9 } 10 void SoundWizard::exec(){ 11 11 12 int SoundWizard::exec(){ 13 QPushButton *restartButton = new QPushButton("Restart"); 14 this->myWizard.setButton(QWizard::CustomButton1,restartButton); 15 this->myWizard.setOption(QWizard::HaveCustomButton1, true); 16 17 connect(&this->myWizard, SIGNAL(currentIdChanged(int)), this, SLOT(pageChanged(int))); 18 connect(restartButton, SIGNAL(clicked(bool)), this, SLOT(restartWizard())); 19 20 this->myWizard.setWindowIcon(QIcon(":/new/icons/sound.png")); 21 22 //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/) 23 #ifdef Q_OS_WIN 24 this->myWizard.resize(640,480); 25 #else 26 this->myWizard.resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better 27 // because the components on mac use more space 28 #endif 29 QRect position =this->myWizard.frameGeometry(); 30 position.moveCenter(QDesktopWidget().availableGeometry().center()); 31 this->myWizard.move(position.topLeft()); 32 // 33 34 SoundPage2 *page2 = new SoundPage2(this->appLocation); 12 SoundPage2 *page2 = new SoundPage2(this->appDir); 35 13 SoundPage3 *page3 = new SoundPage3(); 36 14 SoundPage4 *page4 = new SoundPage4(); 37 15 SoundPage5 *page5 = new SoundPage5(); 38 SoundPageFinal *pageFinal = new SoundPageFinal(this->app Location, this->soundsLocation,page2->soundTable,this->myLogger, this->commandMap);16 SoundPageFinal *pageFinal = new SoundPageFinal(this->appDir, this->soundsLocation,page2->soundTable,this->myLogger, this->commandMap); 39 17 40 this->myWizard.addPage(createIntroPage()); 18 this->myWizard.addPage 19 ( 20 createIntroPage 21 ( 22 "Welcome to the Oni Sound wizard.\n" 23 "This wizard will allow you to convert in a few and simple steps sounds to oni format." 24 ) 25 ); 26 41 27 this->myWizard.addPage(page2); 42 28 this->myWizard.addPage(page3); … … 47 33 this->myWizard.setWindowTitle("Sound wizard"); 48 34 49 //If wizard finished with sucess 50 if(myWizard.exec()){ //modal and wait for finalization 51 //createPackage(this->myWizard, page4); 52 } 53 54 return 0; 35 showWizard("Sound wizard", ":/new/icons/sound.png"); 55 36 } 56 37 57 QWizardPage* SoundWizard::createIntroPage() { 58 QWizardPage *page = new QWizardPage; 59 page->setTitle("Introduction"); 38 void SoundWizard::beforeClose(QDialog::DialogCode){ 60 39 61 QLabel *label = new QLabel("Welcome to the Oni Sound wizard.\n"62 "This wizard will allow you to convert in a few and simple steps sounds to oni format.");63 label->setWordWrap(true);64 65 QVBoxLayout *layout = new QVBoxLayout;66 layout->addWidget(label);67 page->setLayout(layout);68 69 return page;70 40 } 71 72 void SoundWizard::restartWizard(){73 this->myWizard.restart();74 }75 76 void SoundWizard::pageChanged(int pageId){77 // Last page?78 if(pageId==5){79 this->myWizard.setOption(QWizard::HaveCustomButton1, true); // set visible80 this->myWizard.button(QWizard::BackButton)->setEnabled(false); // disable back button, use restart if needed81 return;82 }83 this->myWizard.setOption(QWizard::HaveCustomButton1, false); // set invisible84 this->myWizard.button(QWizard::BackButton)->setEnabled(true); // set enable back button85 } -
Vago/trunk/Vago/soundWizard/soundwizard.h
r1054 r1061 13 13 // Local includes 14 14 #include "util.h" 15 #include "abstractwizard.h" 15 16 #include "logger.h" 16 17 #include "soundpage2.h" … … 20 21 #include "soundpagefinal.h" 21 22 22 class SoundWizard: public QObject // for signals and slots23 class SoundWizard: public AbstractWizard 23 24 { 24 Q_OBJECT // for signals and slots 25 public: 26 SoundWizard(QString appLocation, QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap);27 int exec();25 protected: 26 SoundWizard(QString appLocation, QString workspaceWizardLocation, QSettings *vagoSettings, Logger *myLogger, QHash<QString, QString> *commandMap); 27 void exec(); 28 QHash<QString, QString> *commandMap; 28 29 private: 29 QWizard myWizard;30 QWizardPage* createIntroPage();31 32 QString workspaceWizardLocation;33 30 QString soundsLocation; 34 QString appLocation; 35 Logger *myLogger; 36 QHash<QString, QString> *commandMap; 37 private slots: 38 void restartWizard(); 39 void pageChanged(int pageId); 31 void beforeClose(QDialog::DialogCode resultStatus); 40 32 }; 41 33 -
Vago/trunk/Vago/utilvago.h
r1058 r1061 7 7 namespace GlobalVars{ 8 8 9 const QString AppVersion="1. 2";9 const QString AppVersion="1.3"; 10 10 const QString LastCompatibleVersion = "1.0"; 11 11 const QString ToolsFolder = "tools"; -
Vago/trunk/Vago/xmlToolsInterface/xmltoolsinterface.ui
r1059 r1061 33 33 <item row="0" column="0"> 34 34 <widget class="QLabel" name="label"> 35 <property name="toolTip"> 36 <string>XmlTools Operation that you want to perform. 37 Learn more about them in XmlTools documentation page: 38 http://wiki.oni2.net/XmlTools</string> 39 </property> 35 40 <property name="text"> 36 41 <string>XmlTools Operation:</string> … … 40 45 <item row="0" column="1"> 41 46 <widget class="QComboBox" name="cbXmlToolsOperation"> 47 <property name="toolTip"> 48 <string>XmlTools Operation that you want to perform. 49 Learn more about them in XmlTools documentation page: 50 http://wiki.oni2.net/XmlTools</string> 51 </property> 42 52 <item> 43 53 <property name="text"> … … 226 236 </sizepolicy> 227 237 </property> 238 <property name="toolTip"> 239 <string>XML files to process (wildcards supported) 240 241 If you are processing only one file you can also drag and drop it here.</string> 242 </property> 228 243 <property name="text"> 229 244 <string>Input File(s):</string> … … 241 256 </size> 242 257 </property> 258 <property name="toolTip"> 259 <string>XML files to process (wildcards supported) 260 261 If you are processing only one file you can also drag and drop it here.</string> 262 </property> 243 263 </widget> 244 264 </item> … … 260 280 </sizepolicy> 261 281 </property> 282 <property name="toolTip"> 283 <string>Value to be replaced or removed (use space as separator)</string> 284 </property> 262 285 <property name="text"> 263 286 <string>Current Value(s):</string> … … 267 290 <item row="1" column="1"> 268 291 <widget class="QLineEdit" name="leInputCurrentValues"> 292 <property name="toolTip"> 293 <string>Value to be replaced or removed (use space as separator)</string> 294 </property> 269 295 <property name="text"> 270 296 <string/> … … 280 306 </sizepolicy> 281 307 </property> 308 <property name="toolTip"> 309 <string>New value(s) to add or replace current value (use space as separator)</string> 310 </property> 282 311 <property name="text"> 283 312 <string>New Value(s):</string> … … 286 315 </item> 287 316 <item row="2" column="1"> 288 <widget class="QLineEdit" name="leInputNewValues"/> 317 <widget class="QLineEdit" name="leInputNewValues"> 318 <property name="toolTip"> 319 <string>New value(s) to add or replace current value (use space as separator)</string> 320 </property> 321 </widget> 289 322 </item> 290 323 <item row="3" column="0"> … … 296 329 </sizepolicy> 297 330 </property> 331 <property name="toolTip"> 332 <string>Positions to be replaced [use space as separator] (zero-based index)</string> 333 </property> 298 334 <property name="text"> 299 335 <string>Position(s):</string> … … 303 339 <item row="3" column="1"> 304 340 <widget class="QLineEdit" name="leInputPositions"> 341 <property name="toolTip"> 342 <string>Positions to be replaced [use space as separator] (zero-based index)</string> 343 </property> 305 344 <property name="text"> 306 345 <string/> … … 310 349 <item row="4" column="0"> 311 350 <widget class="QLabel" name="lbInputDiffOldNewValue"> 351 <property name="toolTip"> 352 <string>Difference to adjust values by. 353 354 For instance if the current value is 1 and you want it to become 3 (new value), you should input -2: 355 356 1 (current value) - 3 (new value) = -2 357 358 --- 359 360 You can also update multi dimensional values like "1 2 3", type the difference here like "-1 -1 -1". Result would be "2 3 4".</string> 361 </property> 312 362 <property name="text"> 313 363 <string>Diff between old and new value:</string> … … 316 366 </item> 317 367 <item row="4" column="1"> 318 <widget class="QLineEdit" name="leInputDiffOldNewValue"/> 368 <widget class="QLineEdit" name="leInputDiffOldNewValue"> 369 <property name="toolTip"> 370 <string>Difference to adjust values by. 371 372 For instance if the current value is 1 and you want it to become 3 (new value), you should input -2: 373 374 1 (current value) - 3 (new value) = -2 375 376 --- 377 378 You can also update multi dimensional values like "1 2 3", type the difference here like "-1 -1 -1". Result would be "2 3 4".</string> 379 </property> 380 </widget> 319 381 </item> 320 382 </layout> … … 344 406 <item> 345 407 <widget class="QCheckBox" name="cbOptionsNoBackups"> 408 <property name="toolTip"> 409 <string>Don't make backups of XML files (faster processing)</string> 410 </property> 346 411 <property name="text"> 347 412 <string>No Backups</string> … … 375 440 <property name="enabled"> 376 441 <bool>true</bool> 442 </property> 443 <property name="toolTip"> 444 <string>Command for XmlTools generated by this interface, you can copy it, to later input directly in XmlTools</string> 377 445 </property> 378 446 <property name="readOnly"> … … 427 495 </size> 428 496 </property> 497 <property name="toolTip"> 498 <string>Opens a windows which previews your operation. It does NOT make any changes to the input files. 499 500 (only available when exists only one file as input)</string> 501 </property> 429 502 <property name="text"> 430 503 <string>Preview Operation</string> … … 456 529 </size> 457 530 </property> 531 <property name="toolTip"> 532 <string>Applies the operation to the input files</string> 533 </property> 458 534 <property name="text"> 459 535 <string>Apply Operation</string>
Note:
See TracChangeset
for help on using the changeset viewer.