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

Method flattenColumns

src/frontend/spreadsheet/SpreadsheetView.cpp:2861–2878  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2859}
2860
2861void SpreadsheetView::flattenColumns() {
2862 const auto& columns = selectedColumns();
2863 if (columns.isEmpty())
2864 return;
2865
2866 // ensure all selected columns have the same column mode
2867 auto mode = columns.at(0)->columnMode();
2868 for (auto* col : columns) {
2869 if (col->columnMode() != mode) {
2870 KMessageBox::error(this, i18n("The selected columns have different data types and cannot be flattened because of this. "));
2871 return;
2872 }
2873 }
2874
2875 auto* dlg = new FlattenColumnsDialog(m_spreadsheet, this);
2876 dlg->setColumns(columns);
2877 dlg->exec();
2878}
2879
2880void SpreadsheetView::normalizeSelectedColumns(QAction* action) {
2881 auto columns = selectedColumns();

Callers

nothing calls this directly

Calls 4

execMethod · 0.80
isEmptyMethod · 0.45
columnModeMethod · 0.45
setColumnsMethod · 0.45

Tested by

no test coverage detected