forked from Larswad/uno2iec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mountspecificfile.cpp
executable file
·44 lines (34 loc) · 1.02 KB
/
mountspecificfile.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <QFileDialog>
#include <iso646.h>
#include "mountspecificfile.h"
#include "ui_mountspecificfile.h"
MountSpecificFile::MountSpecificFile(const QString& lastMounted, QWidget *parent) :
QDialog(parent),
ui(new Ui::MountSpecificFile)
{
ui->setupUi(this);
ui->singleImageName->setText(lastMounted);
} // ctor
MountSpecificFile::~MountSpecificFile()
{
delete ui;
} // dtor
void MountSpecificFile::on_browseSingle_clicked()
{
QString file = QFileDialog::getOpenFileName(this, tr("Please choose image to mount."), ui->singleImageName->text()
, tr("CBM Images (*.d64 *.t64 *.m2i);;All files (*)"));
if(not file.isEmpty())
ui->singleImageName->setText(file);
} // on_browseSingle_clicked
const QString MountSpecificFile::chosenFile()
{
return ui->singleImageName->text();
} // chosenFile
void MountSpecificFile::on_mountSingle_clicked()
{
accept();
} // on_mountSingle_clicked
void MountSpecificFile::on_cancel_clicked()
{
reject();
} // on_cancel_clicked