~ubuntu-branches/ubuntu/precise/gwenview/precise-proposed

« back to all changes in this revision

Viewing changes to lib/jpegcontent.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-15 14:17:54 UTC
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20111215141754-z043hyx69dulbggf
Tags: upstream-4.7.90
Import upstream version 4.7.90

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// vim: set tabstop=4 shiftwidth=4 noexpandtab
 
1
// vim: set tabstop=4 shiftwidth=4 expandtab
2
2
/*
3
3
Gwenview: an image viewer
4
4
Copyright 2007 Aurélien Gâteau <agateau@kde.org>
30
30
class QString;
31
31
class QIODevice;
32
32
 
33
 
namespace Exiv2 { class Image; }
34
 
 
35
 
namespace Gwenview {
36
 
 
37
 
 
38
 
class GWENVIEWLIB_EXPORT JpegContent {
 
33
namespace Exiv2
 
34
{
 
35
class Image;
 
36
}
 
37
 
 
38
namespace Gwenview
 
39
{
 
40
 
 
41
class GWENVIEWLIB_EXPORT JpegContent
 
42
{
39
43
public:
40
 
        JpegContent();
41
 
        ~JpegContent();
42
 
        
43
 
        Orientation orientation() const;
44
 
        void resetOrientation();
45
 
 
46
 
        int dotsPerMeterX() const;
47
 
        int dotsPerMeterY() const;
48
 
 
49
 
        QSize size() const;
50
 
 
51
 
        QString comment() const;
52
 
        void setComment(const QString&);
53
 
        
54
 
        void transform(Orientation);
55
 
 
56
 
        QImage thumbnail() const;
57
 
        void setThumbnail(const QImage&);
58
 
 
59
 
        // Recreate raw data to represent image
60
 
        // Note: thumbnail must be updated separately
61
 
        void setImage(const QImage& image);
62
 
 
63
 
        bool load(const QString& file);
64
 
        bool loadFromData(const QByteArray& rawData);
65
 
        /**
66
 
         * Use this version of loadFromData if you already have an Exiv2::Image*
67
 
         */
68
 
        bool loadFromData(const QByteArray& rawData, Exiv2::Image*);
69
 
        bool save(const QString& file);
70
 
        bool save(QIODevice*);
71
 
 
72
 
        QByteArray rawData() const;
73
 
 
74
 
        QString errorString() const;
 
44
    JpegContent();
 
45
    ~JpegContent();
 
46
 
 
47
    Orientation orientation() const;
 
48
    void resetOrientation();
 
49
 
 
50
    int dotsPerMeterX() const;
 
51
    int dotsPerMeterY() const;
 
52
 
 
53
    QSize size() const;
 
54
 
 
55
    QString comment() const;
 
56
    void setComment(const QString&);
 
57
 
 
58
    void transform(Orientation);
 
59
 
 
60
    QImage thumbnail() const;
 
61
    void setThumbnail(const QImage&);
 
62
 
 
63
    // Recreate raw data to represent image
 
64
    // Note: thumbnail must be updated separately
 
65
    void setImage(const QImage& image);
 
66
 
 
67
    bool load(const QString& file);
 
68
    bool loadFromData(const QByteArray& rawData);
 
69
    /**
 
70
     * Use this version of loadFromData if you already have an Exiv2::Image*
 
71
     */
 
72
    bool loadFromData(const QByteArray& rawData, Exiv2::Image*);
 
73
    bool save(const QString& file);
 
74
    bool save(QIODevice*);
 
75
 
 
76
    QByteArray rawData() const;
 
77
 
 
78
    QString errorString() const;
75
79
 
76
80
private:
77
 
        struct Private;
78
 
        Private *d;
 
81
    struct Private;
 
82
    Private *d;
79
83
 
80
 
        JpegContent(const JpegContent&);
81
 
        void operator=(const JpegContent&);
82
 
        void applyPendingTransformation();
83
 
        int dotsPerMeter(const QString& keyName) const;
 
84
    JpegContent(const JpegContent&);
 
85
    void operator=(const JpegContent&);
 
86
    void applyPendingTransformation();
 
87
    int dotsPerMeter(const QString& keyName) const;
84
88
};
85
89
 
86
 
 
87
90
} // namespace
88
91
 
89
 
 
90
92
#endif /* JPEGCONTENT_H */