| 706 | } |
| 707 | |
| 708 | void NetHackQtMenuWindow::All() |
| 709 | { |
| 710 | if (how != PICK_ANY && (how != PICK_ONE || itemcount != 1)) |
| 711 | return; |
| 712 | |
| 713 | if (counting) |
| 714 | ClearCount(); // discard any pending count |
| 715 | for (int row = 0; row < itemcount; ++row) { |
| 716 | itemlist[row].preselected = false; // stale for all rows |
| 717 | // skip if not selectable or already selected or fails invert_test() |
| 718 | if (!itemlist[row].Selectable() |
| 719 | || itemlist[row].selected |
| 720 | || !menuitem_invert_test(1, itemlist[row].itemflags, FALSE)) |
| 721 | continue; |
| 722 | itemlist[row].selected = true; |
| 723 | |
| 724 | QTableWidgetItem *count = table->item(row, 0); |
| 725 | if (count != NULL) { |
| 726 | count->setText(""); |
| 727 | } |
| 728 | QCheckBox *cb = dynamic_cast<QCheckBox *> (table->cellWidget(row, 1)); |
| 729 | if (cb != NULL) { |
| 730 | cb->setChecked(true); |
| 731 | } |
| 732 | } |
| 733 | if (biggestcount > 0L) { // had one or more counts |
| 734 | UpdateCountColumn(-1L); // all counts are now gone |
| 735 | } else { |
| 736 | table->repaint(); |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | void NetHackQtMenuWindow::ChooseNone() |
| 741 | { |
nothing calls this directly
no test coverage detected