void InputMappingDialog::showEvent(QShowEvent* /*event*/) { if (!widgetsValid_) { qApp->setOverrideCursor(Qt::WaitCursor); qApp->processEvents(); rebuildWidgets(); qApp->restoreOverrideCursor(); } }
void InputMappingDialog::setProcessorNetwork(ProcessorNetwork* network) { // stop observation of previously assigned network stopObservation(processorNetwork_); // update network and register as observer processorNetwork_ = network; if (processorNetwork_) processorNetwork_->addObserver(this); setEnabled(true); // only rebuild widgets immediately, if network is empty or the widget is visible if (!processorNetwork_ || processorNetwork_->empty() || isVisible()) rebuildWidgets(); else widgetsValid_ = false; }
void EventVideoDownloadsWindow::setEventDownloadManager(EventDownloadManager *eventDownloadManager) { if (m_eventDownloadManager.data() == eventDownloadManager) return; if (m_eventDownloadManager) disconnect(m_eventDownloadManager.data(), 0, this, 0); m_eventDownloadManager = eventDownloadManager; if (m_eventDownloadManager) { connect(m_eventDownloadManager.data(), SIGNAL(eventVideoDownloadAdded(EventVideoDownload*)), this, SLOT(eventVideoDownloadAdded(EventVideoDownload*))); connect(m_eventDownloadManager.data(), SIGNAL(eventVideoDownloadRemoved(EventVideoDownload*)), this, SLOT(eventVideoDownloadRemoved(EventVideoDownload*))); } rebuildWidgets(); }