157 self.setWindowTitle(i18n(
"Mutator"))
162 body.setLayout(QVBoxLayout())
163 body.setSizePolicy(QSizePolicy(QSizePolicy.Policy.Preferred, QSizePolicy.Policy.Preferred))
166 mutationSettings = QWidget()
167 body.layout().addWidget(mutationSettings)
168 mutationSettings.setLayout(QVBoxLayout())
170 sizeMutSlider = SliderSpinBox().widget()
171 sizeMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush size."))
172 sizeMutSlider.setRange(0,100)
173 sizeMutSlider.setPrefix(i18n(
"Size Mutation: "))
174 sizeMutSlider.setSuffix(
"%")
176 sizeMutSlider.setValue(int(nSizeMut * 100))
177 mutationSettings.layout().addWidget(sizeMutSlider)
179 rotationMutSlider = SliderSpinBox().widget()
180 rotationMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush rotation."))
181 rotationMutSlider.setRange(0, 100)
182 rotationMutSlider.setPrefix(i18n(
"Rotation Mutation: "))
183 rotationMutSlider.setSuffix(
"%")
185 rotationMutSlider.setValue(int(nRotationMut * 100))
186 mutationSettings.layout().addWidget(rotationMutSlider)
188 opacityMutSlider = SliderSpinBox().widget()
189 opacityMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush opacity."))
190 opacityMutSlider.setRange(0, 100)
191 opacityMutSlider.setPrefix(i18n(
"Opacity Mutation: "))
192 opacityMutSlider.setSuffix(
"%")
194 opacityMutSlider.setValue(int(nOpacityMut * 100))
195 mutationSettings.layout().addWidget(opacityMutSlider)
197 flowMutSlider = SliderSpinBox().widget()
198 flowMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global brush flow."))
199 flowMutSlider.setRange(0, 100)
200 flowMutSlider.setPrefix(i18n(
"Flow Mutation: "))
201 flowMutSlider.setSuffix(
"%")
203 flowMutSlider.setValue(int(nFlowMut * 100))
204 mutationSettings.layout().addWidget(flowMutSlider)
206 hueMutSlider = SliderSpinBox().widget()
207 hueMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color hue."))
208 hueMutSlider.setRange(0, 100)
209 hueMutSlider.setPrefix(i18n(
"Hue Mutation: "))
210 hueMutSlider.setSuffix(
"%")
212 hueMutSlider.setValue(int(nHueMut * 100))
213 mutationSettings.layout().addWidget(hueMutSlider)
215 saturationMutSlider = SliderSpinBox().widget()
216 saturationMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color saturation."))
217 saturationMutSlider.setRange(0, 100)
218 saturationMutSlider.setPrefix(i18n(
"Saturation Mutation: "))
219 saturationMutSlider.setSuffix(
"%")
221 saturationMutSlider.setValue(int(nSaturationMut * 100))
222 mutationSettings.layout().addWidget(saturationMutSlider)
224 valueMutSlider = SliderSpinBox().widget()
225 valueMutSlider.setToolTip(i18n(
"Controls the degree to which mutation affects Krita's global foreground color value."))
226 valueMutSlider.setRange(0, 100)
227 valueMutSlider.setPrefix(i18n(
"Value Mutation: "))
228 valueMutSlider.setSuffix(
"%")
230 valueMutSlider.setValue(int(nValueMut * 100))
231 mutationSettings.layout().addWidget(valueMutSlider)
234 body.layout().addStretch()
237 mutateButton = QPushButton(i18n(
"Mutate"))
238 mutateButton.setToolTip(i18n(
"Invokes the \"Mutate\" action, which randomly mutates various global brush and color settings based on the mutation settings configured above."))
240 body.layout().addWidget(mutateButton)