1
/* ============================================================
3
* This file is a part of digiKam project
4
* http://www.digikam.org
7
* Description : a widget to display CIE tongue from
10
* Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
* Any source code are inspired from lprof project and
13
* Copyright (C) 1998-2001 Marti Maria
15
* This program is free software; you can redistribute it
16
* and/or modify it under the terms of the GNU General
17
* Public License as published by the Free Software Foundation;
18
* either version 2, or (at your option)
21
* This program is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
26
* ============================================================ */
28
#ifndef CIETONGUEWIDGET_H
29
#define CIETONGUEWIDGET_H
45
#if LCMS_VERSION < 114
46
#define cmsTakeCopyright(profile) "Unknown"
47
#endif // LCMS_VERSION < 114
51
#include "digikam_export.h"
56
class CIETongueWidgetPriv;
58
class DIGIKAM_EXPORT CIETongueWidget : public QWidget
64
CIETongueWidget(int w, int h, QWidget *parent=0, cmsHPROFILE hMonitor=0);
67
bool setProfileData(const QByteArray& profileData=QByteArray());
68
bool setProfileFromFile(const KURL& file=KURL());
70
void loadingStarted();
75
int grids(double val) const;
79
void drawTongueAxis();
80
void drawTongueGrid();
83
QRgb colorByCoord(double x, double y);
84
void drawSmallElipse(LPcmsCIExyY xyY, BYTE r, BYTE g, BYTE b, int sz);
86
void paintEvent( QPaintEvent * );
90
void drawColorantTriangle();
91
void drawWhitePoint();
94
void mapPoint(int& icx, int& icy, LPcmsCIExyY xyY);
95
void biasedLine(int x1, int y1, int x2, int y2);
96
void biasedText(int x, int y, QString Txt);
100
void setProfile(cmsHPROFILE hProfile);
104
void slotBlinkTimerDone();
108
CIETongueWidgetPriv* d;
112
} // namespace Digikam
114
#endif /* CIETONGUEWIDGET_H */