diff --git a/!astyle.bat b/!astyle.bat
deleted file mode 100644
index ebcefbc..0000000
--- a/!astyle.bat
+++ /dev/null
@@ -1,5 +0,0 @@
-@echo off
-set ASTYLEEXE=c:\bin\astyle.exe
-set ASTYLEOPT=-n -Q --options=astyle-cpp-options
-%ASTYLEEXE% %ASTYLEOPT% Util\*.h Util\*.cpp
-%ASTYLEEXE% %ASTYLEOPT% *.h *.cpp --exclude=ui_mainwindow.h
diff --git a/emulator/mainwindow.cpp b/emulator/mainwindow.cpp
index 697a5e1..24cb2a2 100644
--- a/emulator/mainwindow.cpp
+++ b/emulator/mainwindow.cpp
@@ -51,7 +51,6 @@ MainWindow::MainWindow(QWidget *parent) :
QObject::connect(ui->actionDrivesCartridge2, SIGNAL(triggered()), this, SLOT(emulatorCartridge2()));
QObject::connect(ui->actionDrivesHard2, SIGNAL(triggered()), this, SLOT(emulatorHardDrive2()));
QObject::connect(ui->actionDebugConsoleView, SIGNAL(triggered()), this, SLOT(debugConsoleView()));
- QObject::connect(ui->actionDebugDebugView, SIGNAL(triggered()), this, SLOT(debugDebugView()));
QObject::connect(ui->actionDebugDisasmView, SIGNAL(triggered()), this, SLOT(debugDisasmView()));
QObject::connect(ui->actionDebugMemoryView, SIGNAL(triggered()), this, SLOT(debugMemoryView()));
QObject::connect(ui->actionDebugCpuPpu, SIGNAL(triggered()), this, SLOT(debugCpuPpu()));
@@ -94,7 +93,7 @@ MainWindow::MainWindow(QWidget *parent) :
int maxwid = m_screen->maximumWidth() > m_keyboard->maximumWidth() ? m_screen->maximumWidth() : m_keyboard->maximumWidth();
ui->centralWidget->setMaximumWidth(maxwid);
- m_dockDebug = new QDockWidget(tr("Processor"));
+ m_dockDebug = new QDockWidget(tr("Debug"));
m_dockDebug->setObjectName("dockDebug");
m_dockDebug->setWidget(m_debug);
m_dockDebug->setFeatures(m_dockDebug->features() & ~QDockWidget::DockWidgetClosable);
@@ -259,9 +258,11 @@ void MainWindow::updateMenu()
g_pBoard->IsHardImageAttached(2) ? ":/images/iconHdd.svg" : ":/images/iconHddSlot.svg" ));
ui->actionDebugConsoleView->setChecked(m_console->isVisible());
- ui->actionDebugDebugView->setChecked(m_dockDebug->isVisible());
ui->actionDebugDisasmView->setChecked(m_dockDisasm->isVisible());
ui->actionDebugMemoryView->setChecked(m_dockMemory->isVisible());
+
+ if (m_debug != nullptr)
+ m_debug->updateToolbar();
}
void MainWindow::updateAllViews()
@@ -732,16 +733,13 @@ void MainWindow::debugConsoleView()
if (!okShow)
{
+ if (this->isMaximized())
+ this->showNormal();
this->adjustSize();
}
updateMenu();
}
-void MainWindow::debugDebugView()
-{
- m_dockDebug->setVisible(!m_dockDebug->isVisible());
- updateMenu();
-}
void MainWindow::debugDisasmView()
{
m_dockDisasm->setVisible(!m_dockDisasm->isVisible());
@@ -774,6 +772,7 @@ void MainWindow::debugClearConsole()
{
m_console->clear();
}
+
void MainWindow::debugRemoveAllBreakpoints()
{
m_console->execConsoleCommand("bc");
diff --git a/emulator/mainwindow.h b/emulator/mainwindow.h
index 230a1ac..7b718da 100644
--- a/emulator/mainwindow.h
+++ b/emulator/mainwindow.h
@@ -68,7 +68,6 @@ public slots:
void emulatorHardDrive2();
void debugCpuPpu();
void debugConsoleView();
- void debugDebugView();
void debugDisasmView();
void debugMemoryView();
void debugStepInto();
diff --git a/emulator/mainwindow.ui b/emulator/mainwindow.ui
index 2f9dc2a..5d1f101 100644
--- a/emulator/mainwindow.ui
+++ b/emulator/mainwindow.ui
@@ -78,7 +78,6 @@
-
@@ -353,14 +352,6 @@
Step Over
-
-
- true
-
-
- Processor View
-
-
true
diff --git a/emulator/qconsoleview.cpp b/emulator/qconsoleview.cpp
index 8d68c06..5bb9244 100644
--- a/emulator/qconsoleview.cpp
+++ b/emulator/qconsoleview.cpp
@@ -40,6 +40,7 @@ QConsoleView::QConsoleView()
QFont font = Common_GetMonospacedFont();
m_log->setReadOnly(true);
m_log->setFont(font);
+ m_prompt->setFont(font);
m_edit->setFont(font);
QObject::connect(m_edit, SIGNAL(returnPressed()), this, SLOT(execConsoleCommand()));
diff --git a/emulator/qdebugview.cpp b/emulator/qdebugview.cpp
index 7d50ede..09058fd 100644
--- a/emulator/qdebugview.cpp
+++ b/emulator/qdebugview.cpp
@@ -56,16 +56,26 @@ QDebugView::QDebugView(QWidget *mainWindow) :
m_memmapCtrl = new QDebugMemoryMapCtrl(this);
m_memmapCtrl->setGeometry(x, 0, cxMemmap, cyHeight);
+ m_actionDebugger = m_toolbar->addAction(QIcon(":/images/iconDebugger.svg"), "");
QAction* actionCpuPpu = m_toolbar->addAction(QIcon(":/images/iconCpuPpu.svg"), "");
m_toolbar->addSeparator();
QAction* actionStepInto = m_toolbar->addAction(QIcon(":/images/iconStepInto.svg"), "");
QAction* actionStepOver = m_toolbar->addAction(QIcon(":/images/iconStepOver.svg"), "");
+ m_actionDebugger->setCheckable(true);
+ QObject::connect(m_actionDebugger, SIGNAL(triggered()), mainWindow, SLOT(debugConsoleView()));
QObject::connect(actionCpuPpu, SIGNAL(triggered()), this, SLOT(switchCpuPpu()));
QObject::connect(actionStepInto, SIGNAL(triggered()), mainWindow, SLOT(debugStepInto()));
QObject::connect(actionStepOver, SIGNAL(triggered()), mainWindow, SLOT(debugStepOver()));
setFocusPolicy(Qt::ClickFocus);
+
+ updateToolbar();
+}
+
+void QDebugView::updateToolbar()
+{
+ m_actionDebugger->setChecked(true);
}
void QDebugView::updateWindowText()
diff --git a/emulator/qdebugview.h b/emulator/qdebugview.h
index f6f9029..87c9ce5 100644
--- a/emulator/qdebugview.h
+++ b/emulator/qdebugview.h
@@ -20,6 +20,7 @@ class QDebugView : public QWidget
void setCurrentProc(bool okProc);
CProcessor* getCurrentProc() const;
bool isCpuOrPpu() const;
+ void updateToolbar();
void updateData();
void updateWindowText();
@@ -34,6 +35,7 @@ public slots:
private:
QToolBar* m_toolbar;
+ QAction* m_actionDebugger;
QDebugCtrl* m_procCtrl;
QDebugCtrl* m_stackCtrl;
QDebugCtrl* m_portsCtrl;