Added more functionality for new DBC editing system. Tweaked graphics of CANDataGrid a bit.

This commit is contained in:
Collin Kidder
2020-07-22 19:15:16 -04:00
parent 38ab58d92a
commit c89bc43795
13 changed files with 525 additions and 171 deletions
+11 -2
View File
@@ -125,6 +125,7 @@ DBCSignalEditor::DBCSignalEditor(QWidget *parent) :
{
if (currentSignal == nullptr) return;
currentSignal->comment = ui->txtComment->text().simplified().replace(' ', '_');
//updatedTreeInfo();
});
connect(ui->txtUnitName, &QLineEdit::editingFinished,
@@ -151,8 +152,8 @@ DBCSignalEditor::DBCSignalEditor(QWidget *parent) :
if (currentSignal == nullptr) return;
QString tempNameStr = ui->txtName->text().simplified().replace(' ', '_');
if (tempNameStr.length() > 0) currentSignal->name = tempNameStr;
//need to update the list too.
//ui->signalsList->currentItem()->setText(currentSignal->name);
//need to update the tree too.
//updatedTreeInfo();
});
connect(ui->txtMultiplexValue, &QLineEdit::editingFinished,
@@ -286,6 +287,12 @@ void DBCSignalEditor::showEvent(QShowEvent* event)
fillValueTable(currentSignal);
}
void DBCSignalEditor::refreshView()
{
fillSignalForm(currentSignal);
fillValueTable(currentSignal);
}
void DBCSignalEditor::onValuesCellChanged(int row,int col)
{
if (inhibitCellChanged) return;
@@ -519,6 +526,7 @@ void DBCSignalEditor::generateUsedBits()
{
int byt = y / 8;
usedBits[byt] |= 1 << (y % 8);
ui->bitfield->setUsedSignalNum(y, x);
}
}
else //big endian / motorola format
@@ -529,6 +537,7 @@ void DBCSignalEditor::generateUsedBits()
{
int byt = startBit / 8;
usedBits[byt] |= 1 << (startBit % 8);
ui->bitfield->setUsedSignalNum(startBit, x);
size--;
if ((startBit % 8) == 0) startBit += 15;
else startBit--;