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

Method formatHeatmap

src/frontend/spreadsheet/SpreadsheetView.cpp:2575–2599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2573}
2574
2575void 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
2601void SpreadsheetView::removeFormat() {
2602 auto columns = selectedColumns();

Callers

nothing calls this directly

Calls 9

execMethod · 0.80
beginMacroMethod · 0.80
setHeatmapFormatMethod · 0.80
endMacroMethod · 0.80
isEmptyMethod · 0.45
setColumnsMethod · 0.45
formatMethod · 0.45
countMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected