Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_normal_preview_widget.h
Go to the documentation of this file.
1
/* This file is part of the KDE project
2
*
3
* SPDX-FileCopyrightText: 2015 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
4
*
5
* SPDX-License-Identifier: LGPL-2.0-or-later
6
*/
7
8
#ifndef KISNORMALPREVIEWWIDGET_H
9
#define KISNORMALPREVIEWWIDGET_H
10
11
#include <QLabel>
12
13
/* This is a widget that takes an image of a normal semi-sphere, and inverts the channels based on the values
14
* of m_redChannel, m_greenChannel and m_blueChannel, this is used to give feedback on a set of normal-swizzles.
15
* setRedChannel, setGreenChannel and setBlueChannel automatically updates the image with the new channel configuration.
16
*/
17
18
class
KisNormalPreviewWidget
:
public
QLabel
19
{
20
Q_OBJECT
21
public
:
22
23
KisNormalPreviewWidget
(QWidget* parent = 0);
24
~KisNormalPreviewWidget
()
override
;
25
26
public
Q_SLOTS:
27
/* for the following functions 0=X+, 1=X-, 2=Y+, 3=Y-, 4=Z+ and 5=Z-*/
28
void
setRedChannel
(
int
index);
29
void
setGreenChannel
(
int
index);
30
void
setBlueChannel
(
int
index);
31
32
private
:
33
34
void
updateImage
();
35
QImage
swizzleTransformPreview
(QImage preview);
36
int
previewTransform
(
int
const
horizontal,
int
const
vertical,
int
const
depth,
int
index,
int
maxvalue);
37
38
int
m_redChannel
;
39
int
m_greenChannel
;
40
int
m_blueChannel
;
41
QString
m_fileName
;
42
};
43
44
#endif
// KISNORMALPREVIEWWIDGET_H
KisNormalPreviewWidget
Definition
kis_normal_preview_widget.h:19
KisNormalPreviewWidget::swizzleTransformPreview
QImage swizzleTransformPreview(QImage preview)
Definition
kis_normal_preview_widget.cpp:64
KisNormalPreviewWidget::setBlueChannel
void setBlueChannel(int index)
Definition
kis_normal_preview_widget.cpp:48
KisNormalPreviewWidget::m_blueChannel
int m_blueChannel
Definition
kis_normal_preview_widget.h:40
KisNormalPreviewWidget::m_greenChannel
int m_greenChannel
Definition
kis_normal_preview_widget.h:39
KisNormalPreviewWidget::setRedChannel
void setRedChannel(int index)
Definition
kis_normal_preview_widget.cpp:32
KisNormalPreviewWidget::setGreenChannel
void setGreenChannel(int index)
Definition
kis_normal_preview_widget.cpp:40
KisNormalPreviewWidget::previewTransform
int previewTransform(int const horizontal, int const vertical, int const depth, int index, int maxvalue)
Definition
kis_normal_preview_widget.cpp:83
KisNormalPreviewWidget::m_fileName
QString m_fileName
Definition
kis_normal_preview_widget.h:41
KisNormalPreviewWidget::m_redChannel
int m_redChannel
Definition
kis_normal_preview_widget.h:38
KisNormalPreviewWidget::~KisNormalPreviewWidget
~KisNormalPreviewWidget() override
Definition
kis_normal_preview_widget.cpp:28
KisNormalPreviewWidget::KisNormalPreviewWidget
KisNormalPreviewWidget(QWidget *parent=0)
Definition
kis_normal_preview_widget.cpp:16
KisNormalPreviewWidget::updateImage
void updateImage()
Definition
kis_normal_preview_widget.cpp:56
plugins
paintops
tangentnormal
kis_normal_preview_widget.h
Generated at
2025-11-04 02:30:02+01:00
from
Krita
branch
master
, commit
c9dde2e79561a8aea4a7e8d9ac99c98a7bac9e52