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"
44
46namespace KIPI
47{
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;
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 imagecollection.h:53
Definition imageinfo.h:55
virtual ImageInfo info(const KURL &)=0
virtual ImageCollection currentAlbum()=0
Definition interface.cpp:184
virtual bool addImage(const KURL &, QString &err)
Definition interface.cpp:167
void currentAlbumChanged(bool anyAlbum)
Interface(QObject *parent, const char *name=0)
Definition interface.cpp:103
virtual void delImage(const KURL &)
Definition interface.cpp:175
virtual void refreshImages(const KURL::List &)
Definition interface.cpp:121
void selectionChanged(bool hasSelection)
virtual QString fileExtensions()
Definition interface.cpp:225
friend class PluginLoader
Definition interface.h:100
virtual QValueList< ImageCollection > allAlbums()=0
Definition interface.cpp:204
static QString version()
Definition interface.cpp:113
virtual ImageCollection currentSelection()=0
Definition interface.cpp:195
virtual int features() const =0
Definition interface.cpp:214
bool hasFeature(KIPI::Features feature)
Definition interface.cpp:129
#define LIBKIPI_EXPORT
Definition libkipi_export.h:35
Definition batchprogressdialog.cpp:70
Features
Definition interface.h:49
@ AlbumsHaveCategory
Definition interface.h:56
@ ImageTitlesWritable
Definition interface.h:55
@ AlbumsUseFirstImagePreview
Definition interface.h:58
@ ImagesHasTime
Definition interface.h:52
@ SupportsDateRanges
Definition interface.h:53
@ AlbumsHaveComments
Definition interface.h:50
@ ImagesHasComments
Definition interface.h:51
@ HostSupportsTags
Definition interface.h:59
@ AlbumsHaveCreationDate
Definition interface.h:57
@ AcceptNewImages
Definition interface.h:54