36 lines
875 B
C++
36 lines
875 B
C++
|
|
#include "BatchSelectionDialog.h"
|
||
|
|
#include "ui_BatchSelectionDialog.h"
|
||
|
|
|
||
|
|
#include <QPushButton>
|
||
|
|
|
||
|
|
BatchSelectionDialog::BatchSelectionDialog(const QString& title, QWidget* parent)
|
||
|
|
: QDialog(parent)
|
||
|
|
, ui(new Ui::BatchSelectionDialog)
|
||
|
|
{
|
||
|
|
ui->setupUi(this);
|
||
|
|
setWindowTitle(title);
|
||
|
|
|
||
|
|
connect(ui->btnSelectFile, &QPushButton::clicked,
|
||
|
|
this, &BatchSelectionDialog::onSelectFileClicked);
|
||
|
|
connect(ui->btnSelectDirectory, &QPushButton::clicked,
|
||
|
|
this, &BatchSelectionDialog::onSelectDirectoryClicked);
|
||
|
|
connect(ui->btnCancel, &QPushButton::clicked, this, &QDialog::reject);
|
||
|
|
}
|
||
|
|
|
||
|
|
BatchSelectionDialog::~BatchSelectionDialog()
|
||
|
|
{
|
||
|
|
delete ui;
|
||
|
|
}
|
||
|
|
|
||
|
|
void BatchSelectionDialog::onSelectFileClicked()
|
||
|
|
{
|
||
|
|
m_mode = Mode::File;
|
||
|
|
accept();
|
||
|
|
}
|
||
|
|
|
||
|
|
void BatchSelectionDialog::onSelectDirectoryClicked()
|
||
|
|
{
|
||
|
|
m_mode = Mode::Directory;
|
||
|
|
accept();
|
||
|
|
}
|