7
7
* Description : a curves widget with additional control elements
9
* Copyright (C) 2009-2010 by Andi Clemens <andi dot clemens at googlemail dot com>
10
* Copyright (C) 2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
9
* Copyright (C) 2009-2010 by Andi Clemens <andi dot clemens at gmail dot com>
10
* Copyright (C) 2010-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
12
12
* This program is free software; you can redistribute it
13
13
* and/or modify it under the terms of the GNU General
98
99
ColorGradientWidget* vGradient;
101
CurvesBox::CurvesBox(int w, int h, QWidget* parent, bool readOnly)
102
: QWidget(parent), d(new CurvesBoxPriv)
102
CurvesBox::CurvesBox(int w, int h, QWidget* const parent, bool readOnly)
103
: QWidget(parent), d(new Private)
104
105
d->curvesWidget = new CurvesWidget(w, h, this, readOnly);
108
CurvesBox::CurvesBox(int w, int h, uchar* i_data, uint i_w, uint i_h,
109
bool i_sixteenBits, QWidget* parent, bool readOnly)
110
: QWidget(parent), d(new CurvesBoxPriv)
109
CurvesBox::CurvesBox(int w, int h, const DImg& img, QWidget* const parent, bool readOnly)
110
: QWidget(parent), d(new Private)
112
d->sixteenBit = i_sixteenBits;
113
d->curvesWidget = new CurvesWidget(w, h, i_data, i_w, i_h, i_sixteenBits, this, readOnly);
112
d->sixteenBit = img.sixteenBit();
113
d->curvesWidget = new CurvesWidget(w, h, this, readOnly);
114
d->curvesWidget->updateData(img);
114
115
d->curvesWidget->setChannelType(d->channel);