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