| 134 | } |
| 135 | |
| 136 | void DatapickerView::showTabContextMenu(QPoint point) { |
| 137 | QMenu* menu = nullptr; |
| 138 | auto* aspect = m_datapicker->child<AbstractAspect>(m_tabWidget->currentIndex(), AbstractAspect::ChildIndexFlag::IncludeHidden); |
| 139 | auto* spreadsheet = dynamic_cast<Spreadsheet*>(aspect); |
| 140 | if (spreadsheet) { |
| 141 | menu = spreadsheet->createContextMenu(); |
| 142 | } else { |
| 143 | auto* image = dynamic_cast<DatapickerImage*>(aspect); |
| 144 | if (image) |
| 145 | menu = image->createContextMenu(); |
| 146 | } |
| 147 | |
| 148 | if (menu) |
| 149 | menu->exec(m_tabWidget->mapToGlobal(point)); |
| 150 | } |
| 151 | |
| 152 | /*! |
| 153 | * handle the renames of child aspects to adjust the names of the tabs accordingly. |
nothing calls this directly
no test coverage detected