| 251 | } |
| 252 | |
| 253 | void WorksheetPreviewWidget::contextMenuEvent(QContextMenuEvent*) { |
| 254 | const int index = ui.lwPreview->currentRow(); |
| 255 | if (index == -1) |
| 256 | return; |
| 257 | |
| 258 | const auto& worksheets = m_project->children<Worksheet>(AbstractAspect::ChildIndexFlag::Recursive); |
| 259 | auto* worksheet = worksheets.at(index); |
| 260 | auto* menu = worksheet->createContextMenu(); |
| 261 | menu->exec(QCursor::pos()); |
| 262 | } |
| 263 | |
| 264 | void WorksheetPreviewWidget::resizeEvent(QResizeEvent*) { |
| 265 | if (width() > height()) |
nothing calls this directly
no test coverage detected