| 2573 | } |
| 2574 | |
| 2575 | void SpreadsheetView::formatHeatmap() { |
| 2576 | #ifndef SDK |
| 2577 | auto columns = selectedColumns(); |
| 2578 | if (columns.isEmpty()) |
| 2579 | columns = m_spreadsheet->children<Column>(); |
| 2580 | |
| 2581 | if (columns.isEmpty()) |
| 2582 | return; |
| 2583 | |
| 2584 | auto* dlg = new FormattingHeatmapDialog(m_spreadsheet); |
| 2585 | dlg->setColumns(columns); |
| 2586 | if (dlg->exec() == QDialog::Accepted) { |
| 2587 | const auto& format = dlg->format(); |
| 2588 | int count = columns.count(); |
| 2589 | if (count > 1) |
| 2590 | m_spreadsheet->beginMacro(i18n("%1: set heatmap format", m_spreadsheet->name())); |
| 2591 | for (auto* col : columns) |
| 2592 | col->setHeatmapFormat(format); |
| 2593 | if (count > 1) |
| 2594 | m_spreadsheet->endMacro(); |
| 2595 | } |
| 2596 | |
| 2597 | delete dlg; |
| 2598 | #endif |
| 2599 | } |
| 2600 | |
| 2601 | void SpreadsheetView::removeFormat() { |
| 2602 | auto columns = selectedColumns(); |
nothing calls this directly
no test coverage detected