mirror of
https://github.com/markdavidlong/AppleSAWS.git
synced 2024-12-21 22:29:30 +00:00
Added Unload Disk Image action.
This commit is contained in:
parent
26b1eea952
commit
80d4a47d9d
@ -10,9 +10,11 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
m_disk = 0;
|
m_disk = 0;
|
||||||
|
|
||||||
|
ui->action_Unload_Disk_Image->setEnabled(false);
|
||||||
|
|
||||||
connect(ui->action_Quit, SIGNAL(triggered()), qApp, SLOT(quit()));
|
connect(ui->action_Quit, SIGNAL(triggered()), qApp, SLOT(quit()));
|
||||||
connect(ui->action_Load_Disk_Image, SIGNAL(triggered()), SLOT(showLoadDialog()));
|
connect(ui->action_Load_Disk_Image, SIGNAL(triggered()), SLOT(showLoadDialog()));
|
||||||
|
connect(ui->action_Unload_Disk_Image, SIGNAL(triggered()), SLOT(unloadDiskFile()));
|
||||||
connect(this, SIGNAL(diskFileLoading(QString, DiskFile*)),
|
connect(this, SIGNAL(diskFileLoading(QString, DiskFile*)),
|
||||||
ui->catalogWidget, SLOT(prepForNewDisk(QString,DiskFile*)));
|
ui->catalogWidget, SLOT(prepForNewDisk(QString,DiskFile*)));
|
||||||
connect(this, SIGNAL(diskFileLoaded(QString,DiskFile*)),
|
connect(this, SIGNAL(diskFileLoaded(QString,DiskFile*)),
|
||||||
@ -35,6 +37,7 @@ void MainWindow::loadDiskFile(QString filename)
|
|||||||
m_disk = new DiskFile();
|
m_disk = new DiskFile();
|
||||||
emit diskFileLoading(filename,m_disk);
|
emit diskFileLoading(filename,m_disk);
|
||||||
if (m_disk->read(filename)) {
|
if (m_disk->read(filename)) {
|
||||||
|
ui->action_Unload_Disk_Image->setEnabled(true);
|
||||||
emit diskFileLoaded(filename,m_disk);
|
emit diskFileLoaded(filename,m_disk);
|
||||||
} else {
|
} else {
|
||||||
emit diskFileLoadFailed(filename,m_disk);
|
emit diskFileLoadFailed(filename,m_disk);
|
||||||
@ -48,6 +51,7 @@ void MainWindow::unloadDiskFile()
|
|||||||
emit diskFileUnloading(m_disk);
|
emit diskFileUnloading(m_disk);
|
||||||
delete m_disk;
|
delete m_disk;
|
||||||
m_disk = 0;
|
m_disk = 0;
|
||||||
|
ui->action_Unload_Disk_Image->setEnabled(false);
|
||||||
emit diskFileUnloaded();
|
emit diskFileUnloaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@
|
|||||||
<string>&File</string>
|
<string>&File</string>
|
||||||
</property>
|
</property>
|
||||||
<addaction name="action_Load_Disk_Image"/>
|
<addaction name="action_Load_Disk_Image"/>
|
||||||
|
<addaction name="action_Unload_Disk_Image"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="action_Quit"/>
|
<addaction name="action_Quit"/>
|
||||||
</widget>
|
</widget>
|
||||||
@ -102,6 +103,11 @@
|
|||||||
<string>&Quit</string>
|
<string>&Quit</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="action_Unload_Disk_Image">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Unload Disk Image</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
Loading…
Reference in New Issue
Block a user