diff --git a/engine/src/qlcinputsource.cpp b/engine/src/qlcinputsource.cpp
index b418b1b39c..a1d0f06fc6 100644
--- a/engine/src/qlcinputsource.cpp
+++ b/engine/src/qlcinputsource.cpp
@@ -126,6 +126,11 @@ void QLCInputSource::setRange(uchar lower, uchar upper)
m_upper = upper;
}
+void QLCInputSource::setMonitor(uchar monitor)
+{
+ m_monitor = monitor;
+}
+
uchar QLCInputSource::lowerValue() const
{
return m_lower;
@@ -136,6 +141,11 @@ uchar QLCInputSource::upperValue() const
return m_upper;
}
+uchar QLCInputSource::monitorValue() const
+{
+ return m_monitor;
+}
+
/*********************************************************************
* Working mode
*********************************************************************/
diff --git a/engine/src/qlcinputsource.h b/engine/src/qlcinputsource.h
index 42b762a98d..7044d8970f 100644
--- a/engine/src/qlcinputsource.h
+++ b/engine/src/qlcinputsource.h
@@ -79,9 +79,11 @@ class QLCInputSource: public QThread
void setRange(uchar lower, uchar upper);
uchar lowerValue() const;
uchar upperValue() const;
+ void setMonitor(uchar monitor);
+ uchar monitorValue() const;
protected:
- uchar m_lower, m_upper;
+ uchar m_lower, m_upper, m_monitor;
/*********************************************************************
* Working mode
diff --git a/ui/src/inputselectionwidget.cpp b/ui/src/inputselectionwidget.cpp
index ef7e7fc62a..1cc8ccdede 100644
--- a/ui/src/inputselectionwidget.cpp
+++ b/ui/src/inputselectionwidget.cpp
@@ -42,6 +42,7 @@ InputSelectionWidget::InputSelectionWidget(Doc *doc, QWidget *parent)
m_feedbackGroup->setVisible(false);
m_lowerSpin->setEnabled(false);
m_upperSpin->setEnabled(false);
+ m_monitorSpin->setEnabled(false);
connect(m_attachKey, SIGNAL(clicked()), this, SLOT(slotAttachKey()));
connect(m_detachKey, SIGNAL(clicked()), this, SLOT(slotDetachKey()));
@@ -57,6 +58,8 @@ InputSelectionWidget::InputSelectionWidget(Doc *doc, QWidget *parent)
this, SLOT(slotLowerSpinValueChanged(int)));
connect(m_upperSpin, SIGNAL(valueChanged(int)),
this, SLOT(slotUpperSpinValueChanged(int)));
+ connect(m_monitorSpin, SIGNAL(valueChanged(int)),
+ this, SLOT(slotMonitorSpinValueChanged(int)));
}
InputSelectionWidget::~InputSelectionWidget()
@@ -197,6 +200,11 @@ void InputSelectionWidget::slotUpperSpinValueChanged(int value)
m_inputSource->setRange(uchar(m_lowerSpin->value()), uchar(value));
}
+void InputSelectionWidget::slotMonitorSpinValueChanged(int value)
+{
+ m_inputSource->setMonitor(uchar(value));
+}
+
void InputSelectionWidget::updateInputSource()
{
QString uniName;
@@ -208,6 +216,7 @@ void InputSelectionWidget::updateInputSource()
chName = KInputNone;
m_lowerSpin->setEnabled(false);
m_upperSpin->setEnabled(false);
+ m_monitorSpin->setEnabled(false);
m_customFbButton->setChecked(false);
m_feedbackGroup->setVisible(false);
}
@@ -215,8 +224,9 @@ void InputSelectionWidget::updateInputSource()
{
m_lowerSpin->blockSignals(true);
m_upperSpin->blockSignals(true);
+ m_monitorSpin->blockSignals(true);
- uchar min = 0, max = UCHAR_MAX;
+ uchar min = 0, max = UCHAR_MAX, mon = UCHAR_MAX;
InputPatch *ip = m_doc->inputOutputMap()->inputPatch(m_inputSource->universe());
if (ip != NULL && ip->profile() != NULL)
@@ -230,6 +240,7 @@ void InputSelectionWidget::updateInputSource()
}
m_lowerSpin->setValue((m_inputSource->lowerValue() != 0) ? m_inputSource->lowerValue() : min);
m_upperSpin->setValue((m_inputSource->upperValue() != UCHAR_MAX) ? m_inputSource->upperValue() : max);
+ m_monitorSpin->setValue((m_inputSource->monitorValue() != UCHAR_MAX) ? m_inputSource->monitorValue() : mon);
if (m_lowerSpin->value() != 0 || m_upperSpin->value() != UCHAR_MAX)
{
m_customFbButton->setChecked(true);
@@ -241,8 +252,10 @@ void InputSelectionWidget::updateInputSource()
}
m_lowerSpin->blockSignals(false);
m_upperSpin->blockSignals(false);
+ m_monitorSpin->blockSignals(false);
m_lowerSpin->setEnabled(true);
m_upperSpin->setEnabled(true);
+ m_monitorSpin->setEnabled(true);
}
m_inputUniverseEdit->setText(uniName);
diff --git a/ui/src/inputselectionwidget.h b/ui/src/inputselectionwidget.h
index 8c6384e885..ba7a8a1285 100644
--- a/ui/src/inputselectionwidget.h
+++ b/ui/src/inputselectionwidget.h
@@ -61,6 +61,7 @@ protected slots:
void slotCustomFeedbackToggled(bool checked);
void slotLowerSpinValueChanged(int value);
void slotUpperSpinValueChanged(int value);
+ void slotMonitorSpinValueChanged(int value);
signals:
void autoDetectToggled(bool checked);
diff --git a/ui/src/inputselectionwidget.ui b/ui/src/inputselectionwidget.ui
index aeeef1a9df..f4ff3a509b 100644
--- a/ui/src/inputselectionwidget.ui
+++ b/ui/src/inputselectionwidget.ui
@@ -171,21 +171,39 @@
Custom feedback
-
-
- 3
-
-
- 3
-
- -
+
+
-
+
+
+ 10
+
+
+
+ Lower
+
+
+
+ -
+
+
+ 255
+
+
+
+ -
+
+
+
+ 10
+
+
- Lower value
+ Upper
- -
+
-
0
@@ -198,21 +216,33 @@
- -
-
-
- 255
+
-
+
+
+
+ 10
+
+
+
+ Monitor
- -
-
-
- Upper value
+
-
+
+
+ 255
+ m_upperSpin
+ m_lowerSpin
+ label_2
+ label
+ m_monitorSpin
+ label_3
+ m_keyInputGroup
-
diff --git a/ui/src/virtualconsole/vcbutton.cpp b/ui/src/virtualconsole/vcbutton.cpp
index 0fa251f0a0..b7e0b472db 100644
--- a/ui/src/virtualconsole/vcbutton.cpp
+++ b/ui/src/virtualconsole/vcbutton.cpp
@@ -516,16 +516,19 @@ void VCButton::slotKeyReleased(const QKeySequence& keySequence)
void VCButton::updateFeedback()
{
- if (m_state == Monitoring)
- return;
+ //if (m_state == Monitoring)
+ // return;
QSharedPointer src = inputSource();
if (!src.isNull() && src->isValid() == true)
{
- if (m_state == Inactive)
+ if (m_state == Inactive) {
sendFeedback(src->lowerValue());
- else
+ } else if (m_state == Monitoring) {
+ sendFeedback(src->monitorValue());
+ } else {
sendFeedback(src->upperValue());
+ }
}
}
diff --git a/ui/src/virtualconsole/vcwidget.cpp b/ui/src/virtualconsole/vcwidget.cpp
index ac5457d330..a54adc549c 100644
--- a/ui/src/virtualconsole/vcwidget.cpp
+++ b/ui/src/virtualconsole/vcwidget.cpp
@@ -885,15 +885,18 @@ QSharedPointer VCWidget::getXMLInput(QXmlStreamReader &root)
quint32 uni = attrs.value(KXMLQLCVCWidgetInputUniverse).toString().toUInt();
quint32 ch = attrs.value(KXMLQLCVCWidgetInputChannel).toString().toUInt();
- uchar min = 0, max = UCHAR_MAX;
+ uchar min = 0, max = UCHAR_MAX, mon = UCHAR_MAX;
QSharedPointernewSrc = QSharedPointer(new QLCInputSource(uni, ch));
if (attrs.hasAttribute(KXMLQLCVCWidgetInputLowerValue))
min = uchar(attrs.value(KXMLQLCVCWidgetInputLowerValue).toString().toUInt());
if (attrs.hasAttribute(KXMLQLCVCWidgetInputUpperValue))
max = uchar(attrs.value(KXMLQLCVCWidgetInputUpperValue).toString().toUInt());
+ if (attrs.hasAttribute(KXMLQLCVCWidgetInputMonitorValue))
+ mon = uchar(attrs.value(KXMLQLCVCWidgetInputMonitorValue).toString().toUInt());
newSrc->setRange(min, max);
+ newSrc->setMonitor(mon);
return newSrc;
}
@@ -1041,6 +1044,9 @@ bool VCWidget::saveXMLInput(QXmlStreamWriter *doc,
doc->writeAttribute(KXMLQLCVCWidgetInputLowerValue, QString::number(src->lowerValue()));
if (src->upperValue() != UCHAR_MAX)
doc->writeAttribute(KXMLQLCVCWidgetInputUpperValue, QString::number(src->upperValue()));
+ if (src->monitorValue() != UCHAR_MAX)
+ doc->writeAttribute(KXMLQLCVCWidgetInputMonitorValue, QString::number(src->monitorValue()));
+
doc->writeEndElement();
}
diff --git a/ui/src/virtualconsole/vcwidget.h b/ui/src/virtualconsole/vcwidget.h
index d229e323ab..6b1f81a98c 100644
--- a/ui/src/virtualconsole/vcwidget.h
+++ b/ui/src/virtualconsole/vcwidget.h
@@ -59,12 +59,13 @@ class QFile;
#define KVCFrameStyleRaised (QFrame::Panel | QFrame::Raised)
#define KVCFrameStyleNone (QFrame::NoFrame)
-#define KXMLQLCVCWidgetKey QString("Key")
-#define KXMLQLCVCWidgetInput QString("Input")
-#define KXMLQLCVCWidgetInputUniverse QString("Universe")
-#define KXMLQLCVCWidgetInputChannel QString("Channel")
-#define KXMLQLCVCWidgetInputLowerValue QString("LowerValue")
-#define KXMLQLCVCWidgetInputUpperValue QString("UpperValue")
+#define KXMLQLCVCWidgetKey QString("Key")
+#define KXMLQLCVCWidgetInput QString("Input")
+#define KXMLQLCVCWidgetInputUniverse QString("Universe")
+#define KXMLQLCVCWidgetInputChannel QString("Channel")
+#define KXMLQLCVCWidgetInputLowerValue QString("LowerValue")
+#define KXMLQLCVCWidgetInputUpperValue QString("UpperValue")
+#define KXMLQLCVCWidgetInputMonitorValue QString("MonitorValue")
#define KXMLQLCWindowState QString("WindowState")
#define KXMLQLCWindowStateVisible QString("Visible")