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
+21
View File
@@ -4,6 +4,7 @@
#include "connections/canconmanager.h"
#include "bus_protocols/uds_handler.h"
#include "utility.h"
#include "helpwindow.h"
UDSScanWindow::UDSScanWindow(const QVector<CANFrame> *frames, QWidget *parent) :
QDialog(parent),
@@ -39,16 +40,36 @@ UDSScanWindow::UDSScanWindow(const QVector<CANFrame> *frames, QWidget *parent) :
int numBuses = CANConManager::getInstance()->getNumBuses();
for (int n = 0; n < numBuses; n++) ui->cbBuses->addItem(QString::number(n));
installEventFilter(this);
}
UDSScanWindow::~UDSScanWindow()
{
removeEventFilter(this);
delete ui;
waitTimer->stop();
delete waitTimer;
delete udsHandler;
}
bool UDSScanWindow::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("uds_scanner.html");
break;
}
return true;
} else {
// standard event processing
return QObject::eventFilter(obj, event);
}
return false;
}
void UDSScanWindow::adaptiveToggled()
{
if (ui->cbAllowAdaptiveOffset->isChecked()) ui->spinReplyOffset->setEnabled(false);