MCPcopy Create free account
hub / github.com/collin80/SavvyCAN / loadFile

Method loadFile

dbc/dbcloadsavewindow.cpp:82–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void DBCLoadSaveWindow::loadFile()
83{
84 DBCFile *file = dbcHandler->loadDBCFile(-1);
85 if(file) {
86 int idx = ui->tableFiles->rowCount();
87 ui->tableFiles->insertRow(ui->tableFiles->rowCount());
88 ui->tableFiles->setItem(idx, 0, new QTableWidgetItem(file->getFullFilename()));
89 ui->tableFiles->setItem(idx, 1, new QTableWidgetItem("-1"));
90 DBC_ATTRIBUTE *attr = file->findAttributeByName("isj1939dbc");
91 QTableWidgetItem *item = new QTableWidgetItem("");
92 ui->tableFiles->setItem(idx, 2, item);
93 if (attr && attr->defaultValue > 0)
94 {
95 item->setCheckState(Qt::Checked);
96 }
97 else
98 {
99 item->setCheckState(Qt::Unchecked);
100 }
101 }
102}
103
104void DBCLoadSaveWindow::saveFile()
105{

Callers

nothing calls this directly

Calls 5

loadDBCFileMethod · 0.80
insertRowMethod · 0.80
getFullFilenameMethod · 0.80
findAttributeByNameMethod · 0.80
rowCountMethod · 0.45

Tested by

no test coverage detected