@@ -42,6 +42,7 @@ InputSelectionWidget::InputSelectionWidget(Doc *doc, QWidget *parent)
42
42
m_feedbackGroup->setVisible (false );
43
43
m_lowerSpin->setEnabled (false );
44
44
m_upperSpin->setEnabled (false );
45
+ m_monitorSpin->setEnabled (false );
45
46
46
47
connect (m_attachKey, SIGNAL (clicked ()), this , SLOT (slotAttachKey ()));
47
48
connect (m_detachKey, SIGNAL (clicked ()), this , SLOT (slotDetachKey ()));
@@ -57,6 +58,8 @@ InputSelectionWidget::InputSelectionWidget(Doc *doc, QWidget *parent)
57
58
this , SLOT (slotLowerSpinValueChanged (int )));
58
59
connect (m_upperSpin, SIGNAL (valueChanged (int )),
59
60
this , SLOT (slotUpperSpinValueChanged (int )));
61
+ connect (m_monitorSpin, SIGNAL (valueChanged (int )),
62
+ this , SLOT (slotMonitorSpinValueChanged (int )));
60
63
}
61
64
62
65
InputSelectionWidget::~InputSelectionWidget ()
@@ -197,6 +200,11 @@ void InputSelectionWidget::slotUpperSpinValueChanged(int value)
197
200
m_inputSource->setRange (uchar (m_lowerSpin->value ()), uchar (value));
198
201
}
199
202
203
+ void InputSelectionWidget::slotMonitorSpinValueChanged (int value)
204
+ {
205
+ m_inputSource->setMonitor (uchar (value));
206
+ }
207
+
200
208
void InputSelectionWidget::updateInputSource ()
201
209
{
202
210
QString uniName;
@@ -208,15 +216,17 @@ void InputSelectionWidget::updateInputSource()
208
216
chName = KInputNone;
209
217
m_lowerSpin->setEnabled (false );
210
218
m_upperSpin->setEnabled (false );
219
+ m_monitorSpin->setEnabled (false );
211
220
m_customFbButton->setChecked (false );
212
221
m_feedbackGroup->setVisible (false );
213
222
}
214
223
else
215
224
{
216
225
m_lowerSpin->blockSignals (true );
217
226
m_upperSpin->blockSignals (true );
227
+ m_monitorSpin->blockSignals (true );
218
228
219
- uchar min = 0 , max = UCHAR_MAX;
229
+ uchar min = 0 , max = UCHAR_MAX, mon = UCHAR_MAX ;
220
230
221
231
InputPatch *ip = m_doc->inputOutputMap ()->inputPatch (m_inputSource->universe ());
222
232
if (ip != NULL && ip->profile () != NULL )
@@ -230,6 +240,7 @@ void InputSelectionWidget::updateInputSource()
230
240
}
231
241
m_lowerSpin->setValue ((m_inputSource->lowerValue () != 0 ) ? m_inputSource->lowerValue () : min);
232
242
m_upperSpin->setValue ((m_inputSource->upperValue () != UCHAR_MAX) ? m_inputSource->upperValue () : max);
243
+ m_monitorSpin->setValue ((m_inputSource->monitorValue () != UCHAR_MAX) ? m_inputSource->monitorValue () : mon);
233
244
if (m_lowerSpin->value () != 0 || m_upperSpin->value () != UCHAR_MAX)
234
245
{
235
246
m_customFbButton->setChecked (true );
@@ -241,8 +252,10 @@ void InputSelectionWidget::updateInputSource()
241
252
}
242
253
m_lowerSpin->blockSignals (false );
243
254
m_upperSpin->blockSignals (false );
255
+ m_monitorSpin->blockSignals (false );
244
256
m_lowerSpin->setEnabled (true );
245
257
m_upperSpin->setEnabled (true );
258
+ m_monitorSpin->setEnabled (true );
246
259
}
247
260
248
261
m_inputUniverseEdit->setText (uniName);
0 commit comments