interface.h

Go to the documentation of this file.
00001 /* ============================================================
00002  * File  : interface.h
00003  * Authors: KIPI team developers (see AUTHORS files for details)
00004  *          
00005  * Date   : 2004-02
00006  * Description :
00007  *
00008  * Copyright 2004 by the KIPI team
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 
00024 #ifndef KIPI_INTERFACE_H
00025 #define KIPI_INTERFACE_H
00026 
00027 // Qt includes.
00028 
00029 #include <qstring.h>
00030 #include <qobject.h>
00031 
00032 // KDE includes.
00033 
00034 #include <kurl.h>
00035 
00036 // Local includes.
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 /* KIPI_INTERFACE_H */

Generated on Mon Nov 27 23:42:22 2006 for libKipi by  doxygen 1.5.0