diff --git a/CHANGELOG.md b/CHANGELOG.md index 213ae7a..551533c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ * Add new Image Visualizer. - View RGB888 and RGBA8888 images. * Assembly Tab can show source lines along with assembly. +* Add help for the main window's tab bar. ## [1.12] - 2022-10-22 diff --git a/src/SeerMainWindow.cpp b/src/SeerMainWindow.cpp index e881268..3b04cdc 100644 --- a/src/SeerMainWindow.cpp +++ b/src/SeerMainWindow.cpp @@ -3,10 +3,12 @@ #include "SeerConfigDialog.h" #include "SeerArgumentsDialog.h" #include "SeerAboutDialog.h" +#include "SeerHelpPageWidget.h" #include "SeerUtl.h" #include #include #include +#include #include #include #include @@ -43,6 +45,13 @@ SeerMainWindow::SeerMainWindow(QWidget* parent) : QMainWindow(parent) { toolBar->addWidget(_progressIndicator); + // Add help button. + QToolButton* helpToolButton = new QToolButton(this); + helpToolButton->setIcon(QIcon(":/seer/resources/RelaxLightIcons/help-about.svg")); + helpToolButton->setToolTip("Help on source/symbol/library information."); + + toolBar->addWidget(helpToolButton); + // Set up Styles menu. _styleMenuActionGroup = new QActionGroup(this); #if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)) @@ -155,6 +164,8 @@ SeerMainWindow::SeerMainWindow(QWidget* parent) : QMainWindow(parent) { QObject::connect(gdbWidget, &SeerGdbWidget::changeWindowTitle, this, &SeerMainWindow::handleChangeWindowTitle); QObject::connect(qApp, &QApplication::aboutToQuit, gdbWidget, &SeerGdbWidget::handleGdbShutdown); + QObject::connect(helpToolButton, &QToolButton::clicked, this, &SeerMainWindow::handleHelpToolButtonClicked); + handleRecordSettingsChanged(); // Restore window settings. @@ -910,6 +921,14 @@ void SeerMainWindow::handleChangeWindowTitle (QString title) { } } +void SeerMainWindow::handleHelpToolButtonClicked () { + + SeerHelpPageWidget* help = new SeerHelpPageWidget; + help->loadFile(":/seer/resources/help/MainWindow.md"); + help->show(); +} + + void SeerMainWindow::writeSettings() { QSettings settings; diff --git a/src/SeerMainWindow.h b/src/SeerMainWindow.h index ca8ad5c..d2c3e71 100644 --- a/src/SeerMainWindow.h +++ b/src/SeerMainWindow.h @@ -72,6 +72,7 @@ class SeerMainWindow : public QMainWindow, protected Ui::SeerMainWindowForm { void handleRunStatusChanged (SeerRunStatusIndicator::RunStatus status); void handleRecordSettingsChanged (); void handleChangeWindowTitle (QString title); + void handleHelpToolButtonClicked (); void handleRunExecutable (); void handleStartExecutable (); void handleStyleMenuChanged (); diff --git a/src/resource.qrc b/src/resource.qrc index 6511ed5..a140cea 100644 --- a/src/resource.qrc +++ b/src/resource.qrc @@ -64,6 +64,7 @@ resources/help/SourceSymbolLibraryInfoBrowser.md resources/help/CodeManager.md resources/help/BreakpointGdbSeerManager.md + resources/help/MainWindow.md diff --git a/src/resources/help/MainWindow.md b/src/resources/help/MainWindow.md new file mode 100644 index 0000000..38d43a4 --- /dev/null +++ b/src/resources/help/MainWindow.md @@ -0,0 +1,35 @@ +## Seer Main Window + +### Main Tool Bar + +The main toolbar has buttons for access to Seers's common functions. Most of these buttons also have hotkeys +assigned to them. These can be configured with "Settings->Configure->Keys". + +The buttons are arranged in groups. + +* Restarting the debug session. + + * Run - Restart the program. Only stop at any previously set breakpoints. + * Start - Restart the program. Stop in main(). + +* Stepping. + + * Continue - Continue the program until it encounters the next breakpoint or it ends. + * Next - Execute the next line. Step over if it's a function. + * Step - Exectue the next line. Step into it it's a function. + * Finish - Finish the current function. Honor any breakpoints. + +* Instruction recording. Use gdb's instruction and playback feature. + + * Record - Start the record mode. + * Direction - Set playback mode. Forward or reverse. The direction affects the Stepping functions. + +* Program interruption. Interrupt the running program or send it a specific signal. + +* Visualizers + + * Memory - Visualize a region of memory in a 'hex viewer'. + * Array - Visualizer a region of memory as arrays. A table and 2D plot. + * Struct - Visualize a region of memory as a nested C/C++ structure. + * Image - Visializer a region of memory as a RGB or RGBA image. +