16#include <klocalizedstring.h>
34 int width,
int height,
double resolution)
36 , m_aspectRatio(((double) width) / height)
37 , m_originalWidth(width)
38 , m_originalHeight(height)
41 , m_resolution(resolution)
51 m_page->layout()->setContentsMargins(0, 0, 0, 0);
52 m_page->setObjectName(name);
64 m_page->newWidthDouble->setDisplayUnit(
false);
65 m_page->newHeightDouble->setDisplayUnit(
false);
67 m_page->newWidthDouble->setValue(width);
68 m_page->newWidthDouble->setFocus();
69 m_page->newHeightDouble->setValue(height);
73 m_page->filterCmb->allowAuto(
true);
93 m_page->newWidthUnit->setCurrentIndex(wUnitIndex);
94 m_page->newHeightUnit->setCurrentIndex(hUnitIndex);
116 m_page->filterCmb->setAutoHint(filterStrategy->
name());
146 KoID filterID =
m_page->filterCmb->currentItem();
170 m_page->newHeightDouble->blockSignals(
true);
172 m_page->newHeightDouble->blockSignals(
false);
187 m_page->newWidthDouble->blockSignals(
true);
189 m_page->newWidthDouble->blockSignals(
false);
197 m_page->aspectRatioBtn->blockSignals(
true);
198 m_page->constrainProportionsCkb->blockSignals(
true);
200 m_page->aspectRatioBtn->setKeepAspectRatio(keep);
201 m_page->constrainProportionsCkb->setChecked(keep);
203 m_page->aspectRatioBtn->blockSignals(
false);
204 m_page->constrainProportionsCkb->blockSignals(
false);
220 m_page->newWidthDouble->blockSignals(
true);
222 m_page->newWidthDouble->changeValue(resValue);
223 m_page->newWidthDouble->blockSignals(
false);
228 m_page->newHeightDouble->blockSignals(
true);
230 m_page->newHeightDouble->changeValue(resValue);
231 m_page->newHeightDouble->blockSignals(
false);
float value(const T *src, size_t ch)
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
void updateHeightUIValue(double value)
KisDocumentAwareSpinBoxUnitManager * _widthUnitManager
static const QString PARAM_WIDTH_UNIT
static const QString PARAM_HEIGHT_UNIT
void slotWidthChanged(double w)
void slotHeightChanged(double h)
static const QString PARAM_PREFIX
const double m_resolution
KisDocumentAwareSpinBoxUnitManager * _heightUnitManager
KisFilterStrategy * filterType()
const int m_originalHeight
const int m_originalWidth
void updateWidthUIValue(double value)
void sigDesiredSizeChanged(qint32 width, qint32 height, double resolution)
const double m_aspectRatio
DlgLayerSize(QWidget *parent, const char *name, int width, int height, double resolution)
void slotAspectChanged(bool keep)
static const QString PARAM_KEEP_PROP
static const QString PARAM_KEEP_AR
static const KoID AutoOptionID
void writeEntry(const QString &name, const T &value)
T readEntry(const QString &name, const T &defaultValue=T())
The KisDocumentAwareSpinBoxUnitManager class is a KisSpinBoxUnitManager that is able to connect to th...
qreal getConversionFactor(int dim, QString psymbol) const override
static KisFilterStrategyRegistry * instance()
KisFilterStrategy * autoFilterStrategy(QSize originalSize, QSize desiredSize) const
void setApparentUnitFromSymbol(QString pSymbol)
QString getApparentUnitSymbol() const
virtual QStringList getsUnitSymbolList(bool withName=false) const
A dialog base class with standard buttons and predefined layouts.
void setMainWidget(QWidget *widget)
virtual void setCaption(const QString &caption)
void setButtons(ButtonCodes buttonMask)
void setDefaultButton(ButtonCode id)
@ Ok
Show Ok button. (this button accept()s the dialog; result set to QDialog::Accepted)
@ Cancel
Show Cancel-button. (this button reject()s the dialog; result set to QDialog::Rejected)
const T value(const QString &id) const
static KisFilterStrategy * lastUsedFilter