Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_custom_image_widget.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2005 Thomas Zander <zander@kde.org>
3 * SPDX-FileCopyrightText: 2005 C. Boemann <cbo@boemann.dk>
4 *
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 */
7#ifndef KIS_CUSTOM_IMAGE_WIDGET_H
8#define KIS_CUSTOM_IMAGE_WIDGET_H
9
10#include "kis_global.h"
11#include "KoUnit.h"
13#include "KisOpenPane.h"
14
15#include <ui_wdgnewimage.h>
16
17class KisDocument;
18class KisDocument;
19
21
22class WdgNewImage : public QWidget, public Ui::WdgNewImage
23{
24 Q_OBJECT
25
26public:
27 WdgNewImage(QWidget *parent)
28 : QWidget(parent)
29 {
30 setupUi(this);
31 }
32};
33
40{
41 Q_OBJECT
42public:
49 KisCustomImageWidget(QWidget *parent, const QString & imageName, const QLatin1String &dialogType);
50 ~KisCustomImageWidget() override;
51
52private Q_SLOTS:
53 void widthUnitChanged(int index);
54 void widthChanged(double value);
55 void heightUnitChanged(int index);
56 void heightChanged(double value);
57 void resolutionChanged(double value);
58 void predefinedClicked(int index);
59 void saveAsPredefined();
60 void setLandscape();
61 void setPortrait();
62 void switchWidthHeight();
63 virtual void createImage();
67
68protected:
69
71
73 void setNumberOfLayers(int layers);
74 virtual bool shouldSaveImageDimensions() const;
75
76 void showEvent(QShowEvent *) override;
77
79private:
80
82 quint8 backgroundOpacity() const;
83 void setBackgroundOpacity(quint8 value);
84
85 void fillPredefined();
86
87
90 QLatin1String m_dialogType;
91};
92
93#endif
float value(const T *src, size_t ch)
void resolutionChanged(double value)
QList< KisPropertiesConfigurationSP > m_predefined
void showEvent(QShowEvent *) override
KisCustomImageWidget(QWidget *parent, const QString &imageName, const QLatin1String &dialogType)
void setNumberOfLayers(int layers)
Set the number of layers that will be created.
void setBackgroundOpacity(quint8 value)
virtual bool shouldSaveImageDimensions() const
WdgNewImage(QWidget *parent)