~ubuntu-branches/ubuntu/trusty/digikam/trusty

« back to all changes in this revision

Viewing changes to core/libs/dimg/filters/curves/curvesbox.cpp

  • Committer: Package Import Robot
  • Author(s): Rohan Garg
  • Date: 2012-11-26 18:24:20 UTC
  • mfrom: (1.9.1) (3.1.23 experimental)
  • Revision ID: package-import@ubuntu.com-20121126182420-qoy6z0nx4ai0wzcl
Tags: 4:3.0.0~beta3-0ubuntu1
* New upstream release
  - Add build-deps :  libhupnp-dev, libqtgstreamer-dev, libmagickcore-dev
* Merge from debian, remaining changes:
  - Make sure libqt4-opengl-dev, libgl1-mesa-dev and libglu1-mesa-dev only
    install on i386,amd64 and powerpc
  - Depend on libtiff-dev instead of libtiff4-dev
  - Drop digikam breaks/replaces kipi-plugins-common since we're past the
    LTS release now
  - digikam to recommend mplayerthumbs | ffmpegthumbs. We currently only
    have latter in the archives, even though former is also supposed to
    be part of kdemultimedia. (LP: #890059)
  - kipi-plugins to recommend www-browser rather than konqueror directly
    since 2.8 no direct usage of konqueror is present in the flickr
    plugin anymore (LP: #1011211)
  - Keep kubuntu_mysqld_executable_name.diff
  - Don't install libkipi translations
  - Keep deps on libcv-dev, libcvaux-dev
  - Keep split packaging of libraries
  - Replace icons from KDE 3 time in debian/xpm.d/*.xpm with the new
    versions (LP: #658047)
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * Date        : 2009-06-14
7
7
 * Description : a curves widget with additional control elements
8
8
 *
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>
11
11
 *
12
12
 * This program is free software; you can redistribute it
13
13
 * and/or modify it under the terms of the GNU General
51
51
#include "imagecurves.h"
52
52
#include "imagehistogram.h"
53
53
#include "globals.h"
 
54
#include "dimg.h"
54
55
 
55
56
namespace Digikam
56
57
{
57
58
 
58
 
class CurvesBox::CurvesBoxPriv
 
59
class CurvesBox::Private
59
60
{
60
61
public:
61
62
 
62
 
    CurvesBoxPriv() :
 
63
    Private() :
63
64
        sixteenBit(false),
64
65
        channel(LuminosityChannel),
65
66
        curveFree(0),
98
99
    ColorGradientWidget* vGradient;
99
100
};
100
101
 
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)
103
104
{
104
105
    d->curvesWidget = new CurvesWidget(w, h, this, readOnly);
105
106
    setup();
106
107
}
107
108
 
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)
111
111
{
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);
115
116
    setup();
116
117
}