--- Vago/trunk/Vago/soundWizard/soundpage2.cpp 2013/03/31 19:02:16 771
+++ Vago/trunk/Vago/soundWizard/soundpage2.cpp 2013/04/07 15:36:17 801
@@ -2,16 +2,21 @@
#include "ui_soundpage2.h"
const QStringList SoundPage2::allowedFiles = QStringList() << "*.wav" << "*.aif" << "*.aifc" << "*.afc";
-const QString SoundPage2::codecLocalHelpFile=GlobalVars::HelpLocation + "/XMLSNDD.html#Source_file_creation";
-SoundPage2::SoundPage2(QWidget *parent) :
+SoundPage2::SoundPage2(QString appLocation, QWidget *parent) :
QWizardPage(parent),
ui(new Ui::soundpage2)
{
ui->setupUi(this);
this->soundTable=ui->twSoundFiles;
+ this->codecLocalHelpFile=appLocation+"/"+GlobalVars::HelpDir + "/XMLSNDD.html#Source_file_creation";
ui->twSoundFiles->removeColumn(2); // Only two columns
+ ui->label->setText("Add here the files you want to convert. "
+ "All the files will have the same properties applied.
"
+ "Don't forget to first convert the files to an oni compatible codec. "
+ "More information here."); // Don't use rich text in qtdesigner because it generates platform dependent code
+
// Drop signal for Packages table
connect(ui->twSoundFiles, SIGNAL(dropped(DropTableWidget*,QStringList)), this, SLOT(addResourcesSounds(DropTableWidget*,QStringList)));
// Signal for click in label (display local help)
@@ -66,15 +71,15 @@ void SoundPage2::addResourcesSounds(Drop
//Pre-processing (check if received only folders)
foreach(QString myFile, resources){
- QString currFileExt=QFileInfo(myFile).completeSuffix();
+ QString currFileExt="."+QFileInfo(myFile).completeSuffix();
if(QDir(myFile).exists()){
Util::showErrorPopUp("Only files are allowed for this operation.");
return;
}
foreach(QString vext, this->allowedFiles){
- vext.remove("*.");
- if(vext==currFileExt){
+ vext.remove("*");
+ if(currFileExt.endsWith(vext)){
fileExtValid=true;
break;
}