2
* Copyright (c) 2010 Adam Celarek <kdedev at xibo dot at>
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License as published by
6
* the Free Software Foundation; version 2 of the License.
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
13
* You should have received a copy of the GNU Lesser General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
#ifndef KIS_SHADE_SELECTOR_LINE_H
19
#define KIS_SHADE_SELECTOR_LINE_H
24
class KisShadeSelectorLineComboBox;
26
class KisShadeSelectorLineBase : public QWidget {
28
KisShadeSelectorLineBase(QWidget *parent = 0) : QWidget(parent)
31
void setLineNumber(int n) {m_lineNumber=n;}
32
virtual QString toString() const = 0;
33
virtual void fromString(const QString& string) = 0;
39
class KisShadeSelectorLine : public KisShadeSelectorLineBase
43
explicit KisShadeSelectorLine(QWidget *parent = 0);
44
explicit KisShadeSelectorLine(qreal hueDelta, qreal satDelta, qreal valDelta, QWidget *parent = 0, qreal hueShift = 0, qreal satShift = 0, qreal shiftVal = 0);
45
void setParam(qreal hue, qreal sat, qreal val, qreal hueShift, qreal satShift, qreal shiftVal);
46
void setColor(const QColor& color);
47
void updateSettings();
48
void setCanvas(KisCanvas2* canvas);
49
void showHelpText() {m_displayHelpText=true;}
50
QString toString() const;
51
void fromString(const QString& string);
54
void paintEvent(QPaintEvent *);
55
void mousePressEvent(QMouseEvent *);
59
qreal m_saturationDelta;
63
qreal m_saturationShift;
67
QColor m_backgroundColor;
74
bool m_displayHelpText;
76
friend class KisShadeSelectorLineComboBox;
79
#endif // KIS_SHADE_SELECTOR_LINE_H