MCPcopy Create free account
hub / github.com/KDE/labplot / updateContent

Method updateContent

src/frontend/datasources/MatioOptionsWidget.cpp:42–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42void MatioOptionsWidget::updateContent(MatioFilter* filter, const QString& fileName) {
43 // update variable info
44 filter->parse(fileName);
45
46 const auto n = filter->varCount();
47 const QVector<QStringList> varsInfo = filter->varsInfo();
48 ui.twContent->setRowCount(n);
49 const int nrCols = 7;
50 for (int j = 0; j < nrCols; j++) {
51 for (size_t i = 0; i < n; i++) {
52 auto* item = new QTableWidgetItem(varsInfo.at(i).at(j));
53 item->setFlags(item->flags() ^ Qt::ItemIsEditable); // readonly
54 ui.twContent->setItem(i, j, item);
55 }
56 ui.twContent->resizeColumnToContents(j);
57 }
58}
59
60/*!
61 updates the selected var name of a Matio file when the table widget item is selected

Callers

nothing calls this directly

Calls 5

varCountMethod · 0.80
varsInfoMethod · 0.80
parseMethod · 0.45
setRowCountMethod · 0.45
flagsMethod · 0.45

Tested by

no test coverage detected