| 243 | } |
| 244 | |
| 245 | bool RundownSolidColorWidget::executeCommand(Playout::PlayoutType type) |
| 246 | { |
| 247 | if (type == Playout::PlayoutType::Stop) |
| 248 | executeStop(); |
| 249 | else if ((type == Playout::PlayoutType::Play && !this->command.getTriggerOnNext()) || type == Playout::PlayoutType::Load) |
| 250 | { |
| 251 | if (this->command.getDelay() < 0) |
| 252 | return true; |
| 253 | |
| 254 | if (!this->model.getDeviceName().isEmpty()) // The user need to select a device. |
| 255 | { |
| 256 | const QStringList& channelFormats = DatabaseManager::getInstance().getDeviceByName(this->model.getDeviceName()).getChannelFormats().split(","); |
| 257 | if (this->command.getChannel() > channelFormats.count()) |
| 258 | return true; |
| 259 | |
| 260 | this->itemScheduler.schedulePlayAndStop( |
| 261 | this->command.getDelay(), |
| 262 | this->command.getDuration(), |
| 263 | this->delayType, |
| 264 | DatabaseManager::getInstance().getFormat(channelFormats[this->command.getChannel() - 1]).getFramesPerSecond().toDouble()); |
| 265 | } |
| 266 | } |
| 267 | else if (type == Playout::PlayoutType::PlayNow) |
| 268 | executePlay(); |
| 269 | else if (type == Playout::PlayoutType::PauseResume) |
| 270 | executePause(); |
| 271 | else if (type == Playout::PlayoutType::Load) |
| 272 | executeLoad(); |
| 273 | else if (type == Playout::PlayoutType::Next) |
| 274 | executePlay(); |
| 275 | else if (type == Playout::PlayoutType::Clear) |
| 276 | executeClearVideolayer(); |
| 277 | else if (type == Playout::PlayoutType::ClearVideoLayer) |
| 278 | executeClearVideolayer(); |
| 279 | else if (type == Playout::PlayoutType::ClearChannel) |
| 280 | executeClearChannel(); |
| 281 | else if (type == Playout::PlayoutType::Preview) |
| 282 | executeLoadPreview(); |
| 283 | |
| 284 | if (this->active) |
| 285 | this->animation->start(1); |
| 286 | |
| 287 | return true; |
| 288 | } |
| 289 | |
| 290 | void RundownSolidColorWidget::executeStop() |
| 291 | { |
nothing calls this directly
no test coverage detected