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

« back to all changes in this revision

Viewing changes to core/utilities/setup/setupicc.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        : 2005-11-24
7
7
 * Description : Color management setup tab.
8
8
 *
9
 
 * Copyright (C) 2005-2007 by F.J. Cruz <fj.cruz@supercable.es>
10
 
 * Copyright (C) 2005-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
 
 * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
 
9
 * Copyright (C) 2005-2007 by F.J. Cruz <fj dot cruz at supercable dot es>
 
10
 * Copyright (C) 2005-2012 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
11
 * Copyright (C) 2009-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
12
12
 *
13
13
 * This program is free software; you can redistribute it
14
14
 * and/or modify it under the terms of the GNU General
78
78
namespace Digikam
79
79
{
80
80
 
81
 
class SetupICC::SetupICCPriv
 
81
class SetupICC::Private
82
82
{
83
83
public:
84
84
 
85
 
    SetupICCPriv() :
 
85
    Private() :
86
86
        iccFolderLabel(0),
87
87
        enableColorManagement(0),
88
88
        defaultSRGBConvert(0),
174
174
    IccProfilesComboBox*        monitorProfilesKC;
175
175
};
176
176
 
177
 
SetupICC::SetupICC(QWidget* parent, KPageDialog* dialog)
178
 
    : QScrollArea(parent), d(new SetupICCPriv)
 
177
SetupICC::SetupICC(QWidget* const parent, KPageDialog* const dialog)
 
178
    : QScrollArea(parent), d(new Private)
179
179
{
180
 
    d->mainDialog = dialog;
181
 
    d->tab        = new KTabWidget(viewport());
 
180
    d->mainDialog            = dialog;
 
181
    d->tab                   = new KTabWidget(viewport());
182
182
    setWidget(d->tab);
183
183
    setWidgetResizable(true);
184
184
 
185
 
    d->behaviorPanel        = new QWidget;
186
 
    QVBoxLayout* mainLayout = new QVBoxLayout(d->behaviorPanel);
 
185
    d->behaviorPanel         = new QWidget;
 
186
    QVBoxLayout* mainLayout  = new QVBoxLayout(d->behaviorPanel);
187
187
 
188
188
    // --------------------------------------------------------
189
189
 
190
 
    QWidget* colorPolicy    = new QWidget;
191
 
    QGridLayout* gridHeader = new QGridLayout(colorPolicy);
 
190
    QWidget* colorPolicy     = new QWidget;
 
191
    QGridLayout* gridHeader  = new QGridLayout(colorPolicy);
192
192
 
193
193
    d->enableColorManagement = new QCheckBox(colorPolicy);
194
194
    d->enableColorManagement->setText(i18n("Enable Color Management"));
376
376
    d->infoMonitorProfiles->setWhatsThis(i18n("<p>You can use this button to get more detailed "
377
377
                                              "information about the selected monitor profile.</p>"));
378
378
 
379
 
    d->managedView     = new QCheckBox;
 
379
    d->managedView           = new QCheckBox;
380
380
    d->managedView->setText(i18n("Use color managed view in editor"));
381
381
    d->managedView->setWhatsThis(i18n("<p>Turn on this option if "
382
382
                                      "you want to use your <b>Monitor Color Profile</b> to show your pictures in "
384
384
                                      "You can at any time toggle this option from the Editor window. "
385
385
                                      "<i>Warning</i>: This can slow down rendering of the image, depending on the speed of your computer.</p>"));
386
386
 
387
 
    d->managedPreviews = new QCheckBox;
 
387
    d->managedPreviews       = new QCheckBox;
388
388
    d->managedPreviews->setText(i18n("Use color managed view for previews and thumbnails"));
389
389
    /**
390
390
    * @todo d->managedPreview->setWhatsThis( i18n("") );
455
455
 
456
456
    QLabel* iccFolderIcon      = new QLabel;
457
457
    iccFolderIcon->setPixmap(SmallIcon("folder-downloads", KIconLoader::SizeMedium));
458
 
    d->iccFolderLabel = new QLabel(i18n("digiKam looks for ICC profiles in a number of <a href='default'>default locations</a>. "
459
 
                                        "You can specify an additional folder:"));
 
458
    d->iccFolderLabel          = new QLabel(i18n("digiKam looks for ICC profiles in a number of <a href='default'>default locations</a>. "
 
459
                                                 "You can specify an additional folder:"));
460
460
    d->iccFolderLabel->setWordWrap(true);
461
461
 
462
 
    d->defaultPathKU  = new KUrlRequester;
 
462
    d->defaultPathKU           = new KUrlRequester;
463
463
    d->iccFolderLabel->setBuddy(d->defaultPathKU);
464
464
    d->defaultPathKU->lineEdit()->setReadOnly(true);
465
465
    d->defaultPathKU->setMode(KFile::Directory | KFile::LocalOnly | KFile::ExistingOnly);
485
485
    d->advancedSettingsGB     = new QGroupBox(i18n("Advanced Settings"));
486
486
    QGridLayout* gridAdvanced = new QGridLayout(d->advancedSettingsGB);
487
487
 
488
 
    d->bpcAlgorithm = new QCheckBox(d->advancedSettingsGB);
 
488
    d->bpcAlgorithm           = new QCheckBox(d->advancedSettingsGB);
489
489
    d->bpcAlgorithm->setText(i18n("Use black point compensation"));
490
490
    d->bpcAlgorithm->setWhatsThis(i18n("<p><b>Black Point Compensation</b> is a way to make "
491
491
                                       "adjustments between the maximum "
492
492
                                       "black levels of digital files and the black capabilities of various "
493
493
                                       "digital devices.</p>"));
494
494
 
495
 
    QLabel* lablel = new QLabel(d->advancedSettingsGB);
 
495
    QLabel* lablel            = new QLabel(d->advancedSettingsGB);
496
496
    lablel->setText(i18n("Rendering Intents:"));
497
497
 
498
 
    d->renderingIntentKC = new IccRenderingIntentComboBox(d->advancedSettingsGB);
 
498
    d->renderingIntentKC      = new IccRenderingIntentComboBox(d->advancedSettingsGB);
499
499
 
500
500
    gridAdvanced->addWidget(d->bpcAlgorithm,      0, 0, 1, 2);
501
501
    gridAdvanced->addWidget(lablel,               1, 0, 1, 1);
627
627
        settings.defaultUncalibratedBehavior = ICCSettingsContainer::AutomaticColors | ICCSettingsContainer::ConvertToWorkspace;
628
628
    }
629
629
 
630
 
    settings.iccFolder          = d->defaultPathKU->url().toLocalFile();
631
 
    settings.useBPC             = d->bpcAlgorithm->isChecked();
632
 
    settings.renderingIntent    = d->renderingIntentKC->intent();
633
 
    settings.useManagedView     = d->managedView->isChecked();
634
 
    settings.useManagedPreviews = d->managedPreviews->isChecked();
 
630
    settings.iccFolder           = d->defaultPathKU->url().toLocalFile();
 
631
    settings.useBPC              = d->bpcAlgorithm->isChecked();
 
632
    settings.renderingIntent     = d->renderingIntentKC->intent();
 
633
    settings.useManagedView      = d->managedView->isChecked();
 
634
    settings.useManagedPreviews  = d->managedPreviews->isChecked();
635
635
 
636
636
    settings.defaultInputProfile = d->inProfilesKC->currentProfile().filePath();
637
637
    settings.workspaceProfile    = d->workProfilesKC->currentProfile().filePath();
936
936
    }
937
937
 
938
938
    QStringList paths = IccProfile::defaultSearchPaths();
 
939
 
939
940
    return !paths.isEmpty();
940
941
}
941
942