11#include <klocalizedstring.h>
13#include <kpluginfactory.h>
63 if (!
viewManager()->blockUntilOperationsFinished(image))
return;
66 Q_CHECK_PTR(dlgImageSize);
67 dlgImageSize->setObjectName(
"ImageSize");
69 if (dlgImageSize->exec() == QDialog::Accepted) {
83 if(!
viewManager()->blockUntilOperationsFinished(image))
return;
86 Q_CHECK_PTR(dlgCanvasSize);
88 if (dlgCanvasSize->exec() == QDialog::Accepted) {
89 qint32 width = dlgCanvasSize->
width();
90 qint32 height = dlgCanvasSize->
height();
91 qint32 xOffset = dlgCanvasSize->
xOffset();
92 qint32 yOffset = dlgCanvasSize->
yOffset();
94 viewManager()->imageManager()->resizeCurrentImage(width, height, xOffset, yOffset);
108 if(!
viewManager()->blockUntilOperationsFinished(image))
return;
125 Q_CHECK_PTR(dlgLayerSize);
126 dlgLayerSize->
setCaption(i18np(
"Resize Layer",
"Resize %1 Layers", nodes.size()));
128 if (dlgLayerSize->exec() == QDialog::Accepted) {
133 qreal(desiredSize.width()) /
bounds.width(),
134 qreal(desiredSize.height()) /
bounds.height(),
159 if(!
viewManager()->blockUntilOperationsFinished(image))
return;
166 if (!selectionMask) {
176 if (dlgSize->exec() == QDialog::Accepted) {
182 qreal(w) / rc.width(),
183 qreal(h) / rc.height(),
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
KisFilterStrategy * filterType()
double desiredResolution()
KisFilterStrategy * filterType()
ImageSize(QObject *parent)
void slotSelectionScale()
void scaleLayersImpl(KisNodeList nodes)
void slotScaleAllLayers()
void scaleLayerImpl(KisNodeSP rootNode)
QPointer< KisViewManager > viewManager() const
KisAction * createAction(const QString &name)
void scaleNode(KisNodeSP node, const QPointF ¢er, qreal scaleX, qreal scaleY, KisFilterStrategy *filterStrategy, KisSelectionSP selection)
start asynchronous operation on scaling a subtree of nodes starting at node
KisGroupLayerSP rootLayer() const
QRect exactBounds() const
virtual void setCaption(const QString &caption)
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
#define KIS_ASSERT_RECOVER_RETURN(cond)
virtual KisPaintDeviceSP projection() const =0
virtual KisSelectionMaskSP selectionMask() const
QRect selectedExactRect() const
Slow, but exact way of determining the rectangle that encloses the selection.