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

« back to all changes in this revision

Viewing changes to libs/dimg/filters/icc/iccsettingscontainer.h

  • Committer: Bazaar Package Importer
  • Author(s): Christian Mangold
  • Date: 2010-04-09 21:30:01 UTC
  • mfrom: (1.2.28 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409213001-4bfyibrd359rn7o3
Tags: 2:1.2.0-0ubuntu1
* New upstream release (LP: #560576)
* Remove all patches, fixed upstream
  - Remove quilt build-depend

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ============================================================
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 *
 
6
 * Date        : 2005-12-08
 
7
 * Description : ICC Settings Container.
 
8
 *
 
9
 * Copyright (C) 2005-2007 by F.J. Cruz <fj.cruz@supercable.es>
 
10
 * Copyright (C) 2005-2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
 
11
 *
 
12
 * This program is free software; you can redistribute it
 
13
 * and/or modify it under the terms of the GNU General
 
14
 * Public License as published by the Free Software Foundation;
 
15
 * either version 2, or (at your option)
 
16
 * any later version.
 
17
 *
 
18
 * This program is distributed in the hope that it will be useful,
 
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
21
 * GNU General Public License for more details.
 
22
 *
 
23
 * ============================================================ */
 
24
 
 
25
#ifndef ICCSETTINGSCONTAINER_H
 
26
#define ICCSETTINGSCONTAINER_H
 
27
 
 
28
// Qt includes
 
29
 
 
30
#include <QColor>
 
31
#include <QFlags>
 
32
#include <QString>
 
33
 
 
34
// Local includes
 
35
 
 
36
#include "digikam_export.h"
 
37
 
 
38
class KConfigGroup;
 
39
 
 
40
namespace Digikam
 
41
{
 
42
 
 
43
class DIGIKAM_EXPORT ICCSettingsContainer
 
44
{
 
45
 
 
46
public:
 
47
 
 
48
    ICCSettingsContainer();
 
49
 
 
50
    ~ICCSettingsContainer(){};
 
51
 
 
52
public:
 
53
 
 
54
    void readFromConfig(KConfigGroup& group);
 
55
    void writeToConfig(KConfigGroup& group) const;
 
56
    void writeManagedViewToConfig(KConfigGroup& group) const;
 
57
 
 
58
    enum BehaviorEnum
 
59
    {
 
60
        // Note: Values are stored in config - keep them constant
 
61
 
 
62
        InvalidBehavior          = 0,
 
63
 
 
64
        /// Interpretation of the image data
 
65
 
 
66
        UseEmbeddedProfile       = 1 << 0,
 
67
        UseSRGB                  = 1 << 1,
 
68
        UseWorkspace             = 1 << 2,
 
69
        UseDefaultInputProfile   = 1 << 3,
 
70
        UseSpecifiedProfile      = 1 << 4,
 
71
        AutomaticColors          = 1 << 5,
 
72
        DoNotInterpret           = 1 << 6,
 
73
 
 
74
        /// Transformation / target profile
 
75
 
 
76
        KeepProfile              = 1 << 10,
 
77
        ConvertToWorkspace       = 1 << 11,
 
78
 
 
79
        /// Special flags and values
 
80
 
 
81
        LeaveFileUntagged        = 1 << 18,
 
82
 
 
83
        AskUser                  = 1 << 20,
 
84
        SafestBestAction         = 1 << 21,
 
85
 
 
86
        /// ready combinations for convenience
 
87
 
 
88
        PreserveEmbeddedProfile  = UseEmbeddedProfile | KeepProfile,
 
89
        EmbeddedToWorkspace      = UseEmbeddedProfile | ConvertToWorkspace,
 
90
        SRGBToWorkspace          = UseSRGB | ConvertToWorkspace,
 
91
        AutoToWorkspace          = AutomaticColors | ConvertToWorkspace,
 
92
        InputToWorkspace         = UseDefaultInputProfile | ConvertToWorkspace,
 
93
        SpecifiedToWorkspace     = UseSpecifiedProfile | ConvertToWorkspace,
 
94
        NoColorManagement        = DoNotInterpret | LeaveFileUntagged
 
95
    };
 
96
    Q_DECLARE_FLAGS(Behavior, BehaviorEnum)
 
97
 
 
98
    bool     enableCM;
 
99
 
 
100
    QString  iccFolder;
 
101
 
 
102
    QString  workspaceProfile;
 
103
 
 
104
    Behavior defaultMismatchBehavior;
 
105
    Behavior defaultMissingProfileBehavior;
 
106
    Behavior defaultUncalibratedBehavior;
 
107
 
 
108
    Behavior lastMismatchBehavior;
 
109
    Behavior lastMissingProfileBehavior;
 
110
    Behavior lastUncalibratedBehavior;
 
111
    QString  lastSpecifiedAssignProfile;
 
112
    QString  lastSpecifiedInputProfile;
 
113
 
 
114
    bool     useManagedView;
 
115
    bool     useManagedPreviews;
 
116
    QString  monitorProfile;
 
117
 
 
118
    QString  defaultInputProfile;
 
119
    QString  defaultProofProfile;
 
120
 
 
121
    bool     useBPC;
 
122
    int      renderingIntent;
 
123
 
 
124
    // Settings specific for soft proofing
 
125
    int      proofingRenderingIntent;
 
126
    int      doGamutCheck;
 
127
    QColor   gamutCheckMaskColor;
 
128
 
 
129
};
 
130
 
 
131
}  // namespace Digikam
 
132
 
 
133
Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::ICCSettingsContainer::Behavior)
 
134
 
 
135
#endif  // ICCSETTINGSCONTAINER_H