imageinfoshared.h

Go to the documentation of this file.
00001 /* ============================================================
00002  * File   : imageinfoshared.h
00003  * Authors: Jesper K. Pedersen <blackie@kde.org>
00004  *          
00005  * Date   : 2004-02-19
00006  * Description :
00007  *
00008  * Copyright 2004 by Jesper K. Pedersen
00009  *
00010  * This program is free software; you can redistribute it
00011  * and/or modify it under the terms of the GNU Library General
00012  * Public License as published by the Free Software Foundation;
00013  * either version 2, or (at your option)
00014  * any later version.
00015  *
00016  * This program is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  * GNU Library General Public License for more details.
00020  *
00021  * ============================================================ */
00022  
00023 #ifndef KIPI_IMAGEINFOSHARED_H
00024 #define KIPI_IMAGEINFOSHARED_H
00025 
00026 // Qt includes.
00027 
00028 #include <qstring.h>
00029 #include <qmap.h>
00030 #include <qdatetime.h>
00031 #include <qvariant.h>
00032 
00033 // KDE includes.
00034 
00035 #include <kurl.h>
00036 
00037 // LibKIPI includes.
00038 
00039 #include "libkipi/imageinfo.h"
00040 #include "libkipi/libkipi_export.h"
00041 
00042 namespace KIPI
00043 {
00044     class Interface;
00045 
00046     class LIBKIPI_EXPORT ImageInfoShared
00047     {
00048     public:
00049         ImageInfoShared( KIPI::Interface* interface, const KURL& url );
00050         virtual ~ImageInfoShared() {}
00051         virtual QString title() {return QString::null;}
00052         virtual void setTitle( const QString& );
00053 
00054         virtual QString description() = 0;
00055         virtual void setDescription( const QString& ) = 0;
00056 
00057         virtual QMap<QString,QVariant> attributes() = 0;
00058         virtual void clearAttributes() = 0;
00059         virtual void addAttributes( const QMap<QString,QVariant>& ) = 0;
00060 
00061         virtual KURL path();
00062         virtual QDateTime time( KIPI::TimeSpec spec );
00063         virtual void setTime( const QDateTime& time, TimeSpec spec = FromInfo );
00064 
00065         virtual bool isTimeExact();
00066 
00067         virtual int size();
00068 
00069         virtual int angle();
00070         virtual void setAngle( int );
00071 
00072         QString toString( const QVariant& );
00073 
00074         virtual void cloneData( ImageInfoShared* other );
00075 
00076     protected:
00077         KURL _url;
00078 
00079     private:
00080         ImageInfoShared() {} // Disable
00081 
00082         friend class ImageInfo;
00083         void addRef();
00084         void removeRef();
00085         int _count;
00086         Interface* _interface;
00087     };
00088 }
00089 
00090 #endif /* IMAGEINFOSHARED_H */
00091 

Generated on Tue Sep 25 22:34:22 2007 for libKipi by  doxygen 1.5.3