156 self.setWindowTitle(i18n(
"Mutator"))
161 body.setLayout(QVBoxLayout())
162 body.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred))
165 mutationSettings = QWidget()
166 body.layout().addWidget(mutationSettings)
167 mutationSettings.setLayout(QVBoxLayout())
169 sizeMutSlider = SliderSpinBox().widget()
170 sizeMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush size."))
171 sizeMutSlider.setRange(0,100)
172 sizeMutSlider.setPrefix(i18n(
"Size Mutation: "))
173 sizeMutSlider.setSuffix(
"%")
175 sizeMutSlider.setValue(int(nSizeMut * 100))
176 mutationSettings.layout().addWidget(sizeMutSlider)
178 rotationMutSlider = SliderSpinBox().widget()
179 rotationMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush rotation."))
180 rotationMutSlider.setRange(0, 100)
181 rotationMutSlider.setPrefix(i18n(
"Rotation Mutation: "))
182 rotationMutSlider.setSuffix(
"%")
184 rotationMutSlider.setValue(int(nRotationMut * 100))
185 mutationSettings.layout().addWidget(rotationMutSlider)
187 opacityMutSlider = SliderSpinBox().widget()
188 opacityMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush opacity."))
189 opacityMutSlider.setRange(0, 100)
190 opacityMutSlider.setPrefix(i18n(
"Opacity Mutation: "))
191 opacityMutSlider.setSuffix(
"%")
193 opacityMutSlider.setValue(int(nOpacityMut * 100))
194 mutationSettings.layout().addWidget(opacityMutSlider)
196 flowMutSlider = SliderSpinBox().widget()
197 flowMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush flow."))
198 flowMutSlider.setRange(0, 100)
199 flowMutSlider.setPrefix(i18n(
"Flow Mutation: "))
200 flowMutSlider.setSuffix(
"%")
202 flowMutSlider.setValue(int(nFlowMut * 100))
203 mutationSettings.layout().addWidget(flowMutSlider)
205 hueMutSlider = SliderSpinBox().widget()
206 hueMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color hue."))
207 hueMutSlider.setRange(0, 100)
208 hueMutSlider.setPrefix(i18n(
"Hue Mutation: "))
209 hueMutSlider.setSuffix(
"%")
211 hueMutSlider.setValue(int(nHueMut * 100))
212 mutationSettings.layout().addWidget(hueMutSlider)
214 saturationMutSlider = SliderSpinBox().widget()
215 saturationMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color saturation."))
216 saturationMutSlider.setRange(0, 100)
217 saturationMutSlider.setPrefix(i18n(
"Saturation Mutation: "))
218 saturationMutSlider.setSuffix(
"%")
220 saturationMutSlider.setValue(int(nSaturationMut * 100))
221 mutationSettings.layout().addWidget(saturationMutSlider)
223 valueMutSlider = SliderSpinBox().widget()
224 valueMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color value."))
225 valueMutSlider.setRange(0, 100)
226 valueMutSlider.setPrefix(i18n(
"Value Mutation: "))
227 valueMutSlider.setSuffix(
"%")
229 valueMutSlider.setValue(int(nValueMut * 100))
230 mutationSettings.layout().addWidget(valueMutSlider)
233 body.layout().addStretch()
236 mutateButton = QPushButton(i18n(
"Mutate"))
237 mutateButton.setToolTip(i18n(
"Invokes the \"Mutate\" action, which randomly mutates various global brush and color settings based on the mutation settings configured above."))
239 body.layout().addWidget(mutateButton)