Changeset View
Changeset View
Standalone View
Standalone View
plugins/paintops/libpaintop/kis_texture_option.cpp
Context not available. | |||||
67 | connect(m_textureOptions->randomOffsetY, SIGNAL(toggled(bool)), SLOT(emitSettingChanged())); | 67 | connect(m_textureOptions->randomOffsetY, SIGNAL(toggled(bool)), SLOT(emitSettingChanged())); | ||
---|---|---|---|---|---|
68 | connect(m_textureOptions->offsetSliderY, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged())); | 68 | connect(m_textureOptions->offsetSliderY, SIGNAL(valueChanged(int)), SLOT(emitSettingChanged())); | ||
69 | connect(m_textureOptions->cmbTexturingMode, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged())); | 69 | connect(m_textureOptions->cmbTexturingMode, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged())); | ||
70 | connect(m_textureOptions->cmbCutoffPolicy, SIGNAL(currentIndexChanged(int)), SLOT(emitSettingChanged())); | | |||
71 | connect(m_textureOptions->cutoffSlider, SIGNAL(sigModifiedBlack(int)), SLOT(emitSettingChanged())); | 70 | connect(m_textureOptions->cutoffSlider, SIGNAL(sigModifiedBlack(int)), SLOT(emitSettingChanged())); | ||
72 | connect(m_textureOptions->cutoffSlider, SIGNAL(sigModifiedWhite(int)), SLOT(emitSettingChanged())); | 71 | connect(m_textureOptions->cutoffSlider, SIGNAL(sigModifiedWhite(int)), SLOT(emitSettingChanged())); | ||
73 | connect(m_textureOptions->chkInvert, SIGNAL(toggled(bool)), SLOT(emitSettingChanged())); | 72 | connect(m_textureOptions->chkInvert, SIGNAL(toggled(bool)), SLOT(emitSettingChanged())); | ||
74 | resetGUI(m_textureOptions->textureSelectorWidget->currentResource()); | | |||
75 | 73 | | |||
74 | connect(m_textureOptions->cmbCutoffPolicy, SIGNAL(currentIndexChanged(int)), SLOT(setCutoffPolicy(int))); | ||||
75 | | ||||
76 | resetGUI(m_textureOptions->textureSelectorWidget->currentResource()); | ||||
76 | } | 77 | } | ||
77 | 78 | | |||
78 | KisTextureOption::~KisTextureOption() | 79 | KisTextureOption::~KisTextureOption() | ||
Context not available. | |||||
173 | m_textureOptions->cutoffSlider->slotModifyWhite(setting->getInt("Texture/Pattern/CutoffRight", 255)); | 174 | m_textureOptions->cutoffSlider->slotModifyWhite(setting->getInt("Texture/Pattern/CutoffRight", 255)); | ||
174 | m_textureOptions->chkInvert->setChecked(setting->getBool("Texture/Pattern/Invert")); | 175 | m_textureOptions->chkInvert->setChecked(setting->getBool("Texture/Pattern/Invert")); | ||
175 | 176 | | |||
177 | setCutoffPolicy(setting->getInt("Texture/Pattern/CutoffPolicy")); | ||||
178 | | ||||
179 | | ||||
176 | } | 180 | } | ||
177 | 181 | | |||
178 | void KisTextureOption::lodLimitations(KisPaintopLodLimitations *l) const | 182 | void KisTextureOption::lodLimitations(KisPaintopLodLimitations *l) const | ||
Context not available. | |||||
190 | m_textureOptions->offsetSliderY->setRange(0, pattern->pattern().height() / 2); | 194 | m_textureOptions->offsetSliderY->setRange(0, pattern->pattern().height() / 2); | ||
191 | } | 195 | } | ||
192 | 196 | | |||
197 | void KisTextureOption::setCutoffPolicy(int index) | ||||
198 | { | ||||
199 | qDebug() << "changing cutoff slider"; | ||||
200 | if (index == 0) { | ||||
201 | m_textureOptions->cutoffSlider->setVisible(false); | ||||
202 | } else { | ||||
203 | m_textureOptions->cutoffSlider->setVisible(true); | ||||
204 | } | ||||
205 | | ||||
206 | emitSettingChanged(); | ||||
207 | } | ||||
208 | | ||||
193 | /**********************************************************************/ | 209 | /**********************************************************************/ | ||
194 | /* KisTextureProperties */ | 210 | /* KisTextureProperties */ | ||
195 | /**********************************************************************/ | 211 | /**********************************************************************/ | ||
Context not available. |