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 HostSupportsTags = 1 << 9
00056 };
00057
00059 class LIBKIPI_EXPORT Interface : public QObject
00060 {
00061 Q_OBJECT
00062
00063 public:
00064 Interface(QObject *parent, const char *name=0);
00065 virtual ~Interface();
00066
00067 virtual ImageCollection currentAlbum() = 0;
00068 virtual ImageCollection currentSelection() = 0;
00069 virtual QValueList<ImageCollection> allAlbums() = 0;
00070
00071 virtual ImageInfo info( const KURL& ) = 0;
00072 virtual bool addImage( const KURL&, QString& err );
00073 virtual void delImage( const KURL& );
00074
00075 virtual void refreshImages( const KURL::List& );
00076
00077 virtual QString fileExtensions();
00078
00079 bool hasFeature( KIPI::Features feature );
00080
00081 protected:
00082 virtual int features() const = 0;
00083
00084 private:
00085 friend class PluginLoader;
00086 bool hasFeature( const QString& feature );
00087
00088 signals:
00089 void selectionChanged( bool hasSelection );
00090 void currentAlbumChanged( bool anyAlbum );
00091 };
00092 }
00093
00094 #endif