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