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

« back to all changes in this revision

Viewing changes to libs/dimg/filters/nr/nrsettings.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:
70
70
        softCrInput(0),
71
71
        thrCbInput(0),
72
72
        softCbInput(0)
73
 
        {}
 
73
    {}
74
74
 
75
75
    static const QString configThrLumInputAdjustmentEntry;
76
76
    static const QString configSoftLumInputAdjustmentEntry;
102
102
// --------------------------------------------------------
103
103
 
104
104
NRSettings::NRSettings(QWidget* parent)
105
 
          : QWidget(parent),
106
 
            d(new NRSettingsPriv)
 
105
    : QWidget(parent),
 
106
      d(new NRSettingsPriv)
107
107
{
108
108
    QGridLayout* grid = new QGridLayout(parent);
109
109
 
206
206
    d->advExpanderBox->addItem(d->luminanceBox, KStandardDirs::locate("data", "digikam/data/colors-luma.png"),
207
207
                               i18n("Luminance"),
208
208
                               QString("Luminance"), true);
209
 
    d->advExpanderBox->addItem(d->chrominanceRedBox, KStandardDirs::locate("data", "digikam/data/colors-chromared.png"), 
210
 
                               i18n("Chrominance Red"),  
 
209
    d->advExpanderBox->addItem(d->chrominanceRedBox, KStandardDirs::locate("data", "digikam/data/colors-chromared.png"),
 
210
                               i18n("Chrominance Red"),
211
211
                               QString("ChrominanceRed"),true);
212
 
    d->advExpanderBox->addItem(d->chrominanceBlueBox, KStandardDirs::locate("data", "digikam/data/colors-chromablue.png"), 
213
 
                               i18n("Chrominance Blue"), 
 
212
    d->advExpanderBox->addItem(d->chrominanceBlueBox, KStandardDirs::locate("data", "digikam/data/colors-chromablue.png"),
 
213
                               i18n("Chrominance Blue"),
214
214
                               QString("ChrominanceBlue"), true);
215
215
    d->advExpanderBox->addStretch();
216
216
 
306
306
 
307
307
    prm.thresholds[0] = group.readEntry(d->configThrLumInputAdjustmentEntry,  defaultPrm.thresholds[0]);
308
308
    prm.thresholds[2] = group.readEntry(d->configThrCrInputAdjustmentEntry,   defaultPrm.thresholds[2]);
309
 
    prm.thresholds[1] = group.readEntry(d->configThrCbInputAdjustmentEntry,   defaultPrm.thresholds[1]); 
 
309
    prm.thresholds[1] = group.readEntry(d->configThrCbInputAdjustmentEntry,   defaultPrm.thresholds[1]);
310
310
    prm.softness[0]   = group.readEntry(d->configSoftLumInputAdjustmentEntry, defaultPrm.softness[0]);
311
311
    prm.softness[2]   = group.readEntry(d->configSoftCrInputAdjustmentEntry,  defaultPrm.softness[2]);
312
312
    prm.softness[1]   = group.readEntry(d->configSoftCbInputAdjustmentEntry,  defaultPrm.softness[1]);
330
330
    KUrl loadRestorationFile = KFileDialog::getOpenUrl(KGlobalSettings::documentPath(),
331
331
                               QString( "*" ), kapp->activeWindow(),
332
332
                               QString( i18n("Photograph Noise Reduction Settings File to Load")) );
 
333
 
333
334
    if ( loadRestorationFile.isEmpty() )
 
335
    {
334
336
        return;
 
337
    }
335
338
 
336
339
    QFile file(loadRestorationFile.toLocalFile());
337
340
 
338
341
    if ( file.open(QIODevice::ReadOnly) )
339
342
    {
340
343
        QTextStream stream( &file );
 
344
 
341
345
        if ( stream.readLine() != "# Photograph Wavelets Noise Reduction Configuration File V2" )
342
346
        {
343
347
            KMessageBox::error(kapp->activeWindow(),
371
375
    KUrl saveRestorationFile = KFileDialog::getSaveUrl(KGlobalSettings::documentPath(),
372
376
                               QString( "*" ), kapp->activeWindow(),
373
377
                               QString( i18n("Photograph Noise Reduction Settings File to Save")) );
 
378
 
374
379
    if ( saveRestorationFile.isEmpty() )
 
380
    {
375
381
        return;
 
382
    }
376
383
 
377
384
    QFile file(saveRestorationFile.toLocalFile());
378
385