~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to libs/threadimageio/previewloadthread.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:
6
6
 * Date        : 2006-01-20
7
7
 * Description : image file IO threaded interface.
8
8
 *
9
 
 * Copyright (C) 2005-2008 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
10
 
 * Copyright (C) 2005-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
9
 * Copyright (C) 2005-2010 by Marcel Wiesweg <marcel.wiesweg@gmx.de>
 
10
 * Copyright (C) 2005-2010 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
33
33
{
34
34
 
35
35
PreviewLoadThread::PreviewLoadThread()
36
 
            : m_displayingWidget(0)
 
36
    : m_displayingWidget(0)
37
37
{
38
38
}
39
39
 
40
40
LoadingDescription PreviewLoadThread::createLoadingDescription(const QString& filePath, int size, bool exifRotate)
41
41
{
42
42
    LoadingDescription description(filePath, size, exifRotate);
 
43
 
43
44
    if (DImg::fileFormat(filePath) == DImg::RAW)
44
45
    {
45
46
        description.rawDecodingSettings.optimizeTimeLoading();
46
 
        description.rawDecodingSettings.sixteenBitsImage   = false;
47
 
        description.rawDecodingSettings.halfSizeColorImage = true;
48
 
        description.rawDecodingHint = LoadingDescription::RawDecodingTimeOptimized;
 
47
        description.rawDecodingSettings.rawPrm.sixteenBitsImage   = false;
 
48
        description.rawDecodingSettings.rawPrm.halfSizeColorImage = true;
 
49
        description.rawDecodingHint                               = LoadingDescription::RawDecodingTimeOptimized;
49
50
    }
50
51
 
51
52
    ICCSettingsContainer settings = IccSettings::instance()->settings();
 
53
 
52
54
    if (settings.enableCM && settings.useManagedPreviews)
53
55
    {
54
56
        description.postProcessingParameters.colorManagement = LoadingDescription::ConvertForDisplay;
74
76
    ManagedLoadSaveThread::loadPreview(description);
75
77
}
76
78
 
77
 
void PreviewLoadThread::setDisplayingWidget(QWidget *widget)
 
79
void PreviewLoadThread::setDisplayingWidget(QWidget* widget)
78
80
{
79
81
    m_displayingWidget = widget;
80
82
}