Added a file manager and hooked it up. It is now possible to load and
edit multiple DBC files.
This commit is contained in:
+6
-3
@@ -42,7 +42,8 @@ SOURCES += main.cpp\
|
|||||||
scriptcontainer.cpp \
|
scriptcontainer.cpp \
|
||||||
canfilter.cpp \
|
canfilter.cpp \
|
||||||
rangestatewindow.cpp \
|
rangestatewindow.cpp \
|
||||||
dbc_classes.cpp
|
dbc_classes.cpp \
|
||||||
|
dbcloadsavewindow.cpp
|
||||||
|
|
||||||
HEADERS += mainwindow.h \
|
HEADERS += mainwindow.h \
|
||||||
can_structs.h \
|
can_structs.h \
|
||||||
@@ -72,7 +73,8 @@ HEADERS += mainwindow.h \
|
|||||||
scriptingwindow.h \
|
scriptingwindow.h \
|
||||||
scriptcontainer.h \
|
scriptcontainer.h \
|
||||||
canfilter.h \
|
canfilter.h \
|
||||||
rangestatewindow.h
|
rangestatewindow.h \
|
||||||
|
dbcloadsavewindow.h
|
||||||
|
|
||||||
FORMS += mainwindow.ui \
|
FORMS += mainwindow.ui \
|
||||||
graphingwindow.ui \
|
graphingwindow.ui \
|
||||||
@@ -90,7 +92,8 @@ FORMS += mainwindow.ui \
|
|||||||
discretestatewindow.ui \
|
discretestatewindow.ui \
|
||||||
connectionwindow.ui \
|
connectionwindow.ui \
|
||||||
scriptingwindow.ui \
|
scriptingwindow.ui \
|
||||||
rangestatewindow.ui
|
rangestatewindow.ui \
|
||||||
|
dbcloadsavewindow.ui
|
||||||
|
|
||||||
DISTFILES +=
|
DISTFILES +=
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -735,7 +735,7 @@ void DBCHandler::saveDBCFile(int idx)
|
|||||||
//Otherwise add a new one. Well, always add a new one.
|
//Otherwise add a new one. Well, always add a new one.
|
||||||
//If a valid index is passed we'll remove that one and then commence
|
//If a valid index is passed we'll remove that one and then commence
|
||||||
//adding. Otherwise, just go straight to adding.
|
//adding. Otherwise, just go straight to adding.
|
||||||
void DBCHandler::loadDBCFile(int idx)
|
DBCFile* DBCHandler::loadDBCFile(int idx)
|
||||||
{
|
{
|
||||||
if (idx > -1 && idx < loadedFiles.count()) removeDBCFile(idx);
|
if (idx > -1 && idx < loadedFiles.count()) removeDBCFile(idx);
|
||||||
|
|
||||||
@@ -757,6 +757,7 @@ void DBCHandler::loadDBCFile(int idx)
|
|||||||
newFile.loadFile(filename);
|
newFile.loadFile(filename);
|
||||||
loadedFiles.append(newFile);
|
loadedFiles.append(newFile);
|
||||||
}
|
}
|
||||||
|
return &loadedFiles.last();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DBCHandler::removeDBCFile(int idx)
|
void DBCHandler::removeDBCFile(int idx)
|
||||||
|
|||||||
+1
-1
@@ -77,7 +77,7 @@ class DBCHandler: public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
void loadDBCFile(int);
|
DBCFile* loadDBCFile(int);
|
||||||
void saveDBCFile(int);
|
void saveDBCFile(int);
|
||||||
void removeDBCFile(int);
|
void removeDBCFile(int);
|
||||||
void removeAllFiles();
|
void removeAllFiles();
|
||||||
|
|||||||
@@ -0,0 +1,118 @@
|
|||||||
|
#include "dbcloadsavewindow.h"
|
||||||
|
#include "ui_dbcloadsavewindow.h"
|
||||||
|
|
||||||
|
DBCLoadSaveWindow::DBCLoadSaveWindow(DBCHandler *handler, const QVector<CANFrame> *frames, QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::DBCLoadSaveWindow)
|
||||||
|
{
|
||||||
|
|
||||||
|
dbcHandler = handler;
|
||||||
|
referenceFrames = frames;
|
||||||
|
|
||||||
|
ui->setupUi(this);
|
||||||
|
|
||||||
|
QStringList header;
|
||||||
|
header << "Filename" << "Associated Bus";
|
||||||
|
ui->tableFiles->setColumnCount(2);
|
||||||
|
ui->tableFiles->setHorizontalHeaderLabels(header);
|
||||||
|
ui->tableFiles->setColumnWidth(0, 355);
|
||||||
|
ui->tableFiles->setColumnWidth(1, 125);
|
||||||
|
|
||||||
|
connect(ui->btnEdit, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::editFile);
|
||||||
|
connect(ui->btnLoad, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::loadFile);
|
||||||
|
connect(ui->btnMoveDown, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::moveDown);
|
||||||
|
connect(ui->btnMoveUp, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::moveUp);
|
||||||
|
connect(ui->btnRemove, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::removeFile);
|
||||||
|
connect(ui->btnSave, &QAbstractButton::clicked, this, &DBCLoadSaveWindow::saveFile);
|
||||||
|
|
||||||
|
editorWindow = new DBCMainEditor(handler, frames);
|
||||||
|
}
|
||||||
|
|
||||||
|
DBCLoadSaveWindow::~DBCLoadSaveWindow()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::loadFile()
|
||||||
|
{
|
||||||
|
DBCFile *file = dbcHandler->loadDBCFile(-1);
|
||||||
|
int idx = ui->tableFiles->rowCount();
|
||||||
|
ui->tableFiles->insertRow(ui->tableFiles->rowCount());
|
||||||
|
ui->tableFiles->setItem(idx, 0, new QTableWidgetItem(file->getFullFilename()));
|
||||||
|
ui->tableFiles->setItem(idx, 1, new QTableWidgetItem("-1"));
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::saveFile()
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
if (idx < 0) return;
|
||||||
|
dbcHandler->saveDBCFile(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::removeFile()
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
if (idx < 0) return;
|
||||||
|
dbcHandler->removeDBCFile(idx);
|
||||||
|
ui->tableFiles->removeRow(idx);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::moveUp()
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
if (idx < 1) return;
|
||||||
|
dbcHandler->swapFiles(idx - 1, idx);
|
||||||
|
swapTableRows(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::moveDown()
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
if (idx < 0) return;
|
||||||
|
if (idx > (dbcHandler->getFileCount() - 2)) return;
|
||||||
|
dbcHandler->swapFiles(idx, idx + 1);
|
||||||
|
swapTableRows(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::editFile()
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
if (idx < 0) return;
|
||||||
|
|
||||||
|
editorWindow->setFileIdx(idx);
|
||||||
|
editorWindow->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::swapTableRows(bool up)
|
||||||
|
{
|
||||||
|
int idx = ui->tableFiles->currentRow();
|
||||||
|
const int destIdx = (up ? idx-1 : idx+1);
|
||||||
|
Q_ASSERT(destIdx >= 0 && destIdx < ui->tableFiles->rowCount());
|
||||||
|
|
||||||
|
// take whole rows
|
||||||
|
QList<QTableWidgetItem*> sourceItems = takeRow(idx);
|
||||||
|
QList<QTableWidgetItem*> destItems = takeRow(destIdx);
|
||||||
|
|
||||||
|
// set back in reverse order
|
||||||
|
setRow(idx, destItems);
|
||||||
|
setRow(destIdx, sourceItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
QList<QTableWidgetItem*> DBCLoadSaveWindow::takeRow(int row)
|
||||||
|
{
|
||||||
|
QList<QTableWidgetItem*> rowItems;
|
||||||
|
for (int col = 0; col < ui->tableFiles->columnCount(); ++col)
|
||||||
|
{
|
||||||
|
rowItems << ui->tableFiles->takeItem(row, col);
|
||||||
|
}
|
||||||
|
return rowItems;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DBCLoadSaveWindow::setRow(int row, const QList<QTableWidgetItem*>& rowItems)
|
||||||
|
{
|
||||||
|
for (int col = 0; col < ui->tableFiles->columnCount(); ++col)
|
||||||
|
{
|
||||||
|
ui->tableFiles->setItem(row, col, rowItems.at(col));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
#ifndef DBCLOADSAVEWINDOW_H
|
||||||
|
#define DBCLOADSAVEWINDOW_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
#include <QTableWidget>
|
||||||
|
#include "dbchandler.h"
|
||||||
|
#include "dbcmaineditor.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class DBCLoadSaveWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DBCLoadSaveWindow : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DBCLoadSaveWindow(DBCHandler *handler, const QVector<CANFrame> *frames, QWidget *parent = 0);
|
||||||
|
~DBCLoadSaveWindow();
|
||||||
|
|
||||||
|
private slots:
|
||||||
|
void loadFile();
|
||||||
|
void saveFile();
|
||||||
|
void removeFile();
|
||||||
|
void moveUp();
|
||||||
|
void moveDown();
|
||||||
|
void editFile();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DBCLoadSaveWindow *ui;
|
||||||
|
DBCHandler *dbcHandler;
|
||||||
|
const QVector<CANFrame> *referenceFrames;
|
||||||
|
DBCMainEditor *editorWindow;
|
||||||
|
|
||||||
|
void swapTableRows(bool up);
|
||||||
|
QList<QTableWidgetItem*> takeRow(int row);
|
||||||
|
void setRow(int row, const QList<QTableWidgetItem*>& rowItems);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DBCLOADSAVEWINDOW_H
|
||||||
|
|
||||||
@@ -0,0 +1,74 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DBCLoadSaveWindow</class>
|
||||||
|
<widget class="QDialog" name="DBCLoadSaveWindow">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>506</width>
|
||||||
|
<height>665</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>DBC File Manager</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTableWidget" name="tableFiles"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnLoad">
|
||||||
|
<property name="text">
|
||||||
|
<string>Load</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnRemove">
|
||||||
|
<property name="text">
|
||||||
|
<string>Remove</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnMoveUp">
|
||||||
|
<property name="text">
|
||||||
|
<string>Move Up</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnSave">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnEdit">
|
||||||
|
<property name="text">
|
||||||
|
<string>Edit</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QPushButton" name="btnMoveDown">
|
||||||
|
<property name="text">
|
||||||
|
<string>Move Down</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
+34
-26
@@ -54,8 +54,8 @@ void DBCMainEditor::showEvent(QShowEvent* event)
|
|||||||
|
|
||||||
inhibitCellChanged = true;
|
inhibitCellChanged = true;
|
||||||
refreshNodesTable();
|
refreshNodesTable();
|
||||||
if (dbcHandler->getFileByIdx(0)->dbc_nodes.count() > 0)
|
if (dbcFile->dbc_nodes.count() > 0)
|
||||||
refreshMessagesTable(&dbcHandler->getFileByIdx(0)->dbc_nodes.at(0));
|
refreshMessagesTable(&dbcFile->dbc_nodes.at(0));
|
||||||
|
|
||||||
currRow = 0;
|
currRow = 0;
|
||||||
inhibitCellChanged = false;
|
inhibitCellChanged = false;
|
||||||
@@ -67,6 +67,13 @@ DBCMainEditor::~DBCMainEditor()
|
|||||||
delete sigEditor;
|
delete sigEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DBCMainEditor::setFileIdx(int idx)
|
||||||
|
{
|
||||||
|
if (idx < 0 || idx > dbcHandler->getFileCount() - 1) return;
|
||||||
|
dbcFile = dbcHandler->getFileByIdx(idx);
|
||||||
|
fileIdx = idx;
|
||||||
|
}
|
||||||
|
|
||||||
void DBCMainEditor::closeEvent(QCloseEvent *event)
|
void DBCMainEditor::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
Q_UNUSED(event);
|
||||||
@@ -123,9 +130,9 @@ void DBCMainEditor::deleteCurrentNode()
|
|||||||
if (nodeName.length() > 0 && nodeName.compare("Vector__XXX", Qt::CaseInsensitive) != 0)
|
if (nodeName.length() > 0 && nodeName.compare("Vector__XXX", Qt::CaseInsensitive) != 0)
|
||||||
{
|
{
|
||||||
ui->NodesTable->removeRow(thisRow);
|
ui->NodesTable->removeRow(thisRow);
|
||||||
dbcHandler->getFileByIdx(0)->dbc_nodes.removeAt(thisRow);
|
dbcFile->dbc_nodes.removeAt(thisRow);
|
||||||
inhibitCellChanged = true;
|
inhibitCellChanged = true;
|
||||||
refreshMessagesTable(&dbcHandler->getFileByIdx(0)->dbc_nodes[0]);
|
refreshMessagesTable(&dbcFile->dbc_nodes[0]);
|
||||||
ui->NodesTable->selectRow(0);
|
ui->NodesTable->selectRow(0);
|
||||||
inhibitCellChanged = false;
|
inhibitCellChanged = false;
|
||||||
}
|
}
|
||||||
@@ -137,7 +144,7 @@ void DBCMainEditor::deleteCurrentMessage()
|
|||||||
if (ui->MessagesTable->item(thisRow, 0)->text().length() > 0)
|
if (ui->MessagesTable->item(thisRow, 0)->text().length() > 0)
|
||||||
{
|
{
|
||||||
ui->MessagesTable->removeRow(thisRow);
|
ui->MessagesTable->removeRow(thisRow);
|
||||||
dbcHandler->getFileByIdx(0)->messageHandler->removeMessageByIndex(thisRow);
|
dbcFile->messageHandler->removeMessageByIndex(thisRow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -156,7 +163,7 @@ void DBCMainEditor::onCellChangedNode(int row,int col)
|
|||||||
QString newName = ui->NodesTable->item(row, col)->text().simplified().replace(' ', '_');
|
QString newName = ui->NodesTable->item(row, col)->text().simplified().replace(' ', '_');
|
||||||
qDebug() << "new name: " << newName;
|
qDebug() << "new name: " << newName;
|
||||||
if (newName.length() == 0) return;
|
if (newName.length() == 0) return;
|
||||||
if (dbcHandler->getFileByIdx(0)->findNodeByName(newName) != NULL) //duplicates an existing node!
|
if (dbcFile->findNodeByName(newName) != NULL) //duplicates an existing node!
|
||||||
{
|
{
|
||||||
QMessageBox msg;
|
QMessageBox msg;
|
||||||
msg.setParent(0);
|
msg.setParent(0);
|
||||||
@@ -165,8 +172,8 @@ void DBCMainEditor::onCellChangedNode(int row,int col)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newNode.name = newName;
|
newNode.name = newName;
|
||||||
dbcHandler->getFileByIdx(0)->dbc_nodes.append(newNode);
|
dbcFile->dbc_nodes.append(newNode);
|
||||||
qDebug() << "# of nodes now " << dbcHandler->getFileByIdx(0)->dbc_nodes.count();
|
qDebug() << "# of nodes now " << dbcFile->dbc_nodes.count();
|
||||||
QTableWidgetItem *widgetName = new QTableWidgetItem(newName);
|
QTableWidgetItem *widgetName = new QTableWidgetItem(newName);
|
||||||
inhibitCellChanged = true;
|
inhibitCellChanged = true;
|
||||||
ui->NodesTable->setItem(row, col, widgetName);
|
ui->NodesTable->setItem(row, col, widgetName);
|
||||||
@@ -178,7 +185,7 @@ void DBCMainEditor::onCellChangedNode(int row,int col)
|
|||||||
{
|
{
|
||||||
if (col == 0)
|
if (col == 0)
|
||||||
{
|
{
|
||||||
DBC_NODE *oldNode = dbcHandler->getFileByIdx(0)->findNodeByIdx(row);
|
DBC_NODE *oldNode = dbcFile->findNodeByIdx(row);
|
||||||
QString nodeName = ui->NodesTable->item(row, col)->text().simplified().replace(' ', '_');
|
QString nodeName = ui->NodesTable->item(row, col)->text().simplified().replace(' ', '_');
|
||||||
if (oldNode == NULL) return;
|
if (oldNode == NULL) return;
|
||||||
if (row != 0) oldNode->name = nodeName;
|
if (row != 0) oldNode->name = nodeName;
|
||||||
@@ -192,7 +199,7 @@ void DBCMainEditor::onCellChangedNode(int row,int col)
|
|||||||
{
|
{
|
||||||
QString nodeName = ui->NodesTable->item(row, 0)->text().simplified().replace(' ', '_');
|
QString nodeName = ui->NodesTable->item(row, 0)->text().simplified().replace(' ', '_');
|
||||||
qDebug() << "searching for node " << nodeName;
|
qDebug() << "searching for node " << nodeName;
|
||||||
DBC_NODE *thisNode = dbcHandler->getFileByIdx(0)->findNodeByName(nodeName);
|
DBC_NODE *thisNode = dbcFile->findNodeByName(nodeName);
|
||||||
if (thisNode == NULL) return;
|
if (thisNode == NULL) return;
|
||||||
thisNode->comment = ui->NodesTable->item(row, col)->text().simplified();
|
thisNode->comment = ui->NodesTable->item(row, col)->text().simplified();
|
||||||
qDebug() << "New comment: " << thisNode->comment;
|
qDebug() << "New comment: " << thisNode->comment;
|
||||||
@@ -213,7 +220,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
int msgLen;
|
int msgLen;
|
||||||
QString msgComment;
|
QString msgComment;
|
||||||
DBC_MESSAGE newMsg;
|
DBC_MESSAGE newMsg;
|
||||||
DBC_NODE *node = dbcHandler->getFileByIdx(0)->findNodeByIdx(ui->NodesTable->currentRow());
|
DBC_NODE *node = dbcFile->findNodeByIdx(ui->NodesTable->currentRow());
|
||||||
DBC_MESSAGE *msg;
|
DBC_MESSAGE *msg;
|
||||||
if (node == NULL)
|
if (node == NULL)
|
||||||
{
|
{
|
||||||
@@ -224,14 +231,14 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
|
|
||||||
msgID = Utility::ParseStringToNum(ui->MessagesTable->item(row, 0)->text());
|
msgID = Utility::ParseStringToNum(ui->MessagesTable->item(row, 0)->text());
|
||||||
qDebug() << "Msg ID of edited: " << msgID;
|
qDebug() << "Msg ID of edited: " << msgID;
|
||||||
msg = dbcHandler->getFileByIdx(0)->messageHandler->findMsgByID(msgID);
|
msg = dbcFile->messageHandler->findMsgByID(msgID);
|
||||||
|
|
||||||
switch(col)
|
switch(col)
|
||||||
{
|
{
|
||||||
case 0: //msg id
|
case 0: //msg id
|
||||||
if (row == ui->MessagesTable->rowCount() - 1) //new record
|
if (row == ui->MessagesTable->rowCount() - 1) //new record
|
||||||
{
|
{
|
||||||
if (dbcHandler->getFileByIdx(0)->messageHandler->findMsgByID(msgID) != NULL)
|
if (dbcFile->messageHandler->findMsgByID(msgID) != NULL)
|
||||||
{
|
{
|
||||||
QMessageBox msg;
|
QMessageBox msg;
|
||||||
msg.setParent(0);
|
msg.setParent(0);
|
||||||
@@ -251,7 +258,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
dbcHandler->getFileByIdx(0)->messageHandler->addMessage(newMsg);
|
dbcFile->messageHandler->addMessage(newMsg);
|
||||||
}
|
}
|
||||||
else //editing an existing record
|
else //editing an existing record
|
||||||
{
|
{
|
||||||
@@ -270,7 +277,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
if (msgName.length() == 0) return;
|
if (msgName.length() == 0) return;
|
||||||
if (row == ui->MessagesTable->rowCount() - 1) //new record
|
if (row == ui->MessagesTable->rowCount() - 1) //new record
|
||||||
{
|
{
|
||||||
if (dbcHandler->getFileByIdx(0)->messageHandler->findMsgByName(msgName) != NULL)
|
if (dbcFile->messageHandler->findMsgByName(msgName) != NULL)
|
||||||
{
|
{
|
||||||
QMessageBox msg;
|
QMessageBox msg;
|
||||||
msg.setParent(0);
|
msg.setParent(0);
|
||||||
@@ -281,7 +288,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
newMsg.ID = -1;
|
newMsg.ID = -1;
|
||||||
newMsg.name = msgName;
|
newMsg.name = msgName;
|
||||||
newMsg.sender = node;
|
newMsg.sender = node;
|
||||||
dbcHandler->getFileByIdx(0)->messageHandler->addMessage(newMsg);
|
dbcFile->messageHandler->addMessage(newMsg);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -304,7 +311,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
newMsg.name = "";
|
newMsg.name = "";
|
||||||
newMsg.len = msgLen;
|
newMsg.len = msgLen;
|
||||||
newMsg.sender = node;
|
newMsg.sender = node;
|
||||||
dbcHandler->getFileByIdx(0)->messageHandler->addMessage(newMsg);
|
dbcFile->messageHandler->addMessage(newMsg);
|
||||||
}
|
}
|
||||||
else //editing an existing record
|
else //editing an existing record
|
||||||
{
|
{
|
||||||
@@ -328,7 +335,7 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
|
|||||||
newMsg.len = 0;
|
newMsg.len = 0;
|
||||||
newMsg.comment = msgComment;
|
newMsg.comment = msgComment;
|
||||||
newMsg.sender = node;
|
newMsg.sender = node;
|
||||||
dbcHandler->getFileByIdx(0)->messageHandler->addMessage(newMsg);
|
dbcFile->messageHandler->addMessage(newMsg);
|
||||||
}
|
}
|
||||||
else //editing an existing record
|
else //editing an existing record
|
||||||
{
|
{
|
||||||
@@ -363,7 +370,7 @@ void DBCMainEditor::onCellClickedNode(int row, int col)
|
|||||||
|
|
||||||
nodeName = item->text();
|
nodeName = item->text();
|
||||||
qDebug() << "Trying to find node with name " << nodeName;
|
qDebug() << "Trying to find node with name " << nodeName;
|
||||||
DBC_NODE *node = dbcHandler->getFileByIdx(0)->findNodeByName(nodeName);
|
DBC_NODE *node = dbcFile->findNodeByName(nodeName);
|
||||||
//qDebug() << "Address of node: " << (int)node;
|
//qDebug() << "Address of node: " << (int)node;
|
||||||
inhibitCellChanged = true;
|
inhibitCellChanged = true;
|
||||||
refreshMessagesTable(node);
|
refreshMessagesTable(node);
|
||||||
@@ -376,8 +383,9 @@ void DBCMainEditor::onCellClickedMessage(int row, int col)
|
|||||||
if (col == 3) //3 is the signals field. If clicked we go to the signals dialog
|
if (col == 3) //3 is the signals field. If clicked we go to the signals dialog
|
||||||
{
|
{
|
||||||
QString idString = ui->MessagesTable->item(row, 0)->text();
|
QString idString = ui->MessagesTable->item(row, 0)->text();
|
||||||
DBC_MESSAGE *message = dbcHandler->getFileByIdx(0)->messageHandler->findMsgByID(Utility::ParseStringToNum(idString));
|
DBC_MESSAGE *message = dbcFile->messageHandler->findMsgByID(Utility::ParseStringToNum(idString));
|
||||||
sigEditor->setMessageRef(message);
|
sigEditor->setMessageRef(message);
|
||||||
|
sigEditor->setFileIdx(fileIdx);
|
||||||
sigEditor->exec(); //blocks this window from being active until we're done
|
sigEditor->exec(); //blocks this window from being active until we're done
|
||||||
//now update the displayed # of signals
|
//now update the displayed # of signals
|
||||||
inhibitCellChanged = true;
|
inhibitCellChanged = true;
|
||||||
@@ -394,17 +402,17 @@ void DBCMainEditor::refreshNodesTable()
|
|||||||
|
|
||||||
int rowIdx;
|
int rowIdx;
|
||||||
|
|
||||||
if (dbcHandler->getFileByIdx(0)->findNodeByName("Vector__XXX") == NULL)
|
if (dbcFile->findNodeByName("Vector__XXX") == NULL)
|
||||||
{
|
{
|
||||||
DBC_NODE newNode;
|
DBC_NODE newNode;
|
||||||
newNode.name = "Vector__XXX";
|
newNode.name = "Vector__XXX";
|
||||||
newNode.comment = "Default node if no other node is specified";
|
newNode.comment = "Default node if no other node is specified";
|
||||||
dbcHandler->getFileByIdx(0)->dbc_nodes.append(newNode);
|
dbcFile->dbc_nodes.append(newNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int x = 0; x < dbcHandler->getFileByIdx(0)->dbc_nodes.count(); x++)
|
for (int x = 0; x < dbcFile->dbc_nodes.count(); x++)
|
||||||
{
|
{
|
||||||
DBC_NODE node = dbcHandler->getFileByIdx(0)->dbc_nodes.at(x);
|
DBC_NODE node = dbcFile->dbc_nodes.at(x);
|
||||||
QTableWidgetItem *nodeName = new QTableWidgetItem(node.name);
|
QTableWidgetItem *nodeName = new QTableWidgetItem(node.name);
|
||||||
QTableWidgetItem *nodeComment = new QTableWidgetItem(node.comment);
|
QTableWidgetItem *nodeComment = new QTableWidgetItem(node.comment);
|
||||||
rowIdx = ui->NodesTable->rowCount();
|
rowIdx = ui->NodesTable->rowCount();
|
||||||
@@ -428,9 +436,9 @@ void DBCMainEditor::refreshMessagesTable(const DBC_NODE *node)
|
|||||||
|
|
||||||
if (node != NULL)
|
if (node != NULL)
|
||||||
{
|
{
|
||||||
for (int x = 0; x < dbcHandler->getFileByIdx(0)->messageHandler->getCount(); x++)
|
for (int x = 0; x < dbcFile->messageHandler->getCount(); x++)
|
||||||
{
|
{
|
||||||
DBC_MESSAGE *msg = dbcHandler->getFileByIdx(0)->messageHandler->findMsgByIdx(x);
|
DBC_MESSAGE *msg = dbcFile->messageHandler->findMsgByIdx(x);
|
||||||
if (msg->sender == node)
|
if (msg->sender == node)
|
||||||
{
|
{
|
||||||
//many of these are simplistic first versions just to test functionality.
|
//many of these are simplistic first versions just to test functionality.
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ class DBCMainEditor : public QDialog
|
|||||||
public:
|
public:
|
||||||
explicit DBCMainEditor(DBCHandler *handler, const QVector<CANFrame> *frames, QWidget *parent = 0);
|
explicit DBCMainEditor(DBCHandler *handler, const QVector<CANFrame> *frames, QWidget *parent = 0);
|
||||||
~DBCMainEditor();
|
~DBCMainEditor();
|
||||||
|
void setFileIdx(int idx);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void onCellChangedNode(int,int);
|
void onCellChangedNode(int,int);
|
||||||
@@ -35,6 +36,8 @@ private:
|
|||||||
const QVector<CANFrame> *referenceFrames;
|
const QVector<CANFrame> *referenceFrames;
|
||||||
DBCSignalEditor *sigEditor;
|
DBCSignalEditor *sigEditor;
|
||||||
int currRow;
|
int currRow;
|
||||||
|
DBCFile *dbcFile;
|
||||||
|
int fileIdx;
|
||||||
bool inhibitCellChanged;
|
bool inhibitCellChanged;
|
||||||
|
|
||||||
void refreshNodesTable();
|
void refreshNodesTable();
|
||||||
|
|||||||
+13
-7
@@ -33,11 +33,6 @@ DBCSignalEditor::DBCSignalEditor(DBCHandler *handler, QWidget *parent) :
|
|||||||
ui->comboType->addItem("DOUBLE PRECISION");
|
ui->comboType->addItem("DOUBLE PRECISION");
|
||||||
ui->comboType->addItem("STRING");
|
ui->comboType->addItem("STRING");
|
||||||
|
|
||||||
for (int x = 0; x < dbcHandler->getFileByIdx(0)->dbc_nodes.count(); x++)
|
|
||||||
{
|
|
||||||
ui->comboReceiver->addItem(dbcHandler->getFileByIdx(0)->dbc_nodes[x].name);
|
|
||||||
}
|
|
||||||
|
|
||||||
connect(ui->signalsList, SIGNAL(currentRowChanged(int)), this, SLOT(clickSignalList(int)));
|
connect(ui->signalsList, SIGNAL(currentRowChanged(int)), this, SLOT(clickSignalList(int)));
|
||||||
connect(ui->bitfield, SIGNAL(gridClicked(int,int)), this, SLOT(bitfieldClicked(int,int)));
|
connect(ui->bitfield, SIGNAL(gridClicked(int,int)), this, SLOT(bitfieldClicked(int,int)));
|
||||||
connect(ui->signalsList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomMenuSignals(QPoint)));
|
connect(ui->signalsList, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(onCustomMenuSignals(QPoint)));
|
||||||
@@ -61,7 +56,7 @@ DBCSignalEditor::DBCSignalEditor(DBCHandler *handler, QWidget *parent) :
|
|||||||
[=]()
|
[=]()
|
||||||
{
|
{
|
||||||
if (currentSignal == NULL) return;
|
if (currentSignal == NULL) return;
|
||||||
currentSignal->receiver = dbcHandler->getFileByIdx(0)->findNodeByName(ui->comboReceiver->currentText());
|
currentSignal->receiver = dbcFile->findNodeByName(ui->comboReceiver->currentText());
|
||||||
});
|
});
|
||||||
connect(ui->comboType, &QComboBox::currentTextChanged,
|
connect(ui->comboType, &QComboBox::currentTextChanged,
|
||||||
[=]()
|
[=]()
|
||||||
@@ -223,6 +218,17 @@ void DBCSignalEditor::closeEvent(QCloseEvent *event)
|
|||||||
writeSettings();
|
writeSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void DBCSignalEditor::setFileIdx(int idx)
|
||||||
|
{
|
||||||
|
if (idx < 0 || idx > dbcHandler->getFileCount() - 1) return;
|
||||||
|
dbcFile = dbcHandler->getFileByIdx(idx);
|
||||||
|
|
||||||
|
for (int x = 0; x < dbcFile->dbc_nodes.count(); x++)
|
||||||
|
{
|
||||||
|
ui->comboReceiver->addItem(dbcFile->dbc_nodes[x].name);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void DBCSignalEditor::readSettings()
|
void DBCSignalEditor::readSettings()
|
||||||
{
|
{
|
||||||
QSettings settings;
|
QSettings settings;
|
||||||
@@ -326,7 +332,7 @@ void DBCSignalEditor::addNewSignal()
|
|||||||
newSig.intelByteOrder = true;
|
newSig.intelByteOrder = true;
|
||||||
newSig.max = 0.0;
|
newSig.max = 0.0;
|
||||||
newSig.min = 0.0;
|
newSig.min = 0.0;
|
||||||
newSig.receiver = dbcHandler->getFileByIdx(0)->findNodeByIdx(0);
|
newSig.receiver = dbcFile->findNodeByIdx(0);
|
||||||
newSig.signalSize = 1;
|
newSig.signalSize = 1;
|
||||||
newSig.startBit = 0;
|
newSig.startBit = 0;
|
||||||
newSig.valType = UNSIGNED_INT;
|
newSig.valType = UNSIGNED_INT;
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ public:
|
|||||||
explicit DBCSignalEditor(DBCHandler *handler, QWidget *parent = 0);
|
explicit DBCSignalEditor(DBCHandler *handler, QWidget *parent = 0);
|
||||||
void setMessageRef(DBC_MESSAGE *msg);
|
void setMessageRef(DBC_MESSAGE *msg);
|
||||||
void showEvent(QShowEvent*);
|
void showEvent(QShowEvent*);
|
||||||
|
void setFileIdx(int idx);
|
||||||
~DBCSignalEditor();
|
~DBCSignalEditor();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@@ -34,6 +35,7 @@ private:
|
|||||||
DBCHandler *dbcHandler;
|
DBCHandler *dbcHandler;
|
||||||
DBC_MESSAGE *dbcMessage;
|
DBC_MESSAGE *dbcMessage;
|
||||||
DBC_SIGNAL *currentSignal;
|
DBC_SIGNAL *currentSignal;
|
||||||
|
DBCFile *dbcFile;
|
||||||
bool inhibitCellChanged;
|
bool inhibitCellChanged;
|
||||||
|
|
||||||
void refreshSignalsList();
|
void refreshSignalsList();
|
||||||
|
|||||||
+31
-33
@@ -94,6 +94,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
connectionWindow = NULL;
|
connectionWindow = NULL;
|
||||||
scriptingWindow = NULL;
|
scriptingWindow = NULL;
|
||||||
rangeWindow = NULL;
|
rangeWindow = NULL;
|
||||||
|
dbcFileWindow = NULL;
|
||||||
dbcHandler = new DBCHandler;
|
dbcHandler = new DBCHandler;
|
||||||
bDirty = false;
|
bDirty = false;
|
||||||
inhibitFilterUpdate = false;
|
inhibitFilterUpdate = false;
|
||||||
@@ -113,13 +114,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
connect(ui->action_Playback, &QAction::triggered, this, &MainWindow::showPlaybackWindow);
|
connect(ui->action_Playback, &QAction::triggered, this, &MainWindow::showPlaybackWindow);
|
||||||
connect(ui->actionFlow_View, &QAction::triggered, this, &MainWindow::showFlowViewWindow);
|
connect(ui->actionFlow_View, &QAction::triggered, this, &MainWindow::showFlowViewWindow);
|
||||||
connect(ui->action_Custom, &QAction::triggered, this, &MainWindow::showFrameSenderWindow);
|
connect(ui->action_Custom, &QAction::triggered, this, &MainWindow::showFrameSenderWindow);
|
||||||
connect(ui->actionLoad_DBC_File, &QAction::triggered, this, &MainWindow::handleLoadDBC);
|
|
||||||
connect(ui->actionSave_DBC_File, &QAction::triggered, this, &MainWindow::handleSaveDBC);
|
|
||||||
connect(ui->canFramesView, &QAbstractItemView::clicked, this, &MainWindow::gridClicked);
|
connect(ui->canFramesView, &QAbstractItemView::clicked, this, &MainWindow::gridClicked);
|
||||||
connect(ui->canFramesView, &QAbstractItemView::doubleClicked, this, &MainWindow::gridDoubleClicked);
|
connect(ui->canFramesView, &QAbstractItemView::doubleClicked, this, &MainWindow::gridDoubleClicked);
|
||||||
connect(ui->cbInterpret, &QAbstractButton::toggled, this, &MainWindow::interpretToggled);
|
connect(ui->cbInterpret, &QAbstractButton::toggled, this, &MainWindow::interpretToggled);
|
||||||
connect(ui->cbOverwrite, &QAbstractButton::toggled, this, &MainWindow::overwriteToggled);
|
connect(ui->cbOverwrite, &QAbstractButton::toggled, this, &MainWindow::overwriteToggled);
|
||||||
connect(ui->actionEdit_Messages_Signals, &QAction::triggered, this, &MainWindow::showDBCEditor);
|
|
||||||
connect(ui->btnCaptureToggle, &QAbstractButton::clicked, this, &MainWindow::toggleCapture);
|
connect(ui->btnCaptureToggle, &QAbstractButton::clicked, this, &MainWindow::toggleCapture);
|
||||||
connect(ui->actionExit_Application, &QAction::triggered, this, &MainWindow::exitApp);
|
connect(ui->actionExit_Application, &QAction::triggered, this, &MainWindow::exitApp);
|
||||||
connect(ui->actionFuzzy_Scope, &QAction::triggered, this, &MainWindow::showFuzzyScopeWindow);
|
connect(ui->actionFuzzy_Scope, &QAction::triggered, this, &MainWindow::showFuzzyScopeWindow);
|
||||||
@@ -135,6 +133,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
connect(ui->btnFilterAll, &QAbstractButton::clicked, this, &MainWindow::filterSetAll);
|
connect(ui->btnFilterAll, &QAbstractButton::clicked, this, &MainWindow::filterSetAll);
|
||||||
connect(ui->btnFilterNone, &QAbstractButton::clicked, this, &MainWindow::filterClearAll);
|
connect(ui->btnFilterNone, &QAbstractButton::clicked, this, &MainWindow::filterClearAll);
|
||||||
connect(ui->actionFirmware_Uploader, &QAction::triggered, this, &MainWindow::showFirmwareUploaderWindow);
|
connect(ui->actionFirmware_Uploader, &QAction::triggered, this, &MainWindow::showFirmwareUploaderWindow);
|
||||||
|
connect(ui->actionDBC_File_Manager, &QAction::triggered, this, &MainWindow::showDBCFileWindow);
|
||||||
|
|
||||||
lbStatusConnected.setText(tr("Not connected"));
|
lbStatusConnected.setText(tr("Not connected"));
|
||||||
updateFileStatus();
|
updateFileStatus();
|
||||||
@@ -240,12 +239,36 @@ MainWindow::~MainWindow()
|
|||||||
delete rangeWindow;
|
delete rangeWindow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (dbcFileWindow)
|
||||||
|
{
|
||||||
|
dbcFileWindow->close();
|
||||||
|
delete dbcFileWindow;
|
||||||
|
}
|
||||||
|
|
||||||
delete ui;
|
delete ui;
|
||||||
delete dbcHandler;
|
delete dbcHandler;
|
||||||
model->clearFrames();
|
model->clearFrames();
|
||||||
delete model;
|
delete model;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::exitApp()
|
||||||
|
{
|
||||||
|
if (graphingWindow) graphingWindow->close();
|
||||||
|
if (frameInfoWindow) frameInfoWindow->close();
|
||||||
|
if (playbackWindow) playbackWindow->close();
|
||||||
|
if (flowViewWindow) flowViewWindow->close();
|
||||||
|
if (frameSenderWindow) frameSenderWindow->close();
|
||||||
|
if (dbcMainEditor) dbcMainEditor->close();
|
||||||
|
if (comparatorWindow) comparatorWindow->close();
|
||||||
|
if (connectionWindow) connectionWindow->close();
|
||||||
|
if (settingsDialog) settingsDialog->close();
|
||||||
|
if (discreteStateWindow) discreteStateWindow->close();
|
||||||
|
if (scriptingWindow) scriptingWindow->close();
|
||||||
|
if (rangeWindow) rangeWindow->close();
|
||||||
|
if (dbcFileWindow) dbcFileWindow->close();
|
||||||
|
this->close();
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::closeEvent(QCloseEvent *event)
|
void MainWindow::closeEvent(QCloseEvent *event)
|
||||||
{
|
{
|
||||||
Q_UNUSED(event);
|
Q_UNUSED(event);
|
||||||
@@ -753,18 +776,7 @@ void MainWindow::handleLoadFilters()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::handleLoadDBC()
|
//lbStatusDatabase.setText(fileList[fileList.length() - 1] + tr(" loaded."));
|
||||||
{
|
|
||||||
dbcHandler->loadDBCFile(-1);
|
|
||||||
|
|
||||||
//lbStatusDatabase.setText(fileList[fileList.length() - 1] + tr(" loaded."));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::handleSaveDBC()
|
|
||||||
{
|
|
||||||
dbcHandler->saveDBCFile(0);
|
|
||||||
//lbStatusDatabase.setText(fileList[fileList.length() - 1] + tr(" loaded."));
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::handleSaveDecoded()
|
void MainWindow::handleSaveDecoded()
|
||||||
{
|
{
|
||||||
@@ -1064,19 +1076,6 @@ void MainWindow::showFuzzyScopeWindow()
|
|||||||
//not done yet
|
//not done yet
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::exitApp()
|
|
||||||
{
|
|
||||||
if (graphingWindow) graphingWindow->close();
|
|
||||||
if (frameInfoWindow) frameInfoWindow->close();
|
|
||||||
if (playbackWindow) playbackWindow->close();
|
|
||||||
if (flowViewWindow) flowViewWindow->close();
|
|
||||||
if (frameSenderWindow) frameSenderWindow->close();
|
|
||||||
if (dbcMainEditor) dbcMainEditor->close();
|
|
||||||
if (comparatorWindow) comparatorWindow->close();
|
|
||||||
if (connectionWindow) connectionWindow->close();
|
|
||||||
this->close();
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::showFlowViewWindow()
|
void MainWindow::showFlowViewWindow()
|
||||||
{
|
{
|
||||||
if (!flowViewWindow)
|
if (!flowViewWindow)
|
||||||
@@ -1098,14 +1097,13 @@ void MainWindow::showFlowViewWindow()
|
|||||||
flowViewWindow->show();
|
flowViewWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
//this one always gets the unfiltered list intentionally.
|
void MainWindow::showDBCFileWindow()
|
||||||
void MainWindow::showDBCEditor()
|
|
||||||
{
|
{
|
||||||
if (!dbcMainEditor)
|
if (!dbcFileWindow)
|
||||||
{
|
{
|
||||||
dbcMainEditor = new DBCMainEditor(dbcHandler, model->getListReference());
|
dbcFileWindow = new DBCLoadSaveWindow(dbcHandler, model->getListReference());
|
||||||
}
|
}
|
||||||
dbcMainEditor->show();
|
dbcFileWindow->show();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::showConnectionSettingsWindow()
|
void MainWindow::showConnectionSettingsWindow()
|
||||||
|
|||||||
+3
-3
@@ -22,6 +22,7 @@
|
|||||||
#include "connectionwindow.h"
|
#include "connectionwindow.h"
|
||||||
#include "scriptingwindow.h"
|
#include "scriptingwindow.h"
|
||||||
#include "rangestatewindow.h"
|
#include "rangestatewindow.h"
|
||||||
|
#include "dbcloadsavewindow.h"
|
||||||
|
|
||||||
namespace Ui {
|
namespace Ui {
|
||||||
class MainWindow;
|
class MainWindow;
|
||||||
@@ -42,8 +43,6 @@ private slots:
|
|||||||
void handleLoadFile();
|
void handleLoadFile();
|
||||||
void handleSaveFile();
|
void handleSaveFile();
|
||||||
void handleSaveFilteredFile();
|
void handleSaveFilteredFile();
|
||||||
void handleLoadDBC();
|
|
||||||
void handleSaveDBC();
|
|
||||||
void handleSaveFilters();
|
void handleSaveFilters();
|
||||||
void handleLoadFilters();
|
void handleLoadFilters();
|
||||||
void connButtonPress();
|
void connButtonPress();
|
||||||
@@ -61,6 +60,7 @@ private slots:
|
|||||||
void showFirmwareUploaderWindow();
|
void showFirmwareUploaderWindow();
|
||||||
void showConnectionSettingsWindow();
|
void showConnectionSettingsWindow();
|
||||||
void showScriptingWindow();
|
void showScriptingWindow();
|
||||||
|
void showDBCFileWindow();
|
||||||
void exitApp();
|
void exitApp();
|
||||||
void handleSaveDecoded();
|
void handleSaveDecoded();
|
||||||
void changeBaudRates();
|
void changeBaudRates();
|
||||||
@@ -71,7 +71,6 @@ private slots:
|
|||||||
void gridDoubleClicked(QModelIndex);
|
void gridDoubleClicked(QModelIndex);
|
||||||
void interpretToggled(bool);
|
void interpretToggled(bool);
|
||||||
void overwriteToggled(bool);
|
void overwriteToggled(bool);
|
||||||
void showDBCEditor();
|
|
||||||
void toggleCapture();
|
void toggleCapture();
|
||||||
void normalizeTiming();
|
void normalizeTiming();
|
||||||
void updateFilterList();
|
void updateFilterList();
|
||||||
@@ -129,6 +128,7 @@ private:
|
|||||||
ConnectionWindow *connectionWindow;
|
ConnectionWindow *connectionWindow;
|
||||||
ScriptingWindow *scriptingWindow;
|
ScriptingWindow *scriptingWindow;
|
||||||
RangeStateWindow *rangeWindow;
|
RangeStateWindow *rangeWindow;
|
||||||
|
DBCLoadSaveWindow *dbcFileWindow;
|
||||||
|
|
||||||
//various private storage
|
//various private storage
|
||||||
QLabel lbStatusConnected;
|
QLabel lbStatusConnected;
|
||||||
|
|||||||
+6
-3
@@ -230,9 +230,7 @@
|
|||||||
<addaction name="actionLoad_Filter_Definition"/>
|
<addaction name="actionLoad_Filter_Definition"/>
|
||||||
<addaction name="actionSave_Filter_Definition"/>
|
<addaction name="actionSave_Filter_Definition"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionLoad_DBC_File"/>
|
<addaction name="actionDBC_File_Manager"/>
|
||||||
<addaction name="actionEdit_Messages_Signals"/>
|
|
||||||
<addaction name="actionSave_DBC_File"/>
|
|
||||||
<addaction name="actionSave_Decoded_Frames"/>
|
<addaction name="actionSave_Decoded_Frames"/>
|
||||||
<addaction name="separator"/>
|
<addaction name="separator"/>
|
||||||
<addaction name="actionPreferences"/>
|
<addaction name="actionPreferences"/>
|
||||||
@@ -372,6 +370,11 @@
|
|||||||
<string>Single/Multi State</string>
|
<string>Single/Multi State</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionDBC_File_Manager">
|
||||||
|
<property name="text">
|
||||||
|
<string>DBC File Manager</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<layoutdefault spacing="6" margin="11"/>
|
<layoutdefault spacing="6" margin="11"/>
|
||||||
<resources/>
|
<resources/>
|
||||||
|
|||||||
Reference in New Issue
Block a user