]> Shamusworld >> Repos - wozmaker/blobdiff - src/mainwin.cpp
Add "settings" dialog, fixes to work with MXE cross-compilation.
[wozmaker] / src / mainwin.cpp
index e98031dbc0919565b30781f4c70c688ff9b9f25b..4ca0ae1716a2d12e8e8f30638ec3cc42fe6b9633 100644 (file)
@@ -17,6 +17,7 @@
 #include "mainwidget.h"
 #include "navwidget.h"
 #include "nibblewidget.h"
+#include "settingsdialog.h"
 #include "waveformwidget.h"
 
 
@@ -31,8 +32,11 @@ MainWin::MainWin()
        loadFile = CreateAction(tr("&Open"), tr("Open A2R"), tr("Open an A2R file"), QIcon(), QKeySequence(tr("ctrl+o")));
        connect(loadFile, SIGNAL(triggered()), this, SLOT(HandleLoadFile()));
 
-       newGame = CreateAction(tr("&New"), tr("New Game"), tr("Start a new game of Warehouse Man Deluxe"), QIcon(), QKeySequence(tr("ctrl+n")));
-//     connect(newGame, SIGNAL(triggered()), this, SLOT(HandleNewGame()));
+       saveFile = CreateAction(tr("&Save"), tr("Save WOZ"), tr("Save a WOZ file"), QIcon(), QKeySequence(tr("ctrl+s")));
+       connect(saveFile, SIGNAL(triggered()), this, SLOT(HandleSaveFile()));
+
+       settings = CreateAction(tr("&Disk Settings"), tr("Disk Settings"), tr("Settings for the loaded A2R file"), QIcon(), QKeySequence(tr("ctrl+d")));
+       connect(settings, SIGNAL(triggered()), this, SLOT(HandleSettings()));
 
        undoAction = CreateAction(tr("&Undo"), tr(""), tr(""), QIcon(), QKeySequence(tr("ctrl+z")));
 //     connect(undoAction, SIGNAL(triggered()), this, SLOT(HandleUndo()));
@@ -66,6 +70,8 @@ MainWin::MainWin()
 
        QMenu * menu = menuBar()->addMenu(tr("&File"));
        menu->addAction(loadFile);
+       menu->addAction(saveFile);
+       menu->addAction(settings);
        menu->addSeparator();
 //     menu->addAction(undoAction);
 //     menu->addAction(resetLevel);
@@ -197,6 +203,22 @@ void MainWin::HandleLoadFile(void)
 }
 
 
+void MainWin::HandleSaveFile(void)
+{
+}
+
+
+void MainWin::HandleSettings(void)
+{
+       SettingsDialog dlg(this);
+
+       if (dlg.exec() == false)
+               return;
+
+       // Deal with stuff here, since user hit "OK" button
+}
+
+
 void MainWin::AboutWozMaker(void)
 {
        QMessageBox::about(this, tr("About WOZ Maker"), tr("WOZ Maker v1.0.0\n\nWritten by James Hammons\n\nCopyright (C) 2018 Underground Software"));