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

Comparing Vago/trunk/Vago/soundWizard/soundwizard.cpp (file contents):
Revision 771 by s10k, Sun Mar 31 19:02:16 2013 UTC vs.
Revision 998 by s10k, Fri Apr 25 21:05:54 2014 UTC

# Line 1 | Line 1
1   #include "soundwizard.h"
2  
3 < SoundWizard::SoundWizard(QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap)
3 > SoundWizard::SoundWizard(QString AppDir, QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap)
4   {
5 +    this->appLocation=AppDir;
6      this->workspaceWizardLocation=workspaceWizardLocation;
7      this->myLogger=myLogger;
8      this->soundsLocation=this->workspaceWizardLocation+"/Sounds";
# Line 21 | Line 22 | int SoundWizard::exec(){
22      this->myWizard->setWindowIcon(QIcon(":/new/icons/sound.png"));
23  
24      //Center and resize QWizard (http://www.thedazzlersinc.com/source/2012/06/04/qt-center-window-in-screen/)
25 + #ifdef Q_OS_WIN
26      this->myWizard->resize(640,480);
27 + #else
28 +    this->myWizard->resize(800,600); // Mac OS pcs should be able to render this resolution without any problem. It's also better
29 +    // because the components on mac use more space
30 + #endif
31      QRect position = this->myWizard->frameGeometry();
32      position.moveCenter(QDesktopWidget().availableGeometry().center());
33      this->myWizard->move(position.topLeft());
34      //
35  
36 <    SoundPage2 *page2 = new SoundPage2();
36 >    SoundPage2 *page2 = new SoundPage2(this->appLocation);
37      SoundPage3 *page3 = new SoundPage3();
38      SoundPage4 *page4 = new SoundPage4();
39 <    SoundPageFinal *pageFinal = new SoundPageFinal(this->soundsLocation,page2->soundTable,this->myLogger, this->commandMap);
39 >    SoundPageFinal *pageFinal = new SoundPageFinal(this->appLocation, this->soundsLocation,page2->soundTable,this->myLogger, this->commandMap);
40  
41      this->myWizard->addPage(createIntroPage());
42      this->myWizard->addPage(page2);
# Line 73 | Line 79 | void SoundWizard::pageChanged(int pageId
79      // Last page?
80      if(pageId==4){
81          this->myWizard->setOption(QWizard::HaveCustomButton1, true); // set visible
82 +        this->myWizard->button(QWizard::BackButton)->setEnabled(false); // disable back button, use restart if needed
83          return;
84      }
85      this->myWizard->setOption(QWizard::HaveCustomButton1, false); // set invisible
86 +    this->myWizard->button(QWizard::BackButton)->setEnabled(true); // set enable back button
87   }

Diff Legend

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