Implementation of a bunch more of the settings (all but hex on/off)
This commit is contained in:
@@ -243,6 +243,12 @@ void FileComparatorWindow::calculateDetails()
|
|||||||
ui->treeDetails->setSortingEnabled(true);
|
ui->treeDetails->setSortingEnabled(true);
|
||||||
ui->treeDetails->sortByColumn(0, Qt::AscendingOrder);
|
ui->treeDetails->sortByColumn(0, Qt::AscendingOrder);
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
if (settings.value("InfoCompare/AutoExpand", false).toBool())
|
||||||
|
{
|
||||||
|
ui->treeDetails->expandAll();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void FileComparatorWindow::saveDetails()
|
void FileComparatorWindow::saveDetails()
|
||||||
|
|||||||
@@ -114,6 +114,16 @@ void FlowViewWindow::readSettings()
|
|||||||
resize(settings.value("FlowView/WindowSize", QSize(1078, 621)).toSize());
|
resize(settings.value("FlowView/WindowSize", QSize(1078, 621)).toSize());
|
||||||
move(settings.value("FlowView/WindowPos", QPoint(50, 50)).toPoint());
|
move(settings.value("FlowView/WindowPos", QPoint(50, 50)).toPoint());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings.value("FlowView/AutoRef", false).toBool())
|
||||||
|
{
|
||||||
|
ui->cbAutoRef->setChecked(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (settings.value("FlowView/UseTimestamp", false).toBool())
|
||||||
|
{
|
||||||
|
ui->cbTimeGraph->setChecked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FlowViewWindow::writeSettings()
|
void FlowViewWindow::writeSettings()
|
||||||
|
|||||||
@@ -272,6 +272,12 @@ void FrameInfoWindow::updateDetailsWindow(QString newID)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QSettings settings;
|
||||||
|
if (settings.value("InfoCompare/AutoExpand", false).toBool())
|
||||||
|
{
|
||||||
|
ui->treeDetails->expandAll();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FrameInfoWindow::refreshIDList()
|
void FrameInfoWindow::refreshIDList()
|
||||||
|
|||||||
@@ -97,6 +97,11 @@ void FramePlaybackWindow::readSettings()
|
|||||||
resize(settings.value("Playback/WindowSize", QSize(742, 606)).toSize());
|
resize(settings.value("Playback/WindowSize", QSize(742, 606)).toSize());
|
||||||
move(settings.value("Playback/WindowPos", QPoint(50, 50)).toPoint());
|
move(settings.value("Playback/WindowPos", QPoint(50, 50)).toPoint());
|
||||||
}
|
}
|
||||||
|
if (settings.value("Playback/AutoLoop", false).toBool())
|
||||||
|
{
|
||||||
|
ui->cbLoop->setChecked(true);
|
||||||
|
}
|
||||||
|
ui->spinPlaySpeed->setValue(settings.value("Playback/DefSpeed", 5).toInt());
|
||||||
}
|
}
|
||||||
|
|
||||||
void FramePlaybackWindow::writeSettings()
|
void FramePlaybackWindow::writeSettings()
|
||||||
|
|||||||
@@ -37,7 +37,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="cbValidate">
|
<widget class="QCheckBox" name="cbValidate">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Validate GVRET connection</string>
|
<string>Require validation of GVRET connection</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -238,6 +238,10 @@ void MainWindow::readSettings()
|
|||||||
resize(settings.value("Main/WindowSize", QSize(800, 572)).toSize());
|
resize(settings.value("Main/WindowSize", QSize(800, 572)).toSize());
|
||||||
move(settings.value("Main/WindowPos", QPoint(100, 100)).toPoint());
|
move(settings.value("Main/WindowPos", QPoint(100, 100)).toPoint());
|
||||||
}
|
}
|
||||||
|
if (settings.value("Main/AutoScroll", false).toBool())
|
||||||
|
{
|
||||||
|
ui->cbAutoScroll->setChecked(true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::writeSettings()
|
void MainWindow::writeSettings()
|
||||||
|
|||||||
+17
-2
@@ -3,6 +3,7 @@
|
|||||||
#include <QSerialPort>
|
#include <QSerialPort>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QSettings>
|
||||||
|
|
||||||
SerialWorker::SerialWorker(CANFrameModel *model, QObject *parent) : QObject(parent)
|
SerialWorker::SerialWorker(CANFrameModel *model, QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
@@ -16,6 +17,8 @@ SerialWorker::SerialWorker(CANFrameModel *model, QObject *parent) : QObject(pare
|
|||||||
elapsedTime = NULL;
|
elapsedTime = NULL;
|
||||||
framesPerSec = 0;
|
framesPerSec = 0;
|
||||||
capturing = true;
|
capturing = true;
|
||||||
|
|
||||||
|
readSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
SerialWorker::~SerialWorker()
|
SerialWorker::~SerialWorker()
|
||||||
@@ -34,6 +37,17 @@ SerialWorker::~SerialWorker()
|
|||||||
if (ticker != NULL) ticker->stop();
|
if (ticker != NULL) ticker->stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SerialWorker::readSettings()
|
||||||
|
{
|
||||||
|
QSettings settings;
|
||||||
|
|
||||||
|
if (settings.value("Main/ValidateComm", true).toBool())
|
||||||
|
{
|
||||||
|
doValidation = true;
|
||||||
|
}
|
||||||
|
else doValidation = false;
|
||||||
|
}
|
||||||
|
|
||||||
void SerialWorker::setSerialPort(QSerialPortInfo *port)
|
void SerialWorker::setSerialPort(QSerialPortInfo *port)
|
||||||
{
|
{
|
||||||
if (serial != NULL)
|
if (serial != NULL)
|
||||||
@@ -64,9 +78,10 @@ void SerialWorker::setSerialPort(QSerialPortInfo *port)
|
|||||||
output.append(0xF1); //another command to the GVRET
|
output.append(0xF1); //another command to the GVRET
|
||||||
output.append(0x07); //request device information
|
output.append(0x07); //request device information
|
||||||
serial->write(output);
|
serial->write(output);
|
||||||
connected = false;
|
if (doValidation) connected = false;
|
||||||
|
else connected = true;
|
||||||
connect(serial, SIGNAL(readyRead()), this, SLOT(readSerialData()));
|
connect(serial, SIGNAL(readyRead()), this, SLOT(readSerialData()));
|
||||||
QTimer::singleShot(1000, this, SLOT(connectionTimeout()));
|
if (doValidation) QTimer::singleShot(1000, this, SLOT(connectionTimeout()));
|
||||||
if (ticker == NULL)
|
if (ticker == NULL)
|
||||||
{
|
{
|
||||||
ticker = new QTimer;
|
ticker = new QTimer;
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ private:
|
|||||||
bool quit;
|
bool quit;
|
||||||
bool connected;
|
bool connected;
|
||||||
bool capturing;
|
bool capturing;
|
||||||
|
bool doValidation;
|
||||||
QSerialPort *serial;
|
QSerialPort *serial;
|
||||||
CANFrameModel *canModel;
|
CANFrameModel *canModel;
|
||||||
QTimer *ticker;
|
QTimer *ticker;
|
||||||
@@ -71,6 +72,7 @@ private:
|
|||||||
int deviceSingleWireMode;
|
int deviceSingleWireMode;
|
||||||
|
|
||||||
void procRXChar(unsigned char);
|
void procRXChar(unsigned char);
|
||||||
|
void readSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SERIALTHREAD_H
|
#endif // SERIALTHREAD_H
|
||||||
|
|||||||
Reference in New Issue
Block a user