summaryrefslogtreecommitdiffstats
path: root/libkipi/libkipi/imageinfo.h
blob: cafe2bed6550790e2898f2b23f40a7888b423401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* ============================================================
 * File  : imageinfo.h
 * Author: KIPI team developers (see AUTHORS files for details)
 * Date  : 2004-07-22
 * Description : 
 * 
 * Copyright 2004 by the KIPI team
 *
 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU Library General
 * Public License as published by the Free Software Foundation;
 * either version 2, or (at your option)
 * any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Library General Public License for more details.
 * 
 * ============================================================ */

/** @file imageinfo.h */

#ifndef KIPI_IMAGEINFO_H
#define KIPI_IMAGEINFO_H
#include <kurl.h>
#include <tqstring.h>
#include <tqdatetime.h>
#include <tqmap.h>
#include <tqvariant.h>
#include "libkipi/libkipi_export.h"

namespace KIPI
{
    class ImageInfoShared;
    enum TimeSpec { FromInfo, ToInfo };

    /** @class ImageInfo 
        Holds info about an image 
      */
    class LIBKIPI_EXPORT ImageInfo
    {
    public:
        TQString title() const;
        void setTitle( const TQString& name );

        TQString description() const;
        void setDescription( const TQString& description);

        TQStringVariantMap attributes() const;
        void clearAttributes();
        void addAttributes( const TQStringVariantMap& );

        KURL path() const;
        TQDateTime time( TimeSpec spec = FromInfo ) const;
        void setTime( const TQDateTime& time, TimeSpec spec = FromInfo );
        bool isTimeExact() const;
        int size() const;

        int angle() const;
        void setAngle( int );

        TQString toString( const TQVariant& ) const;

        void cloneData( const ImageInfo& other );

        /** constructor
            Interface for host application + general stuff
          */
        ImageInfo( ImageInfoShared* );
        ImageInfo( const ImageInfo& );
        ~ImageInfo();

    private:
        ImageInfo() {} // Disabled
        ImageInfo& operator=( const ImageInfo& ) { return *this; } // Disabled
        mutable KIPI::ImageInfoShared* _data;
    };
}

#endif /* KIPI_IMAGEINFO_H */