~ubuntu-branches/ubuntu/saucy/digikam/saucy

« back to all changes in this revision

Viewing changes to utilities/imageeditor/rawimport/rawsettingsbox.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-12-21 23:19:11 UTC
  • mfrom: (1.2.33 upstream) (3.1.7 experimental)
  • Revision ID: james.westby@ubuntu.com-20101221231911-z9jip7s5aht1jqn9
Tags: 2:1.7.0-1ubuntu1
* Merge from Debian Experimental. Remaining Ubuntu changes:
  - Export .pot name and copy to plugins in debian/rules
  - Version build-depends on kipi-plugins-dev to ensure build is against the
    same version on all archs
* Drop debian/patches/kubuntu_01_linker.diff, incoporated upstream
* Remove patches directory and unused patches

Show diffs side-by-side

added added

removed removed

Lines of Context:
163
163
};
164
164
 
165
165
RawSettingsBox::RawSettingsBox(const KUrl& url, QWidget* parent)
166
 
              : EditorToolSettings(parent), d(new RawSettingsBoxPriv)
 
166
    : EditorToolSettings(parent), d(new RawSettingsBoxPriv)
167
167
{
168
168
    setButtons(Default|Ok|Cancel);
169
169
    setTools(Histogram);
177
177
    d->rawdecodingBox      = new QWidget(d->tabView);
178
178
    QGridLayout* rawGrid   = new QGridLayout(d->rawdecodingBox);
179
179
    d->decodingSettingsBox = new DcrawSettingsWidget(d->rawdecodingBox,
180
 
                                 DcrawSettingsWidget::SIXTEENBITS | DcrawSettingsWidget::COLORSPACE);
 
180
            DcrawSettingsWidget::SIXTEENBITS | DcrawSettingsWidget::COLORSPACE);
181
181
    d->decodingSettingsBox->setObjectName("RawSettingsBox Expander");
182
182
 
183
183
    KFileDialog* inputDlg  = d->decodingSettingsBox->inputProfileUrlEdit()->fileDialog();
247
247
    d->fineExposureInput->setRange(-3.0, 3.0, 0.1);
248
248
    d->fineExposureInput->setDefaultValue(0.0);
249
249
    d->fineExposureInput->input()->setWhatsThis(i18n("This value in E.V will be used to perform "
250
 
                                                     "an exposure compensation of the image."));
 
250
            "an exposure compensation of the image."));
251
251
 
252
252
    advExposureLayout->addWidget(d->brightnessLabel,   0, 0, 1, 1);
253
253
    advExposureLayout->addWidget(d->brightnessInput,   0, 1, 1, 2);
358
358
            this, SIGNAL(signalAbortPreview()));
359
359
 
360
360
    connect(d->decodingSettingsBox, SIGNAL(signalSettingsChanged()),
361
 
            this, SIGNAL(signalDemosaicingChanged()));
 
361
            this, SLOT(slotDemosaicingChanged()));
362
362
 
363
363
    connect(d->curveWidget, SIGNAL(signalCurvesChanged()),
364
364
            this, SIGNAL(signalPostProcessingChanged()));
385
385
    delete d;
386
386
}
387
387
 
 
388
void RawSettingsBox::slotDemosaicingChanged()
 
389
{
 
390
    enableUpdateBtn(true);
 
391
}
 
392
 
388
393
void RawSettingsBox::enableUpdateBtn(bool b)
389
394
{
390
395
    d->updateBtn->setEnabled(b);
391
396
}
392
397
 
 
398
bool RawSettingsBox::updateBtnEnabled()
 
399
{
 
400
    return d->updateBtn->isEnabled();
 
401
}
 
402
 
393
403
void RawSettingsBox::setBusy(bool b)
394
404
{
395
405
    d->decodingSettingsBox->setEnabled(!b);
436
446
    KConfigGroup group        = config->group(d->optionGroupName);
437
447
 
438
448
    histogramBox()->setChannel((ChannelType)group.readEntry(d->optionHistogramChannelEntry,
439
 
                    (int) LuminosityChannel));
 
449
                               (int) LuminosityChannel));
440
450
    histogramBox()->setScale((HistogramScale)group.readEntry(d->optionHistogramScaleEntry,
441
 
                    (int) LogScaleHistogram));
 
451
                             (int) LogScaleHistogram));
442
452
    curvesWidget()->setScaleType((HistogramScale)group.readEntry(d->optionHistogramScaleEntry,
443
 
                    (int) LogScaleHistogram));
 
453
                                 (int) LogScaleHistogram));
444
454
 
445
455
    d->decodingSettingsBox->readSettings(group);
446
456
 
490
500
    settings.exposureComp = d->fineExposureInput->value();
491
501
 
492
502
    if (d->curveWidget->curves()->isDirty())
 
503
    {
493
504
        settings.curveAdjust = d->curveWidget->curves()->getCurvePoints(LuminosityChannel);
 
505
    }
494
506
 
495
507
    return settings;
496
508
}