| 42 | }; |
| 43 | |
| 44 | RomSelection::RomSelection(QWidget *parent) : QDialog{parent}, ui(new Ui::RomSelection) { |
| 45 | ui->setupUi(this); |
| 46 | |
| 47 | setWindowModality(Qt::NonModal); |
| 48 | setWindowFlags(Qt::WindowTitleHint | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint ); |
| 49 | |
| 50 | connect(ui->buttonClose, &QToolButton::clicked, this, &RomSelection::close); |
| 51 | connect(ui->buttonOpen, &QToolButton::clicked, this, &RomSelection::browseForROM); |
| 52 | connect(ui->buttonCreate, &QToolButton::clicked, this, &RomSelection::nextPage); |
| 53 | connect(ui->buttonNext2, &QPushButton::clicked, this, &RomSelection::nextPage); |
| 54 | connect(ui->buttonBack1, &QPushButton::clicked, this, &RomSelection::prevPage); |
| 55 | connect(ui->buttonBack2, &QPushButton::clicked, this, &RomSelection::prevPage); |
| 56 | connect(ui->buttonDump, &QPushButton::clicked, this, &RomSelection::saveDumpProgram); |
| 57 | connect(ui->buttonBrowseSave, &QPushButton::clicked, this, &RomSelection::saveROMImage); |
| 58 | connect(ui->dropArea, &DropArea::clicked, this, &RomSelection::openROMSegments); |
| 59 | |
| 60 | // ensure we are on the correct page |
| 61 | ui->stackedWidget->setCurrentIndex(0); |
| 62 | |
| 63 | // drop stuff |
| 64 | ui->dropArea->clear(); |
| 65 | connect(ui->dropArea, &DropArea::processDrop, this, &RomSelection::processDrop); |
| 66 | |
| 67 | ui->versionLabel->setText(ui->versionLabel->text() + QStringLiteral(CEMU_VERSION " (git: " CEMU_GIT_SHA ")")); |
| 68 | |
| 69 | ui->progressBar->setEnabled(false); |
| 70 | } |
| 71 | |
| 72 | RomSelection::~RomSelection() { |
| 73 | delete m_array; |