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

« back to all changes in this revision

Viewing changes to core/utilities/setup/setupeditor.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        : 2004-08-03
7
7
 * Description : setup Image Editor tab.
8
8
 *
9
 
 * Copyright (C) 2004-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
9
 * Copyright (C) 2004-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
10
10
 *
11
11
 * This program is free software; you can redistribute it
12
12
 * and/or modify it under the terms of the GNU General
60
60
namespace Digikam
61
61
{
62
62
 
63
 
class SetupEditor::SetupEditorPriv
 
63
class SetupEditor::Private
64
64
{
65
65
public:
66
66
 
67
 
    SetupEditorPriv() :
 
67
    Private() :
68
68
        themebackgroundColor(0),
69
69
        hideToolBar(0),
70
70
        hideThumbBar(0),
109
109
    RDoubleNumInput* underExposurePcents;
110
110
    RDoubleNumInput* overExposurePcents;
111
111
};
112
 
const QString SetupEditor::SetupEditorPriv::configGroupName("ImageViewer Settings");
113
 
const QString SetupEditor::SetupEditorPriv::configUseThemeBackgroundColorEntry("UseThemeBackgroundColor");
114
 
const QString SetupEditor::SetupEditorPriv::configBackgroundColorEntry("BackgroundColor");
115
 
const QString SetupEditor::SetupEditorPriv::configFullScreenHideToolBarEntry("FullScreen Hide ToolBar");
116
 
const QString SetupEditor::SetupEditorPriv::configFullScreenHideThumbBarEntry("FullScreenHideThumbBar");
117
 
const QString SetupEditor::SetupEditorPriv::configUnderExposureColorEntry("UnderExposureColor");
118
 
const QString SetupEditor::SetupEditorPriv::configOverExposureColorEntry("OverExposureColor");
119
 
const QString SetupEditor::SetupEditorPriv::configUnderExposurePercentsEntry("UnderExposurePercentsEntry");
120
 
const QString SetupEditor::SetupEditorPriv::configOverExposurePercentsEntry("OverExposurePercentsEntry");
121
 
const QString SetupEditor::SetupEditorPriv::configExpoIndicatorModeEntry("ExpoIndicatorMode");
 
112
 
 
113
const QString SetupEditor::Private::configGroupName("ImageViewer Settings");
 
114
const QString SetupEditor::Private::configUseThemeBackgroundColorEntry("UseThemeBackgroundColor");
 
115
const QString SetupEditor::Private::configBackgroundColorEntry("BackgroundColor");
 
116
const QString SetupEditor::Private::configFullScreenHideToolBarEntry("FullScreen Hide ToolBar");
 
117
const QString SetupEditor::Private::configFullScreenHideThumbBarEntry("FullScreenHideThumbBar");
 
118
const QString SetupEditor::Private::configUnderExposureColorEntry("UnderExposureColor");
 
119
const QString SetupEditor::Private::configOverExposureColorEntry("OverExposureColor");
 
120
const QString SetupEditor::Private::configUnderExposurePercentsEntry("UnderExposurePercentsEntry");
 
121
const QString SetupEditor::Private::configOverExposurePercentsEntry("OverExposurePercentsEntry");
 
122
const QString SetupEditor::Private::configExpoIndicatorModeEntry("ExpoIndicatorMode");
122
123
 
123
124
// --------------------------------------------------------
124
125
 
125
 
SetupEditor::SetupEditor(QWidget* parent)
126
 
    : QScrollArea(parent), d(new SetupEditorPriv)
 
126
SetupEditor::SetupEditor(QWidget* const parent)
 
127
    : QScrollArea(parent), d(new Private)
127
128
{
128
129
    QWidget* panel = new QWidget(viewport());
129
130
    setWidget(panel);
136
137
    QGroupBox* interfaceOptionsGroup = new QGroupBox(i18n("Interface Options"), panel);
137
138
    QVBoxLayout* gLayout1            = new QVBoxLayout(interfaceOptionsGroup);
138
139
 
139
 
    d->themebackgroundColor          = new QCheckBox(i18n("&Use theme background color"),
140
 
                                                     interfaceOptionsGroup);
 
140
    d->themebackgroundColor          = new QCheckBox(i18n("&Use theme background color"), interfaceOptionsGroup);
141
141
 
142
142
    d->themebackgroundColor->setWhatsThis(i18n("Enable this option to use the background theme "
143
143
                                               "color in the image editor area."));
144
144
 
145
 
    d->colorBox                  = new KHBox(interfaceOptionsGroup);
146
 
    QLabel* backgroundColorlabel = new QLabel(i18n("&Background color:"), d->colorBox);
147
 
    d->backgroundColor           = new KColorButton(d->colorBox);
 
145
    d->colorBox                      = new KHBox(interfaceOptionsGroup);
 
146
    QLabel* backgroundColorlabel     = new QLabel(i18n("&Background color:"), d->colorBox);
 
147
    d->backgroundColor               = new KColorButton(d->colorBox);
148
148
    backgroundColorlabel->setBuddy(d->backgroundColor);
149
149
    d->backgroundColor->setWhatsThis(i18n("Customize the background color to use "
150
150
                                          "in the image editor area."));
151
151
 
152
 
    d->hideToolBar      = new QCheckBox(i18n("H&ide toolbar in fullscreen mode"), interfaceOptionsGroup);
153
 
    d->hideThumbBar     = new QCheckBox(i18n("Hide &thumbbar in fullscreen mode"), interfaceOptionsGroup);
 
152
    d->hideToolBar                   = new QCheckBox(i18n("H&ide toolbar in fullscreen mode"), interfaceOptionsGroup);
 
153
    d->hideThumbBar                  = new QCheckBox(i18n("Hide &thumbbar in fullscreen mode"), interfaceOptionsGroup);
154
154
 
155
155
    gLayout1->addWidget(d->themebackgroundColor);
156
156
    gLayout1->addWidget(d->colorBox);
161
161
 
162
162
    // --------------------------------------------------------
163
163
 
164
 
    QGroupBox* exposureOptionsGroup = new QGroupBox(i18n("Exposure Indicators"), panel);
165
 
    QVBoxLayout* gLayout2           = new QVBoxLayout(exposureOptionsGroup);
 
164
    QGroupBox* exposureOptionsGroup  = new QGroupBox(i18n("Exposure Indicators"), panel);
 
165
    QVBoxLayout* gLayout2            = new QVBoxLayout(exposureOptionsGroup);
166
166
 
167
 
    KHBox* underExpoBox         = new KHBox(exposureOptionsGroup);
168
 
    QLabel* underExpoColorlabel = new QLabel(i18n("&Under-exposure color:"), underExpoBox);
169
 
    d->underExposureColor       = new KColorButton(underExpoBox);
 
167
    KHBox* underExpoBox              = new KHBox(exposureOptionsGroup);
 
168
    QLabel* underExpoColorlabel      = new QLabel(i18n("&Under-exposure color:"), underExpoBox);
 
169
    d->underExposureColor            = new KColorButton(underExpoBox);
170
170
    underExpoColorlabel->setBuddy(d->underExposureColor);
171
171
    d->underExposureColor->setWhatsThis(i18n("Customize color used in image editor to identify "
172
172
                                             "under-exposed pixels."));
173
173
 
174
 
    KHBox* underPcentBox        = new KHBox(exposureOptionsGroup);
175
 
    QLabel* underExpoPcentlabel = new QLabel(i18n("Under-exposure percents:"), underPcentBox);
176
 
    d->underExposurePcents      = new RDoubleNumInput(underPcentBox);
 
174
    KHBox* underPcentBox             = new KHBox(exposureOptionsGroup);
 
175
    QLabel* underExpoPcentlabel      = new QLabel(i18n("Under-exposure percents:"), underPcentBox);
 
176
    d->underExposurePcents           = new RDoubleNumInput(underPcentBox);
177
177
    d->underExposurePcents->setDecimals(1);
178
178
    d->underExposurePcents->input()->setRange(0.1, 5.0, 0.1, true);
179
179
    d->underExposurePcents->setDefaultValue(1.0);
181
181
    d->underExposurePcents->setWhatsThis(i18n("Adjust the percents of the bottom of image histogram "
182
182
                                              "which will be used to check under exposed pixels."));
183
183
 
184
 
    KHBox* overExpoBox         = new KHBox(exposureOptionsGroup);
185
 
    QLabel* overExpoColorlabel = new QLabel(i18n("&Over-exposure color:"), overExpoBox);
186
 
    d->overExposureColor       = new KColorButton(overExpoBox);
 
184
    KHBox* overExpoBox               = new KHBox(exposureOptionsGroup);
 
185
    QLabel* overExpoColorlabel       = new QLabel(i18n("&Over-exposure color:"), overExpoBox);
 
186
    d->overExposureColor             = new KColorButton(overExpoBox);
187
187
    overExpoColorlabel->setBuddy(d->overExposureColor);
188
188
    d->overExposureColor->setWhatsThis(i18n("Customize color used in image editor to identify "
189
189
                                            "over-exposed pixels."));
190
190
 
191
 
    KHBox* overPcentBox        = new KHBox(exposureOptionsGroup);
192
 
    QLabel* overExpoPcentlabel = new QLabel(i18n("Over-exposure percents:"), overPcentBox);
193
 
    d->overExposurePcents      = new RDoubleNumInput(overPcentBox);
 
191
    KHBox* overPcentBox              = new KHBox(exposureOptionsGroup);
 
192
    QLabel* overExpoPcentlabel       = new QLabel(i18n("Over-exposure percents:"), overPcentBox);
 
193
    d->overExposurePcents            = new RDoubleNumInput(overPcentBox);
194
194
    d->overExposurePcents->setDecimals(1);
195
195
    d->overExposurePcents->input()->setRange(0.1, 5.0, 0.1, true);
196
196
    d->overExposurePcents->setDefaultValue(1.0);
198
198
    d->overExposurePcents->setWhatsThis(i18n("Adjust the percents of the top of image histogram "
199
199
                                             "which will be used to check over exposed pixels."));
200
200
 
201
 
    d->expoIndicatorMode       = new QCheckBox(i18n("Indicate exposure as pure color"), exposureOptionsGroup);
 
201
    d->expoIndicatorMode = new QCheckBox(i18n("Indicate exposure as pure color"), exposureOptionsGroup);
202
202
    d->overExposureColor->setWhatsThis(i18n("If this option is enabled, over- and under-exposure indicators will be displayed "
203
203
                                            "only when pure white and pure black color matches, as all color components match "
204
204
                                            "the condition in the same time. "
213
213
 
214
214
    if (!d->preview.isNull())
215
215
    {
216
 
        d->expoPreviewHisto->updateData(d->preview.bits(), d->preview.width(),
217
 
                                        d->preview.height(), d->preview.sixteenBit());
 
216
        d->expoPreviewHisto->updateData(d->preview);
218
217
    }
219
218
 
220
219
    d->expoPreviewHisto->setChannelType(ColorChannels);