19 QVBoxLayout* l =
new QVBoxLayout(
this);
21 l->setContentsMargins(0, 0, 0, 0);
22 setSizePolicy(QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed));
49 while (config.size() >
m_sliders.size()) {
56 while (config.size() <
m_sliders.size()) {
61 for (
int i=0; i < config.size(); i++) {
62 m_sliders[i]->setGradient(config[i].gradient, config[i].offset);
63 m_sliders[i]->setDisplayMode(config[i].patchCount < 0, config[i].patchCount);
80 slider->slotSetChannelValues(
m_model->channelValues());
92 m_model.data(), SLOT(slotSetChannelValues(QVector4D)));
99 slider->slotSetChannelValues(values);
115 const WGShadeSlider* activeLine = qobject_cast<WGShadeSlider*>(sender());
117 if (slider != activeLine) {
118 slider->resetHandle();
133 slider->slotSetChannelValues(
m_model->channelValues());
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void slotSliderValuesChanged(const QVector4D &values)
WGShadeSelector(WGSelectorDisplayConfigSP displayConfig, KisVisualColorModelSP colorModel, QWidget *parent=nullptr)
bool m_resetOnInteractions
void slotSliderInteraction(bool active)
void slotChannelValuesChanged(const QVector4D &values)
bool m_resetOnExternalUpdate
KisVisualColorModelSP m_model
void setModel(KisVisualColorModelSP colorModel) override
void mousePressEvent(QMouseEvent *event) override
void updateSettings() override
QVector< WGShadeSlider * > m_sliders
QVector4D channelValues() const
const NumericSetting< int > shadeSelectorLineHeight
const GenericSetting< bool > shadeSelectorUpdateOnExternalChanges
const GenericSetting< bool > shadeSelectorUpdateOnInteractionEnd
const GenericSetting< bool > shadeSelectorUpdateOnRightClick