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

Method toggleStatisticsSpreadsheet

src/backend/spreadsheet/Spreadsheet.cpp:1211–1228  ·  view source on GitHub ↗

! * Toggles the StatisticsSpreadsheet for the current spreadsheet. * @param on Enable/disable the StatisticsSpreadsheet if true/false. */

Source from the content-addressed store, hash-verified

1209 * @param on Enable/disable the StatisticsSpreadsheet if true/false.
1210 */
1211void Spreadsheet::toggleStatisticsSpreadsheet(bool on) {
1212 Q_D(Spreadsheet);
1213 if (on) {
1214 if (d->statisticsSpreadsheet)
1215 return;
1216
1217 d->statisticsSpreadsheet = new StatisticsSpreadsheet(this);
1218 addChildFast(d->statisticsSpreadsheet);
1219 } else {
1220 if (!d->statisticsSpreadsheet)
1221 return;
1222
1223 setUndoAware(false);
1224 removeChild(d->statisticsSpreadsheet);
1225 setUndoAware(true);
1226 d->statisticsSpreadsheet = nullptr;
1227 }
1228}
1229
1230// ##############################################################################
1231// ################## Serialization/Deserialization ###########################

Calls

no outgoing calls