Krita Source Code Documentation
Loading...
Searching...
No Matches
dlg_layersize.h
Go to the documentation of this file.
1/*
2 * dlg_layersize.h -- part of Krita
3 *
4 * SPDX-FileCopyrightText: 2004 Boudewijn Rempt <boud@valdyas.org>
5 * SPDX-FileCopyrightText: 2005 Sven Langkamp <sven.langkamp@gmail.com>
6 * SPDX-FileCopyrightText: 2013 Juan Palacios <jpalaciosdev@gmail.com>
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10#ifndef DLG_LAYERSIZE
11#define DLG_LAYERSIZE
12
13#include <KoDialog.h>
14
15#include "ui_wdg_layersize.h"
16
18
19class WdgLayerSize : public QWidget, public Ui::WdgLayerSize
20{
21 Q_OBJECT
22
23public:
24 WdgLayerSize(QWidget *parent) : QWidget(parent) {
25 setupUi(this);
26 }
27};
28
30
32{
33
34 Q_OBJECT
35
36public:
37
38 static const QString PARAM_PREFIX;
39 static const QString PARAM_WIDTH_UNIT;
40 static const QString PARAM_HEIGHT_UNIT;
41 static const QString PARAM_KEEP_AR;
42 static const QString PARAM_KEEP_PROP;
43
44 DlgLayerSize(QWidget * parent, const char* name,
45 int width, int height, double resolution);
46 ~DlgLayerSize() override;
47
48 qint32 desiredWidth();
49 qint32 desiredHeight();
50
52
53Q_SIGNALS:
54 void sigDesiredSizeChanged(qint32 width, qint32 height, double resolution);
55
56private Q_SLOTS:
57 void slotWidthChanged(double w);
58 void slotHeightChanged(double h);
59 void slotAspectChanged(bool keep);
60
61private:
62 void updateWidthUIValue(double value);
63 void updateHeightUIValue(double value);
64
66 const double m_aspectRatio;
69 const double m_resolution;
71
74};
75
76#endif // DLG_IMAGESIZE
float value(const T *src, size_t ch)
void updateHeightUIValue(double value)
KisDocumentAwareSpinBoxUnitManager * _widthUnitManager
qint32 desiredHeight()
static const QString PARAM_WIDTH_UNIT
static const QString PARAM_HEIGHT_UNIT
void slotWidthChanged(double w)
void slotHeightChanged(double h)
~DlgLayerSize() override
static const QString PARAM_PREFIX
const double m_resolution
KisDocumentAwareSpinBoxUnitManager * _heightUnitManager
KisFilterStrategy * filterType()
qint32 desiredWidth()
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
WdgLayerSize * m_page
static const QString PARAM_KEEP_AR
The KisDocumentAwareSpinBoxUnitManager class is a KisSpinBoxUnitManager that is able to connect to th...
A dialog base class with standard buttons and predefined layouts.
Definition KoDialog.h:116
WdgLayerSize(QWidget *parent)