- Timestamp:
- Apr 7, 2013, 5:36:17 PM (12 years ago)
- Location:
- Vago/trunk/Vago
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
Vago/trunk/Vago/mainwindow.cpp
r797 r801 10 10 ui->setupUi(this); 11 11 12 this->AppDir=getOSIndependentAppPath(); 13 12 14 this->setWindowTitle("Vago v"+GlobalVars::AppVersion); 13 15 14 if(!QFile::exists( QDir::currentPath()+"/"+GlobalVars::OniSplitString)){16 if(!QFile::exists(this->AppDir+"/"+GlobalVars::OniSplitString)){ 15 17 Util::showErrorPopUp("OniSplit not found. Please download it at "+GlobalVars::ModsDomain+" and put it in the same folder of Vago. \n\nProgram will now exit."); 16 18 exit(1); 17 19 } 18 20 19 if(!QFile::exists( QDir::currentPath()+"/"+GlobalVars::XmlToolsString)){21 if(!QFile::exists(this->AppDir+"/"+GlobalVars::XmlToolsString)){ 20 22 Util::showErrorPopUp("xmlTools not found. Please download it at "+GlobalVars::ModsDomain+" and put it in the same folder of Vago. \n\nProgram will now exit."); 21 23 exit(1); 22 24 } 23 25 24 this->vagoSettings = new QSettings( QDir::currentPath()+ "/" + this->VagoSettingsName, QSettings::IniFormat);26 this->vagoSettings = new QSettings(this->AppDir + "/" + this->VagoSettingsName, QSettings::IniFormat); 25 27 26 28 //First Execution? Old configuration? Settings missed? … … 31 33 } 32 34 if(!this->vagoSettings->contains("Workspace")){ 33 this->vagoSettings->setValue("Workspace", QDir::currentPath()+"/VagoWorkspace");35 this->vagoSettings->setValue("Workspace", this->AppDir+"/VagoWorkspace"); 34 36 iniChanged=true; 35 37 } … … 161 163 void MainWindow::on_actionSound_Wizard_triggered() 162 164 { 163 SoundWizard myWizard (this-> workspaceWizardsLocation, this->myLogger, &this->commandMap);165 SoundWizard myWizard (this->AppDir, this->workspaceWizardsLocation, this->myLogger, &this->commandMap); 164 166 myWizard.exec(); 165 167 } … … 1500 1502 } 1501 1503 1504 /** 1505 Gets application directory. In mac os gets the .app directory 1506 **/ 1507 QString MainWindow::getOSIndependentAppPath(){ 1508 #ifdef Q_WS_MAC 1509 QDir dir = QDir::current(); 1510 if(dir.absolutePath().contains(".app")){ // include bundle, but we don't want it 1511 dir.cdUp(); 1512 dir.cdUp(); 1513 } 1514 return dir.absolutePath(); 1515 #else 1516 return QDir::currentPath(); 1517 #endif 1518 } 1519 1502 1520 void MainWindow::connectSlots(){ 1503 1521 -
Vago/trunk/Vago/mainwindow.h
r792 r801 46 46 47 47 protected: 48 48 void closeEvent(QCloseEvent *event); 49 49 50 50 private slots: … … 186 186 Ui::MainWindow *ui; 187 187 Logger *myLogger; 188 QString AppDir; 188 189 QString workspaceLocation; //Workspace location 189 190 QString workspaceWizardsLocation; //Workspace wizard location … … 220 221 QString getCommand(DropTableWidget* myTable, QString myOutputFolder, QString from, QString to , QString file); 221 222 QString getTypeConversion(DropTableWidget *myTable); //get the current type for a table 223 QString getOSIndependentAppPath(); 222 224 }; 223 225 -
Vago/trunk/Vago/soundWizard/soundpage2.cpp
r797 r801 3 3 4 4 const QStringList SoundPage2::allowedFiles = QStringList() << "*.wav" << "*.aif" << "*.aifc" << "*.afc"; 5 const QString SoundPage2::codecLocalHelpFile=GlobalVars::HelpLocation + "/XMLSNDD.html#Source_file_creation";6 5 7 SoundPage2::SoundPage2(Q Widget *parent) :6 SoundPage2::SoundPage2(QString appLocation, QWidget *parent) : 8 7 QWizardPage(parent), 9 8 ui(new Ui::soundpage2) … … 11 10 ui->setupUi(this); 12 11 this->soundTable=ui->twSoundFiles; 12 this->codecLocalHelpFile=appLocation+"/"+GlobalVars::HelpDir + "/XMLSNDD.html#Source_file_creation"; 13 13 ui->twSoundFiles->removeColumn(2); // Only two columns 14 14 -
Vago/trunk/Vago/soundWizard/soundpage2.h
r771 r801 18 18 DropTableWidget *soundTable; 19 19 20 explicit SoundPage2(Q Widget *parent = 0);20 explicit SoundPage2(QString appLocation, QWidget *parent = 0); 21 21 ~SoundPage2(); 22 22 … … 37 37 Ui::soundpage2 *ui; 38 38 static const QStringList allowedFiles; 39 static constQString codecLocalHelpFile;39 QString codecLocalHelpFile; 40 40 41 41 bool validatePage(); -
Vago/trunk/Vago/soundWizard/soundwizard.cpp
r793 r801 1 1 #include "soundwizard.h" 2 2 3 SoundWizard::SoundWizard(QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap)3 SoundWizard::SoundWizard(QString appLocation, QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap) 4 4 { 5 this->appLocation=appLocation; 5 6 this->workspaceWizardLocation=workspaceWizardLocation; 6 7 this->myLogger=myLogger; … … 33 34 // 34 35 35 SoundPage2 *page2 = new SoundPage2( );36 SoundPage2 *page2 = new SoundPage2(this->appLocation); 36 37 SoundPage3 *page3 = new SoundPage3(); 37 38 SoundPage4 *page4 = new SoundPage4(); -
Vago/trunk/Vago/soundWizard/soundwizard.h
r771 r801 23 23 Q_OBJECT // for signals and slots 24 24 public: 25 SoundWizard(QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap);25 SoundWizard(QString appLocation, QString workspaceWizardLocation, Logger *myLogger, QHash<QString, QString> *commandMap); 26 26 int exec(); 27 27 private: … … 30 30 QString workspaceWizardLocation; 31 31 QString soundsLocation; 32 QString appLocation; 32 33 Logger *myLogger; 33 34 QWizard *myWizard; -
Vago/trunk/Vago/util.h
r798 r801 9 9 #include <QDesktopServices> 10 10 #include <QUrl> 11 11 #include <QCoreApplication> 12 12 13 13 namespace GlobalVars{ … … 34 34 const QString VagoWebUrl="http://"+ModsDomain+"/node/"+VagoNode; 35 35 const QString VagoTemporaryDir=QDir::tempPath()+"/VagoTemp"; 36 const QString Help Location=QDir::currentPath() + "/help";36 const QString HelpDir="help"; 37 37 const char OniSplitProcSeparator=';'; 38 38 } … … 48 48 QString fullTrim(QString str); 49 49 QString normalizeDecimalSeparator(QString value); 50 50 51 QStringList multipleDirDialog(QString title); 51 52 QStringList substring(QString myString,QString separator,Qt::CaseSensitivity cs = Qt::CaseSensitive); … … 66 67 void showRichErrorPopUp(QString message); 67 68 void openLogFile(); 68 69 69 } 70 70
Note:
See TracChangeset
for help on using the changeset viewer.