InputPatchEditor::InputPatchEditor(QWidget* parent, t_input_universe universe, const InputPatch* inputPatch) : QDialog(parent) { Q_ASSERT(universe < _app->inputMap()->universes()); Q_ASSERT(inputPatch != NULL); setupUi(this); m_universe = universe; setWindowTitle(tr("Mapping properties for input universe %1") .arg(m_universe + 1)); /* Copy these so they can be applied if the user cancels */ m_originalPluginName = inputPatch->pluginName(); m_currentPluginName = inputPatch->pluginName(); m_originalInput = inputPatch->input(); m_currentInput = inputPatch->input(); m_originalProfileName = inputPatch->profileName(); m_currentProfileName = inputPatch->profileName(); m_originalFeedbackEnabled = inputPatch->feedbackEnabled(); m_currentFeedbackEnabled = inputPatch->feedbackEnabled(); /* Setup UI controls */ setupMappingPage(); setupProfilePage(); /* Select the top-most "None" item */ m_mapTree->setCurrentItem(m_mapTree->topLevelItem(0)); }
InputOutputPatchEditor::InputOutputPatchEditor(QWidget* parent, quint32 universe, InputMap* inputMap, OutputMap* outputMap) : QWidget(parent) , m_inputMap(inputMap) , m_outputMap(outputMap) , m_universe(universe) { Q_ASSERT(universe < m_inputMap->universes()); Q_ASSERT(inputMap != NULL); Q_ASSERT(outputMap != NULL); setupUi(this); m_infoBrowser->setOpenExternalLinks(true); m_infoBrowser->setFixedHeight(250); InputPatch* inputPatch = m_inputMap->patch(universe); OutputPatch* outputPatch = m_outputMap->patch(universe); OutputPatch* feedbackPatch = m_outputMap->feedbackPatch(universe); Q_ASSERT(inputPatch != NULL); Q_ASSERT(outputPatch != NULL); /* Copy these so they can be applied if the user cancels */ m_currentInputPluginName = inputPatch->pluginName(); m_currentInput = inputPatch->input(); m_currentProfileName = inputPatch->profileName(); //m_currentFeedbackEnabled = inputPatch->feedbackEnabled(); m_currentOutputPluginName = outputPatch->pluginName(); m_currentOutput = outputPatch->output(); m_currentFeedbackPluginName = feedbackPatch->pluginName(); m_currentFeedback = feedbackPatch->output(); m_mapTree->header()->setResizeMode(QHeaderView::ResizeToContents); m_mapTree->setSortingEnabled(true); m_mapTree->sortByColumn(KMapColumnPluginName, Qt::AscendingOrder); /* Setup UI controls */ setupMappingPage(); setupProfilePage(); /* Select the top-most "None" item */ m_mapTree->setCurrentItem(m_mapTree->topLevelItem(0)); /* Listen to plugin configuration changes */ connect(m_inputMap, SIGNAL(pluginConfigurationChanged(const QString&)), this, SLOT(slotPluginConfigurationChanged(const QString&))); /* Listen to plugin configuration changes */ connect(m_outputMap, SIGNAL(pluginConfigurationChanged(const QString&)), this, SLOT(slotPluginConfigurationChanged(const QString&))); }
InputOutputPatchEditor::InputOutputPatchEditor(QWidget* parent, quint32 universe, InputOutputMap *ioMap, Doc *doc) : QWidget(parent) , m_ioMap(ioMap) , m_doc(doc) , m_universe(universe) , m_currentInputPluginName(KInputNone) , m_currentInput(QLCIOPlugin::invalidLine()) , m_currentOutputPluginName(KOutputNone) , m_currentOutput(QLCIOPlugin::invalidLine()) , m_currentProfileName(KInputNone) , m_currentFeedbackPluginName(KOutputNone) , m_currentFeedback(QLCIOPlugin::invalidLine()) { Q_ASSERT(universe < m_ioMap->universes()); Q_ASSERT(ioMap != NULL); setupUi(this); m_infoBrowser->setOpenExternalLinks(true); m_infoBrowser->setFixedHeight(250); InputPatch* inputPatch = m_ioMap->inputPatch(universe); OutputPatch* outputPatch = m_ioMap->outputPatch(universe); OutputPatch* feedbackPatch = m_ioMap->feedbackPatch(universe); /* Copy these so they can be applied if the user cancels */ if (inputPatch != NULL) { m_currentInputPluginName = inputPatch->pluginName(); m_currentInput = inputPatch->input(); m_currentProfileName = inputPatch->profileName(); } if (outputPatch != NULL) { m_currentOutputPluginName = outputPatch->pluginName(); m_currentOutput = outputPatch->output(); } if (feedbackPatch != NULL) { m_currentFeedbackPluginName = feedbackPatch->pluginName(); m_currentFeedback = feedbackPatch->output(); } m_mapTree->setSortingEnabled(true); m_mapTree->sortByColumn(KMapColumnPluginName, Qt::AscendingOrder); /* Setup UI controls */ setupMappingPage(); setupProfilePage(); fillAudioTree(); /* Listen to itemChanged() signals to catch check state changes */ connect(m_audioMapTree, SIGNAL(itemChanged(QTreeWidgetItem*, int)), this, SLOT(slotAudioDeviceItemChanged(QTreeWidgetItem*, int))); /* Select the top-most "None" item */ m_mapTree->setCurrentItem(m_mapTree->topLevelItem(0)); /* Listen to plugin configuration changes */ connect(m_ioMap, SIGNAL(pluginConfigurationChanged(const QString&)), this, SLOT(slotPluginConfigurationChanged(const QString&))); /* Listen to plugin configuration changes */ connect(m_ioMap, SIGNAL(pluginConfigurationChanged(const QString&)), this, SLOT(slotPluginConfigurationChanged(const QString&))); }