Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_cie_tongue_widget.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2015 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3
*
4
* Based on the Digikam CIE Tongue widget
5
* SPDX-FileCopyrightText: 2006-2013 Gilles Caulier <caulier dot gilles at gmail dot com>
6
*
7
* Any source code are inspired from lprof project and
8
* SPDX-FileCopyrightText: 1998-2001 Marti Maria
9
*
10
* SPDX-License-Identifier: GPL-2.0-or-later
11
**/
12
13
#ifndef KIS_CIETONGUEWIDGET_H
14
#define KIS_CIETONGUEWIDGET_H
15
16
// Qt includes
17
18
#include "
KoColorimetryUtils.h
"
19
#include <QWidget>
20
#include <QColor>
21
#include <QPaintEvent>
22
23
// KDE includes
24
25
#include <
KoColor.h
>
26
#include <
KoColorSpace.h
>
27
28
#include <kritaui_export.h>
29
30
class
KRITAUI_EXPORT
KisCIETongueWidget
:
public
QWidget
31
{
32
Q_OBJECT
33
34
public
:
35
36
KisCIETongueWidget
(QWidget *parent =
nullptr
);
37
~KisCIETongueWidget
()
override
;
38
39
//this expects a qvector <double> (9), qvector <double> (3) and whether or not there's profile data?;
40
void
setProfileData(
QVector<KoColorimetryUtils::xyY>
p
,
KoColorimetryUtils::xyY
w,
bool
profileData =
false
);
41
void
setGamut(QPolygonF gamut);
42
void
setRGBData(
KoColorimetryUtils::xyY
whitepoint,
QVector<KoColorimetryUtils::xyY>
colorants);
43
void
setCMYKData(
KoColorimetryUtils::xyY
whitepoint);
44
void
setXYZData(
KoColorimetryUtils::xyY
whitepoint);
45
void
setGrayData(
KoColorimetryUtils::xyY
whitepoint);
46
void
setLABData(
KoColorimetryUtils::xyY
whitepoint);
47
void
setYCbCrData(
KoColorimetryUtils::xyY
whitepoint);
48
void
setProfileDataAvailable(
bool
dataAvailable);
49
50
void
loadingStarted
();
51
void
loadingFailed
();
52
void
uncalibratedColor
();
53
54
enum
model
{
RGBA
,
CMYKA
, XYZA, LABA, GRAYA, YCbCrA};
55
56
protected
:
57
58
int
grids(
double
val)
const
;
59
60
void
outlineTongue();
61
void
fillTongue();
62
void
drawTongueAxis();
63
void
drawTongueGrid();
64
void
drawLabels();
65
66
QRgb
colorByCoord(
double
x,
double
y);
67
void
drawSmallEllipse(QPointF xy,
int
r,
int
g,
int
b,
int
sz);
68
69
void
resizeEvent(QResizeEvent* event)
override
;
70
void
paintEvent(QPaintEvent*)
override
;
71
72
private
:
73
74
void
drawColorantTriangle();
75
void
drawGamut();
76
void
drawWhitePoint();
77
void
drawPatches
();
78
void
updatePixmap();
79
80
void
mapPoint(
int
& icx,
int
& icy, QPointF xy);
81
void
biasedLine(
int
x1,
int
y1,
int
x2,
int
y2);
82
void
biasedText(
int
x,
int
y,
const
QString& txt);
83
84
private :
85
86
class
Private
;
87
Private
*
const
d {
nullptr
};
88
};
89
90
#endif
/* KISCIETONGUEWIDGET_H */
p
const Params2D p
Definition
KisBezierUtils.cpp:703
KoColorSpace.h
KoColor.h
KoColorimetryUtils.h
KisCIETongueWidget
Definition
kis_cie_tongue_widget.cpp:129
KisCIETongueWidget::uncalibratedColor
void uncalibratedColor()
KisCIETongueWidget::loadingStarted
void loadingStarted()
KisCIETongueWidget::drawPatches
void drawPatches()
KisCIETongueWidget::model
model
Definition
kis_cie_tongue_widget.h:54
KisCIETongueWidget::CMYKA
@ CMYKA
Definition
kis_cie_tongue_widget.h:54
KisCIETongueWidget::loadingFailed
void loadingFailed()
QList
Definition
KisQStringListFwd.h:16
QRgb
unsigned int QRgb
Definition
kis_color_selector_simple.h:10
Private
Definition
SvgTransformParser.cpp:20
RGBA
@ RGBA
Definition
ocio_display_filter_vfx2021.h:24
KoColorimetryUtils::xyY
Definition
KoColorimetryUtils.h:40
libs
ui
widgets
kis_cie_tongue_widget.h
Generated at
2026-07-16 02:30:11+02:00
from
Krita
branch
master
, commit
a788c87613f94f0657ee6a3d88f6745bc44af899