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

Method hdf5TreeWidgetSelectionChanged

src/frontend/datasources/HDF5OptionsWidget.cpp:66–79  ·  view source on GitHub ↗

! updates the selected data set of a HDF5 file when a new tree widget item is selected */

Source from the content-addressed store, hash-verified

64 updates the selected data set of a HDF5 file when a new tree widget item is selected
65*/
66void HDF5OptionsWidget::hdf5TreeWidgetSelectionChanged() {
67 DEBUG(Q_FUNC_INFO);
68 auto items = ui.twContent->selectedItems();
69 QDEBUG("SELECTED ITEMS =" << items);
70
71 if (items.isEmpty())
72 return;
73
74 QTreeWidgetItem* item = items.first();
75 if (item->data(2, Qt::DisplayRole).toString() == i18n("data set"))
76 m_fileWidget->refreshPreview();
77 else
78 DEBUG(Q_FUNC_INFO << ", non data set selected in HDF5 tree widget");
79}
80
81/*!
82 return list of selected HDF5 item names

Callers

nothing calls this directly

Calls 5

selectedItemsMethod · 0.80
isEmptyMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
refreshPreviewMethod · 0.45

Tested by

no test coverage detected