void VCSliderProperties::slotInputValueChanged(quint32 universe, quint32 channel) { m_inputUniverse = universe; m_inputChannel = channel; updateInputSource(); }
void VCSliderProperties::slotInputValueChanged(quint32 universe, quint32 channel) { if (m_inputSource != NULL) delete m_inputSource; m_inputSource = new QLCInputSource(universe, (m_slider->page() << 16) | channel); updateInputSource(); }
void InputSelectionWidget::slotChooseInputClicked() { SelectInputChannel sic(this, m_doc->inputOutputMap()); if (sic.exec() == QDialog::Accepted) { m_inputSource = QSharedPointer<QLCInputSource>(new QLCInputSource(sic.universe(), sic.channel())); updateInputSource(); emit inputValueChanged(sic.universe(), sic.channel()); } }
void VCSliderProperties::slotChooseInputClicked() { SelectInputChannel sic(this, m_inputMap); if (sic.exec() == QDialog::Accepted) { m_inputUniverse = sic.universe(); m_inputChannel = sic.channel(); updateInputSource(); } }
void VCSliderProperties::slotChooseInputClicked() { SelectInputChannel sic(this, m_doc->inputOutputMap()); if (sic.exec() == QDialog::Accepted) { if (m_inputSource != NULL) delete m_inputSource; m_inputSource = new QLCInputSource(sic.universe(), sic.channel()); updateInputSource(); } }
void InputSelectionWidget::slotInputValueChanged(quint32 universe, quint32 channel) { if (m_emitOdd == true && m_signalsReceived % 2) { emit inputValueChanged(universe, (m_widgetPage << 16) | channel); m_signalsReceived++; return; } m_inputSource = QSharedPointer<QLCInputSource>(new QLCInputSource(universe, (m_widgetPage << 16) | channel)); updateInputSource(); m_signalsReceived++; if (m_emitOdd == false) emit inputValueChanged(universe, (m_widgetPage << 16) | channel); }
AudioTriggersConfiguration::AudioTriggersConfiguration(VCAudioTriggers *triggers, Doc *doc, AudioCapture *capture) : QDialog(triggers) , m_doc(doc) , m_capture(capture) { setupUi(this); Q_ASSERT(capture != NULL); m_triggers = triggers; m_nameEdit->setText(m_triggers->caption()); m_barsNumSpin->setFixedWidth(70); m_barsNumSpin->setFixedHeight(30); m_barsNumSpin->setValue(m_capture->bandsNumber()); connect(m_barsNumSpin, SIGNAL(valueChanged(int)), this, SLOT(updateTree())); /* Key sequence */ m_keySequence = QKeySequence(triggers->keySequence()); m_keyEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); /* External input */ m_inputSource = triggers->inputSource(); updateInputSource(); connect(m_attachKey, SIGNAL(clicked()), this, SLOT(slotAttachKey())); connect(m_detachKey, SIGNAL(clicked()), this, SLOT(slotDetachKey())); connect(m_autoDetectInputButton, SIGNAL(toggled(bool)), this, SLOT(slotAutoDetectInputToggled(bool))); connect(m_chooseInputButton, SIGNAL(clicked()), this, SLOT(slotChooseInputClicked())); m_tree->setAlternatingRowColors(true); m_tree->setRootIsDecorated(false); m_tree->setSelectionMode(QAbstractItemView::NoSelection); m_tree->setAllColumnsShowFocus(true); updateTree(); }
VCButtonProperties::VCButtonProperties(VCButton* button, QWidget* parent) : QDialog(parent) { Q_ASSERT(button != NULL); setupUi(this); /* Button text and function */ m_button = button; m_nameEdit->setText(m_button->caption()); slotSetFunction(button->function()); /* Key sequence */ m_keySequence = QKeySequence(button->keySequence()); m_keyEdit->setText(m_keySequence.toString()); /* External input */ m_inputUniverse = m_button->inputUniverse(); m_inputChannel = m_button->inputChannel(); updateInputSource(); connect(m_autoDetectInputButton, SIGNAL(toggled(bool)), this, SLOT(slotAutoDetectInputToggled(bool))); connect(m_chooseInputButton, SIGNAL(clicked()), this, SLOT(slotChooseInputClicked())); /* Press action */ if (button->action() == VCButton::Toggle) m_toggle->setChecked(true); else m_flash->setChecked(true); /* Button connections */ connect(m_attachFunction, SIGNAL(clicked()), this, SLOT(slotAttachFunction())); connect(m_detachFunction, SIGNAL(clicked()), this, SLOT(slotSetFunction())); connect(m_attachKey, SIGNAL(clicked()), this, SLOT(slotAttachKey())); connect(m_detachKey, SIGNAL(clicked()), this, SLOT(slotDetachKey())); }
VCSliderProperties::VCSliderProperties(VCSlider* slider, Doc* doc, OutputMap* outputMap, InputMap* inputMap, MasterTimer* masterTimer) : QDialog(slider) , m_doc(doc) , m_outputMap(outputMap) , m_inputMap(inputMap) , m_masterTimer(masterTimer) { Q_ASSERT(doc != NULL); Q_ASSERT(outputMap != NULL); Q_ASSERT(inputMap != NULL); Q_ASSERT(masterTimer != NULL); Q_ASSERT(slider != NULL); m_slider = slider; setupUi(this); QAction* action = new QAction(this); action->setShortcut(QKeySequence(QKeySequence::Close)); connect(action, SIGNAL(triggered(bool)), this, SLOT(reject())); addAction(action); /* Bus page connections */ connect(m_switchToBusModeButton, SIGNAL(clicked()), this, SLOT(slotModeBusClicked())); /* Level page connections */ connect(m_levelLowLimitSpin, SIGNAL(valueChanged(int)), this, SLOT(slotLevelLowSpinChanged(int))); connect(m_levelHighLimitSpin, SIGNAL(valueChanged(int)), this, SLOT(slotLevelHighSpinChanged(int))); connect(m_levelCapabilityButton, SIGNAL(clicked()), this, SLOT(slotLevelCapabilityClicked())); connect(m_levelList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(slotLevelListClicked(QTreeWidgetItem*))); connect(m_levelAllButton, SIGNAL(clicked()), this, SLOT(slotLevelAllClicked())); connect(m_levelNoneButton, SIGNAL(clicked()), this, SLOT(slotLevelNoneClicked())); connect(m_levelInvertButton, SIGNAL(clicked()), this, SLOT(slotLevelInvertClicked())); connect(m_levelByGroupButton, SIGNAL(clicked()), this, SLOT(slotLevelByGroupClicked())); connect(m_switchToLevelModeButton, SIGNAL(clicked()), this, SLOT(slotModeLevelClicked())); /* Playback page connections */ connect(m_switchToPlaybackModeButton, SIGNAL(clicked()), this, SLOT(slotModePlaybackClicked())); connect(m_attachPlaybackFunctionButton, SIGNAL(clicked()), this, SLOT(slotAttachPlaybackFunctionClicked())); connect(m_detachPlaybackFunctionButton, SIGNAL(clicked()), this, SLOT(slotDetachPlaybackFunctionClicked())); /********************************************************************* * General page *********************************************************************/ /* Name */ m_nameEdit->setText(m_slider->caption()); /* Slider mode */ m_sliderMode = m_slider->sliderMode(); switch (m_sliderMode) { default: case VCSlider::Bus: slotModeBusClicked(); break; case VCSlider::Level: slotModeLevelClicked(); break; case VCSlider::Playback: slotModePlaybackClicked(); break; } /* Slider movement (Qt understands inverted appearance vice versa) */ if (m_slider->invertedAppearance() == true) m_sliderMovementInvertedRadio->setChecked(true); else m_sliderMovementNormalRadio->setChecked(true); /* Value display style */ switch (m_slider->valueDisplayStyle()) { default: case VCSlider::ExactValue: m_valueExactRadio->setChecked(true); break; case VCSlider::PercentageValue: m_valuePercentageRadio->setChecked(true); break; } /******************************************************************** * External input ********************************************************************/ m_inputUniverse = m_slider->inputUniverse(); m_inputChannel = m_slider->inputChannel(); updateInputSource(); connect(m_autoDetectInputButton, SIGNAL(toggled(bool)), this, SLOT(slotAutoDetectInputToggled(bool))); connect(m_chooseInputButton, SIGNAL(clicked()), this, SLOT(slotChooseInputClicked())); /********************************************************************* * Bus page *********************************************************************/ /* Bus combo contents */ fillBusCombo(); /* Bus value limit spins */ m_busLowLimitSpin->setValue(m_slider->busLowLimit()); m_busHighLimitSpin->setValue(m_slider->busHighLimit()); /********************************************************************* * Level page *********************************************************************/ /* Level limit spins */ m_levelLowLimitSpin->setValue(m_slider->levelLowLimit()); m_levelHighLimitSpin->setValue(m_slider->levelHighLimit()); /* Tree widget columns */ m_levelList->header()->setResizeMode(QHeaderView::ResizeToContents); /* Tree widget contents */ levelUpdateFixtures(); levelUpdateChannelSelections(); /********************************************************************* * Playback page *********************************************************************/ /* Function */ m_playbackFunctionId = m_slider->playbackFunction(); updatePlaybackFunctionName(); }
VCSliderProperties::VCSliderProperties(VCSlider* slider, Doc* doc) : QDialog(slider) , m_doc(doc) { Q_ASSERT(doc != NULL); Q_ASSERT(slider != NULL); m_slider = slider; setupUi(this); QAction* action = new QAction(this); action->setShortcut(QKeySequence(QKeySequence::Close)); connect(action, SIGNAL(triggered(bool)), this, SLOT(reject())); addAction(action); /* Level page connections */ connect(m_levelLowLimitSpin, SIGNAL(valueChanged(int)), this, SLOT(slotLevelLowSpinChanged(int))); connect(m_levelHighLimitSpin, SIGNAL(valueChanged(int)), this, SLOT(slotLevelHighSpinChanged(int))); connect(m_levelCapabilityButton, SIGNAL(clicked()), this, SLOT(slotLevelCapabilityClicked())); connect(m_levelList, SIGNAL(itemClicked(QTreeWidgetItem*,int)), this, SLOT(slotLevelListClicked(QTreeWidgetItem*))); connect(m_levelAllButton, SIGNAL(clicked()), this, SLOT(slotLevelAllClicked())); connect(m_levelNoneButton, SIGNAL(clicked()), this, SLOT(slotLevelNoneClicked())); connect(m_levelInvertButton, SIGNAL(clicked()), this, SLOT(slotLevelInvertClicked())); connect(m_levelByGroupButton, SIGNAL(clicked()), this, SLOT(slotLevelByGroupClicked())); connect(m_switchToLevelModeButton, SIGNAL(clicked()), this, SLOT(slotModeLevelClicked())); /* Playback page connections */ connect(m_switchToPlaybackModeButton, SIGNAL(clicked()), this, SLOT(slotModePlaybackClicked())); connect(m_attachPlaybackFunctionButton, SIGNAL(clicked()), this, SLOT(slotAttachPlaybackFunctionClicked())); connect(m_detachPlaybackFunctionButton, SIGNAL(clicked()), this, SLOT(slotDetachPlaybackFunctionClicked())); /* Submaster page connections */ connect(m_switchToSubmasterModeButton, SIGNAL(clicked()), this, SLOT(slotModeSubmasterClicked())); /********************************************************************* * General page *********************************************************************/ /* Name */ m_nameEdit->setText(m_slider->caption()); /* Widget appearance */ if (m_slider->widgetStyle() == VCSlider::WKnob) m_widgetKnobRadio->setChecked(true); else m_widgetSliderRadio->setChecked(true); /* Slider mode */ m_sliderMode = m_slider->sliderMode(); switch (m_sliderMode) { default: case VCSlider::Level: slotModeLevelClicked(); break; case VCSlider::Playback: slotModePlaybackClicked(); break; case VCSlider::Submaster: slotModeSubmasterClicked(); break; } /* Slider movement (Qt understands inverted appearance vice versa) */ if (m_slider->invertedAppearance() == true) m_sliderMovementInvertedRadio->setChecked(true); else m_sliderMovementNormalRadio->setChecked(true); /* Value display style */ switch (m_slider->valueDisplayStyle()) { default: case VCSlider::ExactValue: m_valueExactRadio->setChecked(true); break; case VCSlider::PercentageValue: m_valuePercentageRadio->setChecked(true); break; } /******************************************************************** * External input ********************************************************************/ m_inputSource = m_slider->inputSource(); updateInputSource(); connect(m_autoDetectInputButton, SIGNAL(toggled(bool)), this, SLOT(slotAutoDetectInputToggled(bool))); connect(m_chooseInputButton, SIGNAL(clicked()), this, SLOT(slotChooseInputClicked())); /********************************************************************* * Level page *********************************************************************/ /* Level limit spins */ m_levelLowLimitSpin->setValue(m_slider->levelLowLimit()); m_levelHighLimitSpin->setValue(m_slider->levelHighLimit()); /* Tree widget contents */ levelUpdateFixtures(); levelUpdateChannelSelections(); connect(m_levelList, SIGNAL(expanded(QModelIndex)), this, SLOT(slotItemExpanded())); connect(m_levelList, SIGNAL(collapsed(QModelIndex)), this, SLOT(slotItemExpanded())); m_monitorValuesCheck->setChecked(m_slider->channelsMonitorEnabled()); /********************************************************************* * Playback page *********************************************************************/ /* Function */ m_playbackFunctionId = m_slider->playbackFunction(); updatePlaybackFunctionName(); }
void InputSelectionWidget::setInputSource(const QSharedPointer<QLCInputSource> &source) { m_inputSource = source; updateInputSource(); }
VCButtonProperties::VCButtonProperties(VCButton* button, Doc* doc, OutputMap* outputMap, InputMap* inputMap, MasterTimer* masterTimer) : QDialog(button) , m_doc(doc) , m_outputMap(outputMap) , m_inputMap(inputMap) , m_masterTimer(masterTimer) { Q_ASSERT(button != NULL); Q_ASSERT(doc != NULL); Q_ASSERT(outputMap != NULL); Q_ASSERT(inputMap != NULL); Q_ASSERT(masterTimer != NULL); setupUi(this); QAction* action = new QAction(this); action->setShortcut(QKeySequence(QKeySequence::Close)); connect(action, SIGNAL(triggered(bool)), this, SLOT(reject())); addAction(action); /* Button text and function */ m_button = button; m_nameEdit->setText(m_button->caption()); slotSetFunction(button->function()); /* Key sequence */ m_keySequence = QKeySequence(button->keySequence()); m_keyEdit->setText(m_keySequence.toString(QKeySequence::NativeText)); /* External input */ m_inputUniverse = m_button->inputUniverse(); m_inputChannel = m_button->inputChannel(); updateInputSource(); /* Press action */ if (button->action() == VCButton::Toggle) m_toggle->setChecked(true); else m_flash->setChecked(true); /* Intensity adjustment */ m_intensityEdit->setValidator(new QIntValidator(0, 100, this)); m_intensityGroup->setChecked(m_button->adjustIntensity()); int intensity = int(floor(m_button->intensityAdjustment() * double(100))); m_intensityEdit->setText(QString::number(intensity)); m_intensitySlider->setValue(intensity); /* Button connections */ connect(m_attachFunction, SIGNAL(clicked()), this, SLOT(slotAttachFunction())); connect(m_detachFunction, SIGNAL(clicked()), this, SLOT(slotSetFunction())); connect(m_attachKey, SIGNAL(clicked()), this, SLOT(slotAttachKey())); connect(m_detachKey, SIGNAL(clicked()), this, SLOT(slotDetachKey())); connect(m_autoDetectInputButton, SIGNAL(toggled(bool)), this, SLOT(slotAutoDetectInputToggled(bool))); connect(m_chooseInputButton, SIGNAL(clicked()), this, SLOT(slotChooseInputClicked())); connect(m_intensitySlider, SIGNAL(valueChanged(int)), this, SLOT(slotIntensitySliderMoved(int))); connect(m_intensityEdit, SIGNAL(textEdited(QString)), this, SLOT(slotIntensityEdited(QString))); }