############################################################################## ######################### Public slots ##################################### ############################################################################## Clear the whole matrix (i.e. reset all cells)
| 697 | // ############################################################################## |
| 698 | //! Clear the whole matrix (i.e. reset all cells) |
| 699 | void Matrix::clear() { |
| 700 | WAIT_CURSOR; |
| 701 | if (columnCount() == 0) |
| 702 | return; // Nothing to do |
| 703 | Q_D(Matrix); |
| 704 | beginMacro(i18n("%1: clear", name())); |
| 705 | switch (d->mode) { |
| 706 | case AbstractColumn::ColumnMode::Double: |
| 707 | exec(new MatrixClearCmd<double>(d)); |
| 708 | break; |
| 709 | case AbstractColumn::ColumnMode::Text: |
| 710 | exec(new MatrixClearCmd<QString>(d)); |
| 711 | break; |
| 712 | case AbstractColumn::ColumnMode::Integer: |
| 713 | exec(new MatrixClearCmd<int>(d)); |
| 714 | break; |
| 715 | case AbstractColumn::ColumnMode::BigInt: |
| 716 | exec(new MatrixClearCmd<qint64>(d)); |
| 717 | break; |
| 718 | case AbstractColumn::ColumnMode::Day: |
| 719 | case AbstractColumn::ColumnMode::Month: |
| 720 | case AbstractColumn::ColumnMode::DateTime: |
| 721 | exec(new MatrixClearCmd<QDateTime>(d)); |
| 722 | break; |
| 723 | } |
| 724 | endMacro(); |
| 725 | RESET_CURSOR; |
| 726 | } |
| 727 | |
| 728 | void Matrix::transpose() { |
| 729 | WAIT_CURSOR; |