| 619 | } |
| 620 | |
| 621 | bool LiveCapture::checkAllowDelete() |
| 622 | { |
| 623 | bool needcheck = false; |
| 624 | |
| 625 | for(int i = 0; i < ui->captures->count(); i++) |
| 626 | { |
| 627 | Capture *cap = GetCapture(ui->captures->item(i)); |
| 628 | needcheck |= !cap->saved; |
| 629 | } |
| 630 | |
| 631 | if(!needcheck || ui->captures->selectedItems().empty()) |
| 632 | return true; |
| 633 | |
| 634 | ToolWindowManager::raiseToolWindow(this); |
| 635 | |
| 636 | QMessageBox::StandardButton res = |
| 637 | RDDialog::question(this, tr("Unsaved capture(s)", "", ui->captures->selectedItems().size()), |
| 638 | tr("Are you sure you wish to delete the capture(s)?\nAny capture " |
| 639 | "currently opened will be closed", |
| 640 | "", ui->captures->selectedItems().size()), |
| 641 | RDDialog::YesNoCancel); |
| 642 | |
| 643 | return (res == QMessageBox::Yes); |
| 644 | } |
| 645 | |
| 646 | void LiveCapture::updateAPIStatus() |
| 647 | { |