Added a button for loading a different Cue Sheet to the Cue Sheet importer dialog.

This commit is contained in:
LoRd_MuldeR 2011-09-29 17:36:38 +02:00
parent 8e63e2e4ec
commit 4c867dc325
13 changed files with 90 additions and 660 deletions

File diff suppressed because it is too large Load Diff

View File

@ -412,6 +412,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation>Fehlende Quelldatei (Tracks werden übersprungen!)</translation> <translation>Fehlende Quelldatei (Tracks werden übersprungen!)</translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation>Ein anderes Cuesheet laden</translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -412,6 +412,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation>El archivo de origen no existe (¡Se saltarán pistas!)</translation> <translation>El archivo de origen no existe (¡Se saltarán pistas!)</translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -416,6 +416,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation>Fichier source manquant (les pistes seront ignorées !)</translation> <translation>Fichier source manquant (les pistes seront ignorées !)</translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -412,6 +412,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -412,6 +412,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -414,6 +414,10 @@
<source>Missing Source File (Tracks will be skipped!)</source> <source>Missing Source File (Tracks will be skipped!)</source>
<translation type="unfinished">Файл не найден (будет пропущен!)</translation> <translation type="unfinished">Файл не найден (будет пропущен!)</translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -413,6 +413,10 @@
<source>Discard</source> <source>Discard</source>
<translation>Відмінити</translation> <translation>Відмінити</translation>
</message> </message>
<message>
<source>Load a different Cue Sheet</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>CueSheetModel</name> <name>CueSheetModel</name>

View File

@ -514,6 +514,26 @@
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QPushButton" name="loadOtherButton">
<property name="minimumSize">
<size>
<width>175</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>Load a different Cue Sheet</string>
</property>
<property name="icon">
<iconset resource="../res/Icons.qrc">
<normaloff>:/icons/folder_explore.png</normaloff>:/icons/folder_explore.png</iconset>
</property>
<property name="autoDefault">
<bool>false</bool>
</property>
</widget>
</item>
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
@ -626,13 +646,14 @@
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/> <include location="../res/Images.qrc"/>
<include location="../res/Images.qrc"/>
</resources> </resources>
<connections> <connections>
<connection> <connection>
<sender>abortButton</sender> <sender>abortButton</sender>
<signal>clicked()</signal> <signal>clicked()</signal>
<receiver>CueSheetImport</receiver> <receiver>CueSheetImport</receiver>
<slot>close()</slot> <slot>reject()</slot>
<hints> <hints>
<hint type="sourcelabel"> <hint type="sourcelabel">
<x>688</x> <x>688</x>

View File

@ -30,7 +30,7 @@
#define VER_LAMEXP_MINOR_LO 3 #define VER_LAMEXP_MINOR_LO 3
#define VER_LAMEXP_TYPE Beta #define VER_LAMEXP_TYPE Beta
#define VER_LAMEXP_PATCH 2 #define VER_LAMEXP_PATCH 2
#define VER_LAMEXP_BUILD 699 #define VER_LAMEXP_BUILD 700
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Tools versions // Tools versions

View File

@ -71,6 +71,7 @@ CueImportDialog::CueImportDialog(QWidget *parent, FileListModel *fileList, const
//Enable up/down button //Enable up/down button
connect(imprtButton, SIGNAL(clicked()), this, SLOT(importButtonClicked())); connect(imprtButton, SIGNAL(clicked()), this, SLOT(importButtonClicked()));
connect(browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked())); connect(browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
connect(loadOtherButton, SIGNAL(clicked()), this, SLOT(loadOtherButtonClicked()));
//Translate //Translate
labelHeaderText->setText(QString("<b>%1</b><br>%2").arg(tr("Import Cue Sheet"), tr("The following Cue Sheet will be split and imported into LameXP."))); labelHeaderText->setText(QString("<b>%1</b><br>%2").arg(tr("Import Cue Sheet"), tr("The following Cue Sheet will be split and imported into LameXP.")));
@ -226,6 +227,11 @@ void CueImportDialog::importButtonClicked(void)
accept(); accept();
} }
void CueImportDialog::loadOtherButtonClicked(void)
{
done(-1);
}
void CueImportDialog::analyzedFile(const AudioFileModel &file) void CueImportDialog::analyzedFile(const AudioFileModel &file)
{ {
qDebug("Received result: <%s> <%s/%s>", file.filePath().toLatin1().constData(), file.formatContainerType().toLatin1().constData(), file.formatAudioType().toLatin1().constData()); qDebug("Received result: <%s> <%s/%s>", file.filePath().toLatin1().constData(), file.formatContainerType().toLatin1().constData(), file.formatAudioType().toLatin1().constData());
@ -264,7 +270,6 @@ void CueImportDialog::importCueSheet(void)
splitFiles(); splitFiles();
} }
//Release locks //Release locks
while(!m_locks.isEmpty()) while(!m_locks.isEmpty())
{ {

View File

@ -46,6 +46,7 @@ protected:
private slots: private slots:
void browseButtonClicked(void); void browseButtonClicked(void);
void importButtonClicked(void); void importButtonClicked(void);
void loadOtherButtonClicked(void);
void modelChanged(void); void modelChanged(void);
void analyzedFile(const AudioFileModel &file); void analyzedFile(const AudioFileModel &file);

View File

@ -1570,30 +1570,37 @@ void MainWindow::importCueSheetActionTriggered(bool checked)
TEMP_HIDE_DROPBOX TEMP_HIDE_DROPBOX
( (
QString selectedCueFile; while(true)
{
int result = 0;
QString selectedCueFile;
if(USE_NATIVE_FILE_DIALOG) if(USE_NATIVE_FILE_DIALOG)
{
selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
}
else
{
QFileDialog dialog(this, tr("Open Cue Sheet"));
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
dialog.setDirectory(m_settings->mostRecentInputPath());
if(dialog.exec())
{ {
selectedCueFile = dialog.selectedFiles().first(); selectedCueFile = QFileDialog::getOpenFileName(this, tr("Open Cue Sheet"), m_settings->mostRecentInputPath(), QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
}
else
{
QFileDialog dialog(this, tr("Open Cue Sheet"));
dialog.setFileMode(QFileDialog::ExistingFile);
dialog.setNameFilter(QString("%1 (*.cue)").arg(tr("Cue Sheet File")));
dialog.setDirectory(m_settings->mostRecentInputPath());
if(dialog.exec())
{
selectedCueFile = dialog.selectedFiles().first();
}
} }
}
if(!selectedCueFile.isEmpty()) if(!selectedCueFile.isEmpty())
{ {
m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath()); m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath());
CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile); CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile);
cueImporter->exec(); result = cueImporter->exec();
LAMEXP_DELETE(cueImporter); LAMEXP_DELETE(cueImporter);
}
qWarning("Result was %d", result);
if(result != (-1)) break;
} }
) )
} }