33 m_transaction(transaction),
34 m_notificationsBlocked(0),
36 m_configChanged(false)
40 KConfigGroup group = KSharedConfig::openConfig()->group(
"KisToolTransform");
41 bool useInStackPreview = !group.readEntry(
"useOverlayPreviewStyle",
false);
42 bool forceLodMode = group.readEntry(
"forceLodMode",
true);
44 if (useInStackPreview && !forceLodMode) {
45 cmbPreviewMode->setCurrentIndex(0);
47 else if (useInStackPreview && forceLodMode) {
48 cmbPreviewMode->setCurrentIndex(1);
51 cmbPreviewMode->setCurrentIndex(2);
63 changeGranularity->addItems(granularityValues);
64 changeGranularity->setCurrentIndex(1);
65 granularityPreview->addItems(granularityValues);
66 granularityPreview->setCurrentIndex(2);
68 connect(changeGranularity,SIGNAL(currentTextChanged(QString)),
70 connect(granularityPreview, SIGNAL(currentTextChanged(QString)),
75 cmbFilter->setCurrent(
"Bicubic");
76 cmbFilter->setToolTip(i18nc(
"@info:tooltip",
77 "<p>Select filtering mode:\n"
79 "<li><b>Nearest neighbor</b> for pixel art. Does not produce new color.</li>"
80 "<li><b>Bilinear</b> for areas with uniform color to avoid artifacts.</li>"
81 "<li><b>Bicubic</b> for smoother results.</li>"
82 "<li><b>Lanczos3</b> for sharp results. May produce aerials.</li>"
117 QToolButton *nothingSelected =
new QToolButton(0);
118 nothingSelected->setCheckable(
true);
119 nothingSelected->setAutoExclusive(
true);
120 nothingSelected->hide();
125 shearXBox->setSuffix(QStringLiteral(
"%"));
126 shearYBox->setSuffix(QStringLiteral(
"%"));
127 shearXBox->setRange(-500, 500, 2);
128 shearYBox->setRange(-500, 500, 2);
129 shearXBox->setSingleStep(1);
130 shearYBox->setSingleStep(1);
131 shearXBox->setValue(0.0);
132 shearYBox->setValue(0.0);
135 translateXBox->setSuffix(i18n(
" px"));
136 translateYBox->setSuffix(i18n(
" px"));
137 translateXBox->setRange(-10000, 10000);
138 translateYBox->setRange(-10000, 10000);
141 scaleXBox->setRange(-10000, 10000);
142 scaleYBox->setRange(-10000, 10000);
143 scaleXBox->setValue(100.0);
144 scaleYBox->setValue(100.0);
158 cameraHeightBox->setRange(1, 20000, 2);
187 rotationGroup->hide();
195 alphaBox->setSingleStep(0.1);
196 alphaBox->setRange(0, 10, 1);
207 cageTransformButtonGroup->setId(cageAddEditRadio, 0);
208 cageTransformButtonGroup->setId(cageDeformRadio, 1);
214 liquifySizeSlider->setExponentRatio(3);
215 liquifySizeSlider->setValue(60.0);
218 liquifySizeSlider->setToolTip(i18nc(
"@info:tooltip",
"Size of the deformation brush"));
220 liquifyAmountSlider->setRange(0.0, 1.0, 2);
221 liquifyAmountSlider->setSingleStep(0.01);
222 liquifyAmountSlider->setValue(0.05);
225 liquifyAmountSlider->setToolTip(i18nc(
"@info:tooltip",
"Amount of the deformation you get"));
227 liquifyFlowSlider->setRange(0.0, 1.0, 2);
228 liquifyFlowSlider->setSingleStep(0.01);
229 liquifyFlowSlider->setValue(1.0);
232 liquifyFlowSlider->setToolTip(i18nc(
"@info:tooltip",
"When in non-buildup mode, shows how fast the deformation limit is reached."));
234 buildupModeComboBox->setCurrentIndex(0);
237 buildupModeComboBox->setToolTip(
"<p>" + i18nc(
"@info:tooltip",
"Switch between Build Up and Wash mode of painting. Build Up mode adds deformations one on top of the other without any limits. Wash mode gradually deforms the piece to the selected deformation level.") +
"</p>");
239 liquifySpacingSlider->setRange(0.0, 3.0, 2);
240 liquifySpacingSlider->setExponentRatio(3);
241 liquifySpacingSlider->setSingleStep(0.01);
242 liquifySpacingSlider->setValue(0.2);
245 liquifySpacingSlider->setToolTip(i18nc(
"@info:tooltip",
"Space between two sequential applications of the deformation"));
247 liquifySizePressureBox->setChecked(
true);
250 liquifySizePressureBox->setToolTip(i18nc(
"@info:tooltip",
"Scale <b>Size</b> value according to current stylus pressure"));
252 liquifyAmountPressureBox->setChecked(
true);
255 liquifyAmountPressureBox->setToolTip(i18nc(
"@info:tooltip",
"Scale <b>Amount</b> value according to current stylus pressure"));
257 liquifyReverseDirectionChk->setChecked(
false);
260 liquifyReverseDirectionChk->setToolTip(i18nc(
"@info:tooltip",
"Reverse direction of the current deformation tool"));
263 connect(liquifyMove, SIGNAL(toggled(
bool)), liquifyModeMapper, SLOT(map()));
264 connect(liquifyScale, SIGNAL(toggled(
bool)), liquifyModeMapper, SLOT(map()));
265 connect(liquifyRotate, SIGNAL(toggled(
bool)), liquifyModeMapper, SLOT(map()));
266 connect(liquifyOffset, SIGNAL(toggled(
bool)), liquifyModeMapper, SLOT(map()));
267 connect(liquifyUndo, SIGNAL(toggled(
bool)), liquifyModeMapper, SLOT(map()));
276 liquifyMove->setToolTip(i18nc(
"@info:tooltip",
"Move: drag the image along the brush stroke"));
277 liquifyScale->setToolTip(i18nc(
"@info:tooltip",
"Scale: grow/shrink image under cursor"));
278 liquifyRotate->setToolTip(i18nc(
"@info:tooltip",
"Rotate: twirl image under cursor"));
279 liquifyOffset->setToolTip(i18nc(
"@info:tooltip",
"Offset: shift the image to the right of the stroke direction"));
280 liquifyUndo->setToolTip(i18nc(
"@info:tooltip",
"Undo: erase actions of other tools"));
310 intNumRows->setRange(1, 999);
311 intNumColumns->setRange(1, 999);
330 tooBigLabelWidget->hide();
335 KGuiItem::assign(buttonBox->button(QDialogButtonBox::Apply), KStandardGuiItem::apply());
336 KGuiItem::assign(buttonBox->button(QDialogButtonBox::Reset), KStandardGuiItem::reset());