#include "Dialog_CueImport.h"
+//UIC includes
+#include "../tmp/UIC_CueSheetImport.h"
+
+//LameXP includes
#include "Global.h"
#include "Model_CueSheet.h"
#include "Model_AudioFile.h"
#include "Thread_CueSplitter.h"
#include "LockedFile.h"
+//Qt includes
#include <QFileInfo>
#include <QMessageBox>
#include <QTimer>
CueImportDialog::CueImportDialog(QWidget *parent, FileListModel *fileList, const QString &cueFile)
:
QDialog(parent),
+ ui(new Ui::CueSheetImport),
m_cueFileName(cueFile),
m_fileList(fileList)
{
//Init the dialog, from the .ui file
- setupUi(this);
+ ui->setupUi(this);
//Fix size
setMinimumSize(this->size());
connect(m_model, SIGNAL(modelReset()), this, SLOT(modelChanged()));
//Setup table view
- treeView->setModel(m_model);
- treeView->header()->setStretchLastSection(false);
- treeView->header()->setResizeMode(QHeaderView::ResizeToContents);
- treeView->header()->setResizeMode(1, QHeaderView::Stretch);
- treeView->header()->setMovable(false);
- treeView->setItemsExpandable(false);
+ ui->treeView->setModel(m_model);
+ ui->treeView->header()->setStretchLastSection(false);
+ ui->treeView->header()->setResizeMode(QHeaderView::ResizeToContents);
+ ui->treeView->header()->setResizeMode(1, QHeaderView::Stretch);
+ ui->treeView->header()->setMovable(false);
+ ui->treeView->setItemsExpandable(false);
//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()));
+ connect(ui->imprtButton, SIGNAL(clicked()), this, SLOT(importButtonClicked()));
+ connect(ui->browseButton, SIGNAL(clicked()), this, SLOT(browseButtonClicked()));
+ connect(ui->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.")));
+ ui->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.")));
}
CueImportDialog::~CueImportDialog(void)
{
LAMEXP_DELETE(m_model);
+ LAMEXP_DELETE(ui);
}
////////////////////////////////////////////////////////////
void CueImportDialog::modelChanged(void)
{
- treeView->expandAll();
- editOutputDir->setText(QDir::toNativeSeparators(m_outputDir));
- labelArtist->setText(m_model->getAlbumPerformer().isEmpty() ? tr("Unknown Artist") : m_model->getAlbumPerformer());
- labelAlbum->setText(m_model->getAlbumTitle().isEmpty() ? tr("Unknown Album") : m_model->getAlbumTitle());
+ ui->treeView->expandAll();
+ ui->editOutputDir->setText(QDir::toNativeSeparators(m_outputDir));
+ ui->labelArtist->setText(m_model->getAlbumPerformer().isEmpty() ? tr("Unknown Artist") : m_model->getAlbumPerformer());
+ ui->labelAlbum->setText(m_model->getAlbumTitle().isEmpty() ? tr("Unknown Album") : m_model->getAlbumTitle());
}
void CueImportDialog::browseButtonClicked(void)