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:
54 KisCustomImageWidget(QWidget *parent, qint32 defWidth, qint32 defHeight, double resolution, const QString & defColorModel, const QString & defColorDepth, const QString & defColorProfile, const QString & imageName);
55 ~KisCustomImageWidget() override;
56
57private Q_SLOTS:
58 void widthUnitChanged(int index);
59 void widthChanged(double value);
60 void heightUnitChanged(int index);
61 void heightChanged(double value);
62 void resolutionChanged(double value);
63 void predefinedClicked(int index);
64 void saveAsPredefined();
65 void setLandscape();
66 void setPortrait();
67 void switchWidthHeight();
68 void createImage();
72
73protected:
74
76
78 void setNumberOfLayers(int layers);
79
80 void showEvent(QShowEvent *) override;
81
83private:
84
86 quint8 backgroundOpacity() const;
87 void setBackgroundOpacity(quint8 value);
88
89 void fillPredefined();
90
91
94
95};
96
97#endif
float value(const T *src, size_t ch)
void resolutionChanged(double value)
QList< KisPropertiesConfigurationSP > m_predefined
void showEvent(QShowEvent *) override
KisCustomImageWidget(QWidget *parent, qint32 defWidth, qint32 defHeight, double resolution, const QString &defColorModel, const QString &defColorDepth, const QString &defColorProfile, const QString &imageName)
void setNumberOfLayers(int layers)
Set the number of layers that will be created.
void setBackgroundOpacity(quint8 value)
WdgNewImage(QWidget *parent)