| 310 | } |
| 311 | |
| 312 | void SettingsDialog::showAddDeviceDialog() |
| 313 | { |
| 314 | DeviceDialog* dialog = new DeviceDialog(this); |
| 315 | if (dialog->exec() == QDialog::Accepted) |
| 316 | { |
| 317 | DatabaseManager::getInstance().insertDevice(DeviceModel(0, dialog->getName(), dialog->getAddress(), |
| 318 | dialog->getPort().toInt(), dialog->getUsername(), |
| 319 | dialog->getPassword(), dialog->getDescription(), |
| 320 | "", dialog->getShadow(), 0, "", dialog->getPreviewChannel(), |
| 321 | dialog->getLockedChannel())); |
| 322 | |
| 323 | loadDevice(); |
| 324 | |
| 325 | EventManager::getInstance().fireRefreshLibraryEvent(RefreshLibraryEvent()); |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | void SettingsDialog::showAddOscOutputDialog() |
| 330 | { |
nothing calls this directly
no test coverage detected