@@ -94,6 +94,19 @@ QWidget *ControlFrame::controlInteraction(QWidget *parent)
SliderLayout *fSliderLayout = new SliderLayout(floatSlider_, this);
return fSliderLayout;
}
+ case ControlTypeInteger32: {
+ intSlider_ = new Slider(this);
+ intSlider_->setRange(controlInfo_.min().get<int32_t>(),
+ controlInfo_.max().get<int32_t>());
+ intSlider_->setValue(controlInfo_.def().get<int32_t>());
+ intSlider_->setOrientation(Qt::Orientation::Horizontal);
+
+ connect(intSlider_, &Slider::valueChanged,
+ this, &ControlFrame::notifyControlChange);
+
+ SliderLayout *iSliderLayout = new SliderLayout(intSlider_, this);
+ return iSliderLayout;
+ }
default:
return (new QLabel("Currently Unavailable"));
}
@@ -163,6 +176,9 @@ void ControlFrame::notifyControlChange()
case ControlTypeFloat:
controlValue.set<float>(floatSlider_->value());
break;
+ case ControlTypeInteger32:
+ controlValue.set<int32_t>(intSlider_->value());
+ break;
default:
/* Nothing to emit so return */
return;
@@ -47,6 +47,7 @@ private:
QCheckBox *controlCheckBox_;
QLabel *currentValue_;
FloatSlider *floatSlider_;
+ Slider *intSlider_;
/* Helper Hunctions */
QString getDefaultValueQStr();
Add an integer slider for ControlTypeIntger32 control types. The default value on the slider is the default value for the control and it may not be the current value for the control. Signed-off-by: Utkarsh Tiwari <utkarsh02t@gmail.com> --- src/qcam/settings/control_frame.cpp | 16 ++++++++++++++++ src/qcam/settings/control_frame.h | 1 + 2 files changed, 17 insertions(+)