! updates the selected data set of a HDF5 file when a new tree widget item is selected */
| 64 | updates the selected data set of a HDF5 file when a new tree widget item is selected |
| 65 | */ |
| 66 | void 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 |
nothing calls this directly
no test coverage detected