MCPcopy Create free account
hub / github.com/D4stiny/PeaceMaker / on_OpenAlertButton_clicked

Method on_OpenAlertButton_clicked

PeaceMakerGUI/mainwindow.cpp:629–647  ·  view source on GitHub ↗

* @brief MainWindow::on_OpenAlertButton_clicked - Open the selected alert. */

Source from the content-addressed store, hash-verified

627 * @brief MainWindow::on_OpenAlertButton_clicked - Open the selected alert.
628 */
629void 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.

Callers

nothing calls this directly

Calls 1

UpdateDisplayAlertMethod · 0.80

Tested by

no test coverage detected