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

Method removeRows

src/backend/matrix/Matrix.cpp:408–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

406}
407
408void Matrix::removeRows(int first, int count) {
409 if (count < 1 || first < 0 || first + count > rowCount())
410 return;
411 WAIT_CURSOR;
412 Q_D(Matrix);
413 switch (d->mode) {
414 case AbstractColumn::ColumnMode::Double:
415 exec(new MatrixRemoveRowsCmd<double>(d, first, count));
416 break;
417 case AbstractColumn::ColumnMode::Text:
418 exec(new MatrixRemoveRowsCmd<QString>(d, first, count));
419 break;
420 case AbstractColumn::ColumnMode::Integer:
421 exec(new MatrixRemoveRowsCmd<int>(d, first, count));
422 break;
423 case AbstractColumn::ColumnMode::BigInt:
424 exec(new MatrixRemoveRowsCmd<qint64>(d, first, count));
425 break;
426 case AbstractColumn::ColumnMode::Day:
427 case AbstractColumn::ColumnMode::Month:
428 case AbstractColumn::ColumnMode::DateTime:
429 exec(new MatrixRemoveRowsCmd<QDateTime>(d, first, count));
430 break;
431 }
432 RESET_CURSOR;
433}
434
435void Matrix::clearRow(int r) {
436 Q_D(Matrix);

Callers 10

removeSelectedRowsMethod · 0.45
removeSelectedRowsMethod · 0.45
redoMethod · 0.45
redoMethod · 0.45
undoMethod · 0.45
childRemovedMethod · 0.45
testRemoveRowMethod · 0.45
spreadsheetRemoveRowsMethod · 0.45
testBarPlotRangeMethod · 0.45
testRemoveRowsBeginMethod · 0.45

Calls 5

rowCountFunction · 0.85
operator[]Method · 0.80
columnCountMethod · 0.45
removeMethod · 0.45
clearMethod · 0.45

Tested by 4

testRemoveRowMethod · 0.36
spreadsheetRemoveRowsMethod · 0.36
testBarPlotRangeMethod · 0.36
testRemoveRowsBeginMethod · 0.36