* @brief MainWindow::on_OpenAlertButton_clicked - Open the selected alert. */
| 627 | * @brief MainWindow::on_OpenAlertButton_clicked - Open the selected alert. |
| 628 | */ |
| 629 | void MainWindow::on_OpenAlertButton_clicked() |
| 630 | { |
| 631 | int selectedRow; |
| 632 | |
| 633 | if(this->ui->AlertsTable->selectedItems().size() == 0) |
| 634 | { |
| 635 | return; |
| 636 | } |
| 637 | |
| 638 | // |
| 639 | // Since rows start from 0, we need to subtract |
| 640 | // the row count from the table size to get the |
| 641 | // right index. |
| 642 | // |
| 643 | selectedRow = alerts.size() - 1 - this->ui->AlertsTable->selectedItems()[0]->row(); |
| 644 | |
| 645 | alertWindow->UpdateDisplayAlert(alerts[selectedRow]); |
| 646 | alertWindow->show(); |
| 647 | } |
| 648 | |
| 649 | /** |
| 650 | * @brief MainWindow::on_DeleteAlertButton_clicked - Delete the selected alert. |
nothing calls this directly
no test coverage detected