| 738 | } |
| 739 | |
| 740 | void NetHackQtMenuWindow::ChooseNone() |
| 741 | { |
| 742 | if (how == PICK_NONE) |
| 743 | return; |
| 744 | |
| 745 | if (counting) |
| 746 | ClearCount(); // discard any pending count |
| 747 | for (int row = 0; row < itemcount; ++row) { |
| 748 | itemlist[row].preselected = false; // stale for all rows |
| 749 | // skip if not selectable or already unselected or fails invert_test() |
| 750 | if (!itemlist[row].Selectable() |
| 751 | || (!itemlist[row].selected && !isSelected(row)) |
| 752 | || !menuitem_invert_test(2, itemlist[row].itemflags, TRUE)) |
| 753 | continue; |
| 754 | itemlist[row].selected = false; |
| 755 | |
| 756 | QTableWidgetItem *count = table->item(row, 0); |
| 757 | if (count != NULL) { |
| 758 | count->setText(""); |
| 759 | } |
| 760 | QCheckBox *cb = dynamic_cast<QCheckBox *> (table->cellWidget(row, 1)); |
| 761 | if (cb != NULL) { |
| 762 | cb->setChecked(Qt::Unchecked); |
| 763 | } |
| 764 | } |
| 765 | if (biggestcount > 0L) { // had one or more counts |
| 766 | UpdateCountColumn(-1L); // all counts are now gone |
| 767 | } else { |
| 768 | table->repaint(); |
| 769 | } |
| 770 | } |
| 771 | |
| 772 | void NetHackQtMenuWindow::Invert() |
| 773 | { |
nothing calls this directly
no test coverage detected