| 163 | } |
| 164 | |
| 165 | void DeviceBrowser::prevDevice() |
| 166 | { |
| 167 | int maxIdx = list.size(); |
| 168 | int nextIdx = currentIdx; |
| 169 | |
| 170 | do { // find next visible and enabled button |
| 171 | nextIdx = (nextIdx - 1) % maxIdx; |
| 172 | nextIdx = (nextIdx < 0) ? nextIdx + maxIdx : nextIdx; // wrap around negative |
| 173 | } while(!(list.at(nextIdx)->isVisible() && list.at(nextIdx)->isEnabled())); |
| 174 | |
| 175 | QString nextId = getIdOfIndex(nextIdx); |
| 176 | Q_EMIT requestDevice(nextId, -1); // start animation |
| 177 | list[nextIdx]->setChecked(true); // set checked afterwards |
| 178 | } |
| 179 | |
| 180 | void DeviceBrowser::forwardRequestDeviceWithDirection() |
| 181 | { |
nothing calls this directly
no test coverage detected