VCPropertiesEditor::VCPropertiesEditor(QWidget* parent, const VCProperties& properties) : QDialog(parent) { setupUi(this); connect(m_chooseFadeInputButton, SIGNAL(clicked()), this, SLOT(slotChooseFadeInputClicked())); connect(m_chooseHoldInputButton, SIGNAL(clicked()), this, SLOT(slotChooseHoldInputClicked())); m_properties = properties; /* Grid */ m_gridGroup->setChecked(properties.isGridEnabled()); m_gridXSpin->setValue(properties.gridX()); m_gridYSpin->setValue(properties.gridY()); /* Keyboard */ m_grabKeyboardCheck->setChecked(properties.isGrabKeyboard()); m_keyRepeatOffCheck->setChecked(properties.isKeyRepeatOff()); /* Slider limits */ m_fadeLowSpin->setValue(properties.fadeLowLimit()); m_fadeHighSpin->setValue(properties.fadeHighLimit()); m_holdLowSpin->setValue(properties.holdLowLimit()); m_holdHighSpin->setValue(properties.holdHighLimit()); /* External input */ updateFadeInputSource(); updateHoldInputSource(); }
VCPropertiesEditor::VCPropertiesEditor(QWidget* parent, const VCProperties& properties, InputMap* inputMap) : QDialog(parent) , m_inputMap(inputMap) { Q_ASSERT(inputMap != NULL); setupUi(this); QAction* action = new QAction(this); action->setShortcut(QKeySequence(QKeySequence::Close)); connect(action, SIGNAL(triggered(bool)), this, SLOT(reject())); addAction(action); m_properties = properties; /* Layout page */ m_gridGroup->setChecked(properties.isGridEnabled()); m_gridXSpin->setValue(properties.gridX()); m_gridYSpin->setValue(properties.gridY()); m_grabKeyboardCheck->setChecked(properties.isGrabKeyboard()); m_keyRepeatOffCheck->setChecked(properties.isKeyRepeatOff()); /* Fade page */ m_fadeLowSpin->setValue(properties.fadeLowLimit()); m_fadeHighSpin->setValue(properties.fadeHighLimit()); updateFadeInputSource(); /* Hold page */ m_holdLowSpin->setValue(properties.holdLowLimit()); m_holdHighSpin->setValue(properties.holdHighLimit()); updateHoldInputSource(); /* Grand Master page */ switch (properties.grandMasterChannelMode()) { default: case UniverseArray::GMIntensity: m_gmIntensityRadio->setChecked(true); break; case UniverseArray::GMAllChannels: m_gmAllChannelsRadio->setChecked(true); break; } switch (properties.grandMasterValueMode()) { default: case UniverseArray::GMReduce: m_gmReduceRadio->setChecked(true); break; case UniverseArray::GMLimit: m_gmLimitRadio->setChecked(true); break; } updateGrandMasterInputSource(); /* Blackout page*/ updateBlackoutInputSource(); }