| 86 | } |
| 87 | |
| 88 | void |
| 89 | NetForwarderUI::setForwardState(bool state) |
| 90 | { |
| 91 | this->ui->udpStartStopButton->setChecked(state); |
| 92 | |
| 93 | this->ui->hostEdit->setEnabled(!state); |
| 94 | this->ui->portSpin->setEnabled(!state); |
| 95 | this->ui->frameLen->setEnabled(!state); |
| 96 | |
| 97 | this->ui->udpStartStopButton->setText(state ? "Stop" : "Forward"); |
| 98 | |
| 99 | if (!state) { |
| 100 | this->ui->ioBwProgress->setValue(0); |
| 101 | this->setPreparing(false); |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | void |
| 106 | NetForwarderUI::setForwardEnabled(bool enabled) |