00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00024 #ifndef KIPI_INTERFACE_H
00025 #define KIPI_INTERFACE_H
00026
00027
00028
00029 #include <qstring.h>
00030 #include <qobject.h>
00031
00032
00033
00034 #include <kurl.h>
00035
00036
00037
00038 #include "libkipi/imagecollection.h"
00039 #include "libkipi/imageinfo.h"
00040 #include "libkipi/libkipi_export.h"
00041
00043 namespace KIPI
00044 {
00045 enum Features {
00046 AlbumsHaveComments = 1 << 0,
00047 ImagesHasComments = 1 << 1,
00048 ImagesHasTime = 1 << 2,
00049 SupportsDateRanges = 1 << 3,
00050 AcceptNewImages = 1 << 4,
00051 ImageTitlesWritable = 1 << 5,
00052 AlbumsHaveCategory = 1 << 6,
00053 AlbumsHaveCreationDate = 1 << 7,
00054 AlbumsUseFirstImagePreview = 1 << 8
00055 };
00056
00058 class LIBKIPI_EXPORT Interface : public QObject
00059 {
00060 Q_OBJECT
00061
00062 public:
00063 Interface(QObject *parent, const char *name=0);
00064 virtual ~Interface();
00065
00066 virtual ImageCollection currentAlbum() = 0;
00067 virtual ImageCollection currentSelection() = 0;
00068 virtual QValueList<ImageCollection> allAlbums() = 0;
00069
00070 virtual ImageInfo info( const KURL& ) = 0;
00071 virtual bool addImage( const KURL&, QString& err );
00072 virtual void delImage( const KURL& );
00073
00074 virtual void refreshImages( const KURL::List& );
00075
00076 virtual QString fileExtensions();
00077
00078 bool hasFeature( KIPI::Features feature );
00079
00080 protected:
00081 virtual int features() const = 0;
00082
00083 private:
00084 friend class PluginLoader;
00085 bool hasFeature( const QString& feature );
00086
00087 signals:
00088 void selectionChanged( bool hasSelection );
00089 void currentAlbumChanged( bool anyAlbum );
00090 };
00091 }
00092
00093 #endif