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>
<translation>Fehlende Quelldatei (Tracks werden übersprungen!)</translation>
</message>
<message>
<source>Load a different Cue Sheet</source>
<translation>Ein anderes Cuesheet laden</translation>
</message>
</context>
<context>
<name>CueSheetModel</name>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -514,6 +514,26 @@
</item>
<item>
<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>
<spacer name="horizontalSpacer">
<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"/>
</resources>
<connections>
<connection>
<sender>abortButton</sender>
<signal>clicked()</signal>
<receiver>CueSheetImport</receiver>
<slot>close()</slot>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>688</x>

View File

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

View File

@ -71,6 +71,7 @@ CueImportDialog::CueImportDialog(QWidget *parent, FileListModel *fileList, const
//Enable up/down button
connect(imprtButton, SIGNAL(clicked()), this, SLOT(importButtonClicked()));
connect(browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
connect(loadOtherButton, SIGNAL(clicked()), this, SLOT(loadOtherButtonClicked()));
//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.")));
@ -226,6 +227,11 @@ void CueImportDialog::importButtonClicked(void)
accept();
}
void CueImportDialog::loadOtherButtonClicked(void)
{
done(-1);
}
void CueImportDialog::analyzedFile(const AudioFileModel &file)
{
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();
}
//Release locks
while(!m_locks.isEmpty())
{

View File

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

View File

@ -1570,30 +1570,37 @@ void MainWindow::importCueSheetActionTriggered(bool checked)
TEMP_HIDE_DROPBOX
(
QString selectedCueFile;
while(true)
{
int result = 0;
QString selectedCueFile;
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())
if(USE_NATIVE_FILE_DIALOG)
{
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())
{
m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath());
CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile);
cueImporter->exec();
LAMEXP_DELETE(cueImporter);
if(!selectedCueFile.isEmpty())
{
m_settings->mostRecentInputPath(QFileInfo(selectedCueFile).canonicalPath());
CueImportDialog *cueImporter = new CueImportDialog(this, m_fileListModel, selectedCueFile);
result = cueImporter->exec();
LAMEXP_DELETE(cueImporter);
}
qWarning("Result was %d", result);
if(result != (-1)) break;
}
)
}