Integrated help into the system. Most all the sub-screens that are actually complete

and working have integrated help now. Press F1 to bring up help for a given window.
This commit is contained in:
Collin Kidder
2017-11-30 21:02:16 -05:00
parent 3d5c4c55c6
commit 9302c18c33
39 changed files with 528 additions and 13 deletions
+23
View File
@@ -6,6 +6,7 @@
#include <QtSerialPort/QSerialPortInfo>
#include "connections/canconmanager.h"
#include "connections/connectionwindow.h"
#include "helpwindow.h"
#include "utility.h"
/*
@@ -130,6 +131,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->actionSignal_Viewer, &QAction::triggered, this, &MainWindow::showSignalViewer);
connect(ui->actionSave_Continuous_Logfile, &QAction::triggered, this, &MainWindow::handleContinousLogging);
connect(CANConManager::getInstance(), &CANConManager::framesReceived, model, &CANFrameModel::addFrames);
lbStatusConnected.setText(tr("Connected to 0 buses"));
@@ -171,6 +173,7 @@ MainWindow::MainWindow(QWidget *parent) :
connectionWindow = new ConnectionWindow();
connect(this, SIGNAL(suspendCapturing(bool)), connectionWindow, SLOT(setSuspendAll(bool)));
installEventFilter(this);
}
MainWindow::~MainWindow()
@@ -235,10 +238,30 @@ void MainWindow::exitApp()
void MainWindow::closeEvent(QCloseEvent *event)
{
Q_UNUSED(event);
removeEventFilter(this);
writeSettings();
exitApp();
}
bool MainWindow::eventFilter(QObject *obj, QEvent *event)
{
if (event->type() == QEvent::KeyRelease) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(event);
switch (keyEvent->key())
{
case Qt::Key_F1:
HelpWindow::getRef()->showHelp("mainscreen.html");
break;
}
return true;
} else {
// standard event processing
return QObject::eventFilter(obj, event);
}
return false;
}
void MainWindow::updateSettings()
{
readUpdateableSettings();