libKipi
interface.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of kipi-plugins project
4  * http://www.kipi-plugins.org
5  *
6  * Date : 2004-02-01
7  * Description : interface for host application.
8  *
9  * Copyright (C) 2004-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2004-2005 by Renchi Raju <renchi.raju at kdemail.net>
11  * Copyright (C) 2004-2005 by Jesper K. Pedersen <blackie at kde.org>
12  * Copyright (C) 2004-2005 by Aurelien Gateau <aurelien dot gateau at free.fr>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option) any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
27 #ifndef KIPI_INTERFACE_H
28 #define KIPI_INTERFACE_H
29 
30 // Qt includes.
31 
32 #include <qstring.h>
33 #include <qobject.h>
34 
35 // KDE includes.
36 
37 #include <kurl.h>
38 
39 // Local includes.
40 
42 #include "libkipi/imageinfo.h"
43 #include "libkipi/libkipi_export.h"
44 
46 namespace KIPI
47 {
48  enum Features
49  {
52  ImagesHasTime = 1 << 2,
54  AcceptNewImages = 1 << 4,
60  };
61 
63  class LIBKIPI_EXPORT Interface : public QObject
64  {
65  Q_OBJECT
66 
67  public:
68 
69  Interface(QObject *parent, const char *name=0);
70  virtual ~Interface();
71 
72  virtual ImageCollection currentAlbum() = 0;
73  virtual ImageCollection currentSelection() = 0;
74  virtual QValueList<ImageCollection> allAlbums() = 0;
75 
76  virtual ImageInfo info( const KURL& ) = 0;
77  virtual bool addImage( const KURL&, QString& err );
78  virtual void delImage( const KURL& );
79 
80  virtual void refreshImages( const KURL::List& );
81 
82  virtual QString fileExtensions();
83 
84  bool hasFeature( KIPI::Features feature );
85 
87  static QString version();
88 
89  signals:
90 
91  void selectionChanged( bool hasSelection );
92  void currentAlbumChanged( bool anyAlbum );
93 
94  protected:
95 
96  virtual int features() const = 0;
97 
98  private:
99 
100  friend class PluginLoader;
101  bool hasFeature( const QString& feature );
102  };
103 }
104 
105 #endif /* KIPI_INTERFACE_H */
Definition: interface.h:53
Definition: interface.h:58
Definition: interface.h:57
Definition: pluginloader.h:43
Definition: imagecollection.h:52
Definition: interface.h:55
Features
Definition: interface.h:48
Definition: batchprogressdialog.cpp:69
Definition: interface.h:63
#define LIBKIPI_EXPORT
Definition: libkipi_export.h:35
Definition: imageinfo.h:54
Definition: interface.h:51
Definition: interface.h:50
Definition: interface.h:56
Definition: interface.h:52
Definition: interface.h:59
Definition: interface.h:54