From 51f0617fcea9ed30afee1ef49afc606466f7f077 Mon Sep 17 00:00:00 2001 From: Nikita Zimin Date: Wed, 3 Jan 2024 14:28:08 +0300 Subject: [PATCH] Minor UI changes --- !astyle.bat => emulator/!astyle.bat | 2 +- emulator/mainwindow.cpp | 9 +-------- emulator/mainwindow.h | 1 - emulator/mainwindow.ui | 9 --------- emulator/qconsoleview.cpp | 1 + emulator/qdialogs.cpp | 4 ++++ 6 files changed, 7 insertions(+), 19 deletions(-) rename !astyle.bat => emulator/!astyle.bat (73%) diff --git a/!astyle.bat b/emulator/!astyle.bat similarity index 73% rename from !astyle.bat rename to emulator/!astyle.bat index 70a2707..65edbd2 100644 --- a/!astyle.bat +++ b/emulator/!astyle.bat @@ -1,5 +1,5 @@ @echo off set ASTYLEEXE=c:\bin\astyle.exe -set ASTYLEOPT=-n -Q --options=astyle-cpp-options +set ASTYLEOPT=-n -Q --options=..\astyle-cpp-options %ASTYLEEXE% %ASTYLEOPT% *.h *.cpp --exclude=ui_mainwindow.h %ASTYLEEXE% %ASTYLEOPT% Util\*.h Util\*.cpp diff --git a/emulator/mainwindow.cpp b/emulator/mainwindow.cpp index e55c2a3..bbc8278 100644 --- a/emulator/mainwindow.cpp +++ b/emulator/mainwindow.cpp @@ -52,7 +52,6 @@ MainWindow::MainWindow(QWidget *parent) : QObject::connect(ui->actionConfBK11, SIGNAL(triggered()), this, SLOT(configurationBK0011())); QObject::connect(ui->actionConfBK11Fdd, SIGNAL(triggered()), this, SLOT(configurationBK0011Fdd())); 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->actionDebugTeletypeView, SIGNAL(triggered()), this, SLOT(debugTeletypeView())); @@ -116,7 +115,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); @@ -286,7 +285,6 @@ void MainWindow::updateMenu() g_pBoard->IsFloppyImageAttached(3) ? ":/images/iconFloppy.svg" : ":/images/iconFloppySlot.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()); ui->actionDebugTeletypeView->setChecked(m_dockTeletype->isVisible()); @@ -649,11 +647,6 @@ void MainWindow::debugConsoleView() updateMenu(); } -void MainWindow::debugDebugView() -{ - m_dockDebug->setVisible(!m_dockDebug->isVisible()); - updateMenu(); -} void MainWindow::debugDisasmView() { m_dockDisasm->setVisible(!m_dockDisasm->isVisible()); diff --git a/emulator/mainwindow.h b/emulator/mainwindow.h index 56a80a2..a9c692f 100644 --- a/emulator/mainwindow.h +++ b/emulator/mainwindow.h @@ -64,7 +64,6 @@ public slots: void configurationBK0011Fdd(); void emulatorFloppy(int slot); void debugConsoleView(); - void debugDebugView(); void debugDisasmView(); void debugMemoryView(); void debugTeletypeView(); diff --git a/emulator/mainwindow.ui b/emulator/mainwindow.ui index 9ac216c..ca5e0d6 100644 --- a/emulator/mainwindow.ui +++ b/emulator/mainwindow.ui @@ -85,7 +85,6 @@ - @@ -321,14 +320,6 @@ Load BIN... - - - true - - - Processor View - - true diff --git a/emulator/qconsoleview.cpp b/emulator/qconsoleview.cpp index 27f845f..cf983e5 100644 --- a/emulator/qconsoleview.cpp +++ b/emulator/qconsoleview.cpp @@ -38,6 +38,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/qdialogs.cpp b/emulator/qdialogs.cpp index de08246..310657a 100644 --- a/emulator/qdialogs.cpp +++ b/emulator/qdialogs.cpp @@ -11,6 +11,10 @@ QInputOctalDialog::QInputOctalDialog(QWidget *parent, const QString & title, qui { m_result = value; + QFont font = Common_GetMonospacedFont(); + m_editOctal.setFont(font); + m_editHex.setFont(font); + setWindowTitle(title); resize(260, 120); m_labelOctal.setText(tr("Octal"));