libKipi
imageinfoshared.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of kipi-plugins project
4 * http://www.kipi-plugins.org
5 *
6 * Date : 2004-02-19
7 * Description : image info shared.
8 *
9 * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * Copyright (C) 2004-2005 by Renchi Raju <renchi.raju at kdemail.net>
11 * Copyright (C) 2004-2005 by Jesper K. Pedersen <blackie at kde.org>
12 * Copyright (C) 2004-2005 by Aurelien Gateau <aurelien dot gateau at free.fr>
13 *
14 * This program is free software; you can redistribute it
15 * and/or modify it under the terms of the GNU General
16 * Public License as published by the Free Software Foundation;
17 * either version 2, or (at your option) any later version.
18 *
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * ============================================================ */
25
26#ifndef KIPI_IMAGEINFOSHARED_H
27#define KIPI_IMAGEINFOSHARED_H
28
29// Qt includes.
30
31#include <qstring.h>
32#include <qmap.h>
33#include <qdatetime.h>
34#include <qvariant.h>
35
36// KDE includes.
37
38#include <kurl.h>
39
40// Local includes.
41
42#include "libkipi/imageinfo.h"
44
45namespace KIPI
46{
47 class Interface;
48
50 {
51 public:
52
53 ImageInfoShared( KIPI::Interface* interface, const KURL& url );
54 virtual ~ImageInfoShared() {}
55 virtual QString title() {return QString::null;}
56 virtual void setTitle( const QString& );
57
58 virtual QString description() = 0;
59 virtual void setDescription( const QString& ) = 0;
60
61 virtual QMap<QString,QVariant> attributes() = 0;
62 virtual void clearAttributes() = 0;
63 virtual void addAttributes( const QMap<QString,QVariant>& ) = 0;
64
65 virtual KURL path();
66 virtual QDateTime time( KIPI::TimeSpec spec );
67 virtual void setTime( const QDateTime& time, TimeSpec spec = FromInfo );
68
69 virtual bool isTimeExact();
70
71 virtual int size();
72
73 virtual int angle();
74 virtual void setAngle( int );
75
76 QString toString( const QVariant& );
77
78 virtual void cloneData( ImageInfoShared* other );
79
80 protected:
81
82 KURL _url;
83
84 private:
85
86 ImageInfoShared() {} // Disable
87
88 friend class ImageInfo;
89 void addRef();
90 void removeRef();
91 int _count;
92 Interface* _interface;
93 };
94}
95
96#endif /* IMAGEINFOSHARED_H */
friend class ImageInfo
Definition imageinfoshared.h:88
virtual ~ImageInfoShared()
Definition imageinfoshared.h:54
virtual void setAngle(int)
Definition imageinfoshared.cpp:90
virtual void setTime(const QDateTime &time, TimeSpec spec=FromInfo)
Definition imageinfoshared.cpp:99
virtual QString title()
Definition imageinfoshared.h:55
virtual void setDescription(const QString &)=0
virtual int size()
Definition imageinfoshared.cpp:49
virtual void clearAttributes()=0
QString toString(const QVariant &)
virtual void addAttributes(const QMap< QString, QVariant > &)=0
virtual int angle()
Definition imageinfoshared.cpp:85
virtual void cloneData(ImageInfoShared *other)
Definition imageinfoshared.cpp:110
KURL _url
Definition imageinfoshared.h:82
ImageInfoShared(KIPI::Interface *interface, const KURL &url)
Definition imageinfoshared.cpp:39
virtual QDateTime time(KIPI::TimeSpec spec)
Definition imageinfoshared.cpp:60
virtual QString description()=0
virtual QMap< QString, QVariant > attributes()=0
virtual KURL path()
Definition imageinfoshared.cpp:44
virtual bool isTimeExact()
Definition imageinfoshared.cpp:94
Definition interface.h:64
#define LIBKIPI_EXPORT
Definition libkipi_export.h:35
Definition batchprogressdialog.cpp:70
TimeSpec
Definition imageinfo.h:49
@ FromInfo
Definition imageinfo.h:49