~ubuntu-branches/ubuntu/maverick/kdegraphics/maverick-proposed

« back to all changes in this revision

Viewing changes to libs/libkdcraw/libkdcraw/dcrawinfocontainer.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Thomas
  • Date: 2009-12-02 14:03:43 UTC
  • mfrom: (1.1.35 upstream)
  • Revision ID: james.westby@ubuntu.com-20091202140343-2732gbkj69g89arq
Tags: 4:4.3.80-0ubuntu1
* New upstream beta release:
  - Add build-depend on shared-desktop-ontologies for nepomuk integration
  - Bump .so versions for libkexiv, libkdcraw and libkipi
  - Update various .install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
#include <QtCore/QString>
29
29
#include <QtCore/QDateTime>
30
30
#include <QtCore/QSize>
 
31
#include <QtCore/QDebug>
31
32
 
32
33
// Local includes.
33
34
 
54
55
public:
55
56
 
56
57
    /** Standard constructor */
57
 
    DcrawInfoContainer()
58
 
    {
59
 
        sensitivity       = -1.0;
60
 
        exposureTime      = -1.0;
61
 
        aperture          = -1.0;
62
 
        focalLength       = -1.0;
63
 
        pixelAspectRatio  = 1.0;    // Default value. This can be unavailable (depending of camera model).
64
 
        rawColors         = -1;
65
 
        rawImages         = -1;
66
 
        hasIccProfile     = false;
67
 
        isDecodable       = false;
68
 
        hasSecondaryPixel = false;
69
 
        daylightMult[0]   = 0.0;
70
 
        daylightMult[1]   = 0.0;
71
 
        daylightMult[2]   = 0.0;
72
 
        cameraMult[0]     = 0.0;
73
 
        cameraMult[1]     = 0.0;
74
 
        cameraMult[2]     = 0.0;
75
 
        cameraMult[3]     = 0.0;
76
 
        blackPoint        = 0;
77
 
        whitePoint        = 0;
78
 
        topMargin         = 0;
79
 
        leftMargin        = 0;
80
 
        orientation       = ORIENTATION_NONE;
81
 
 
82
 
        for (int x=0 ; x<3 ; x++)
83
 
        {
84
 
            for (int y=0 ; y<4 ; y++)
85
 
            {
86
 
                cameraColorMatrix1[x][y] = 0.0;
87
 
                cameraColorMatrix2[x][y] = 0.0;
88
 
                cameraXYZMatrix[x][y]    = 0.0;
89
 
            }
90
 
        }
91
 
    };
 
58
    DcrawInfoContainer();
92
59
 
93
60
    /** Standard destructor */
94
 
    virtual ~DcrawInfoContainer(){}
95
 
 
96
 
    /** return 'true' if container is empty, else 'false' */
97
 
    bool isEmpty()
98
 
    {
99
 
        if ( make.isEmpty()                  &&
100
 
             model.isEmpty()                 &&
101
 
             filterPattern.isEmpty()         &&
102
 
             DNGVersion.isEmpty()            &&
103
 
             exposureTime     == -1.0        &&
104
 
             aperture         == -1.0        &&
105
 
             focalLength      == -1.0        &&
106
 
             pixelAspectRatio == 1.0         &&
107
 
             sensitivity      == -1.0        &&
108
 
             rawColors        == -1          &&
109
 
             rawImages        == -1          &&
110
 
             blackPoint       == 0           &&
111
 
             whitePoint       == 0           &&
112
 
             topMargin        == 0           &&
113
 
             leftMargin       == 0           &&
114
 
             !dateTime.isValid()             &&
115
 
             !imageSize.isValid()            &&
116
 
             !fullSize.isValid()             &&
117
 
             !outputSize.isValid()           &&
118
 
             !thumbSize.isValid()            &&
119
 
             cameraColorMatrix1[0][0] == 0.0 &&
120
 
             cameraColorMatrix1[0][1] == 0.0 &&
121
 
             cameraColorMatrix1[0][2] == 0.0 &&
122
 
             cameraColorMatrix1[0][3] == 0.0 &&
123
 
             cameraColorMatrix1[1][0] == 0.0 &&
124
 
             cameraColorMatrix1[1][1] == 0.0 &&
125
 
             cameraColorMatrix1[1][2] == 0.0 &&
126
 
             cameraColorMatrix1[1][3] == 0.0 &&
127
 
             cameraColorMatrix1[2][0] == 0.0 &&
128
 
             cameraColorMatrix1[2][1] == 0.0 &&
129
 
             cameraColorMatrix1[2][2] == 0.0 &&
130
 
             cameraColorMatrix1[2][3] == 0.0 &&
131
 
             cameraColorMatrix2[0][0] == 0.0 &&
132
 
             cameraColorMatrix2[0][1] == 0.0 &&
133
 
             cameraColorMatrix2[0][2] == 0.0 &&
134
 
             cameraColorMatrix2[0][3] == 0.0 &&
135
 
             cameraColorMatrix2[1][0] == 0.0 &&
136
 
             cameraColorMatrix2[1][1] == 0.0 &&
137
 
             cameraColorMatrix2[1][2] == 0.0 &&
138
 
             cameraColorMatrix2[1][3] == 0.0 &&
139
 
             cameraColorMatrix2[2][0] == 0.0 &&
140
 
             cameraColorMatrix2[2][1] == 0.0 &&
141
 
             cameraColorMatrix2[2][2] == 0.0 &&
142
 
             cameraColorMatrix2[2][3] == 0.0 &&
143
 
             cameraXYZMatrix[0][0]    == 0.0 &&
144
 
             cameraXYZMatrix[0][1]    == 0.0 &&
145
 
             cameraXYZMatrix[0][2]    == 0.0 &&
146
 
             cameraXYZMatrix[0][3]    == 0.0 &&
147
 
             cameraXYZMatrix[1][0]    == 0.0 &&
148
 
             cameraXYZMatrix[1][1]    == 0.0 &&
149
 
             cameraXYZMatrix[1][2]    == 0.0 &&
150
 
             cameraXYZMatrix[1][3]    == 0.0 &&
151
 
             cameraXYZMatrix[2][0]    == 0.0 &&
152
 
             cameraXYZMatrix[2][1]    == 0.0 &&
153
 
             cameraXYZMatrix[2][2]    == 0.0 &&
154
 
             cameraXYZMatrix[2][3]    == 0.0 &&
155
 
             orientation              == ORIENTATION_NONE
156
 
           )
157
 
            return true;
158
 
        else
159
 
            return false;
160
 
    };
161
 
 
162
 
    /** Always false. This value is obsolete since dcraw 8.77. */
163
 
    bool             hasSecondaryPixel;
 
61
    virtual ~DcrawInfoContainer();
 
62
 
 
63
    /** Return 'true' if container is empty, else 'false' */
 
64
    bool isEmpty();
 
65
 
 
66
public:
 
67
 
164
68
    /** True if RAW file include an ICC color profile. */
165
69
    bool             hasIccProfile;
166
70
    /** True is RAW file is decodable by dcraw. */
236
140
    QSize            outputSize;
237
141
};
238
142
 
 
143
//! kDebug() stream operator. Writes container @a c to the debug output in a nicely formatted way.
 
144
LIBKDCRAW_EXPORT QDebug operator<<(QDebug dbg, const DcrawInfoContainer& c);
 
145
 
239
146
} // namespace KDcrawIface
240
147
 
241
148
#endif /* DCRAW_INFO_CONTAINER_H */