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         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 /* KIPI_INTERFACE_H */

Generated on Tue Sep 25 22:34:22 2007 for libKipi by  doxygen 1.5.3