bool VCSlider::copyFrom(VCWidget* widget) { VCSlider* slider = qobject_cast<VCSlider*> (widget); if (slider == NULL) return false; /* Copy level stuff */ setLevelLowLimit(slider->levelLowLimit()); setLevelHighLimit(slider->levelHighLimit()); m_levelChannels = slider->m_levelChannels; /* Copy bus stuff */ setBusLowLimit(slider->busLowLimit()); setBusHighLimit(slider->busHighLimit()); setBus(slider->bus()); /* Copy slider appearance */ setValueDisplayStyle(slider->valueDisplayStyle()); setInvertedAppearance(slider->invertedAppearance()); /* Copy mode & current value */ setSliderMode(slider->sliderMode()); m_slider->setValue(slider->sliderValue()); /* Copy common stuff */ return VCWidget::copyFrom(widget); }
bool VCSlider::copyFrom(VCWidget* widget) { VCSlider* slider = qobject_cast<VCSlider*> (widget); if (slider == NULL) return false; /* Copy widget style */ setWidgetStyle(slider->widgetStyle()); /* Copy level stuff */ setLevelLowLimit(slider->levelLowLimit()); setLevelHighLimit(slider->levelHighLimit()); m_levelChannels = slider->m_levelChannels; /* Copy playback stuff */ m_playbackFunction = slider->m_playbackFunction; /* Copy slider appearance */ setValueDisplayStyle(slider->valueDisplayStyle()); setInvertedAppearance(slider->invertedAppearance()); /* Copy Click & Go feature */ setClickAndGoType(slider->clickAndGoType()); /* Copy mode & current value */ setSliderMode(slider->sliderMode()); if (m_slider) m_slider->setValue(slider->sliderValue()); else if (m_knob) m_knob->setValue(slider->sliderValue()); /* Copy common stuff */ return VCWidget::copyFrom(widget); }