diff --git a/src/configwidget.h b/src/configwidget.h index 6acd56b..6859bfc 100644 --- a/src/configwidget.h +++ b/src/configwidget.h @@ -1,104 +1,104 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2012-08-06 * @brief Plugins config widget. * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2012 by Victor Dodon * dodonvictor at gmail dot com * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_CONFIGWIDGET_H #define KIPI_CONFIGWIDGET_H // Qt includes -#include -#include +#include +#include // Local includes #include "plugin.h" #include "pluginloader.h" #include "libkipi_export.h" namespace KIPI { class LIBKIPI_EXPORT ConfigWidget : public QTreeWidget { Q_OBJECT public: /** Default constructor. */ ConfigWidget(QWidget* const parent = nullptr); ~ConfigWidget() override; /** Apply all changes about plugins selected to be hosted in KIPI host application. */ void apply(); /** Return the number of plugins actived in the list. */ int actived() const; /** Return the total number of plugins in the list. */ int count() const; /** Return the number of visible plugins in the list. */ int visible() const; /** Select all plugins in the list. */ void selectAll() override; /** Clear all selected plugins in the list. */ void clearAll(); /** Set the string used to filter the plugins list. signalSearchResult() is emitted when all is done. */ void setFilter(const QString& filter, Qt::CaseSensitivity cs); /** Return the current string used to filter the plugins list. */ QString filter() const; Q_SIGNALS: /** Signal emitted when filtering is done through slotSetFilter(). * Number of plugins found is sent when item relevant of filtering match the query. */ void signalSearchResult(int); private: class Private; Private* const d; }; } // namespace KIPI #endif /* KIPI_CONFIGWIDGET_H */ diff --git a/src/imagecollection.h b/src/imagecollection.h index bb0154d..943e174 100644 --- a/src/imagecollection.h +++ b/src/imagecollection.h @@ -1,163 +1,163 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-01 * @brief image collection * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_IMAGECOLLECTION_H #define KIPI_IMAGECOLLECTION_H // Qt includes -#include -#include -#include +#include +#include +#include // Local includes #include "libkipi_export.h" /** @namespace KIPI */ namespace KIPI { class ImageCollectionShared; /** @class ImageCollection Holds info about the collection from KIPI host application. NOTE: Plugins should never create an instance of ImageCollection, only the host application should do that. */ class LIBKIPI_EXPORT ImageCollection { public: ImageCollection(ImageCollectionShared* const); ImageCollection(const ImageCollection& other); ImageCollection(); ~ImageCollection(); ImageCollection& operator=(const ImageCollection&); bool operator==(const ImageCollection&) const; /// Collection properties --------------------------------------------------------------------------- /** * Returns the name of collection. */ QString name() const; /** * Returns the comment for the collection of images or QString::null if that doesn't make any sense. * A comment makes sense for an album, but not for a KIPI::Interface::currentSelection(). */ QString comment() const; /** * Return the category of the image collection. For example, * a category can be a sorting class like 'travels', 'friends', 'monuments', etc. */ QString category() const; /** * Returns the Creation date of the image collection. The default implementation * return a null date. */ QDate date() const; /** * Returns a list of image urls hosted by collection. */ QList images() const; /** * Returns the directory for the image collection. * The host application may, however, return anything in case this * imagecollection is not a directory (check isDirectory()), or may * return the directory of the first image in the collection, the root * of the image collection (in case all images has a common root), or * even an empty URL. */ QUrl url() const; /** * Returns the directory to place images into. * This function should only be called if KIPI::Features AcceptNewImages * is available. * * The function may choose to return the directory for the image collection * or if images from the collection are not available in a common directory, * then instead a common upload directory. * * IMPORTANT: uploadRootUrl() must be a subpath of uploadUrl() */ QUrl uploadUrl() const; /** * When a plugin wants to upload images, it may choose to display an upload widget, * which gives the user the possible to show a directory from a tree view. * * This tree view widget needs to starts at some URL. This function specifies that location. * Here are a couple of possible return value different host applications may choose. * * If all images are stored rooted at some tree (which is the case for KPhotoAlbum), * then this function may return this directory unconditionally. * The root directory returned by uploadUrl() (which is the default implementation for this method) * will be the directory returned by uploadUrl(). * * IMPORTANT: uploadRootUrl() must be a subpath of uploadUrl() */ QUrl uploadRootUrl() const; /** * This function return the name of the upload root path used by the * the KIPI::UploadWidget. This name can be different for each host * app (like "Images" for KPhotoAlbum). */ QString uploadRootName() const; /** * Returns whether an imagecollection is a physical folder on the filesystem * or not. It is important to check this, if your plugin needs to do folder * based operations for an image collection. */ bool isDirectory() const; /** * Returns true if this Collection is valid */ bool isValid() const; private: mutable ImageCollectionShared* d; }; } // namespace KIPI #endif /* IMAGECOLLECTION_H */ diff --git a/src/imagecollectionselector.h b/src/imagecollectionselector.h index 6258b92..d753246 100644 --- a/src/imagecollectionselector.h +++ b/src/imagecollectionselector.h @@ -1,65 +1,65 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2008-02-22 * @brief image collection selector template * * @author Copyright (C) 2008-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef IMAGECOLLECTIONSELECTOR_H #define IMAGECOLLECTIONSELECTOR_H // Qt includes -#include -#include +#include +#include // KIPI includes #include "libkipi_export.h" namespace KIPI { class ImageCollection; /** Re-implement this widget in your KIPI host application to use your dedicated model/view */ class LIBKIPI_EXPORT ImageCollectionSelector : public QWidget { Q_OBJECT public: ImageCollectionSelector(QWidget* const parent = nullptr); ~ImageCollectionSelector() override; virtual QList selectedImageCollections() const; virtual void enableVirtualCollections(bool flag = true); Q_SIGNALS: void selectionChanged(); }; } // namespace KIPI #endif /* IMAGECOLLECTIONSELECTOR_H */ diff --git a/src/imagecollectionshared.h b/src/imagecollectionshared.h index 7c2f7cb..78d205c 100644 --- a/src/imagecollectionshared.h +++ b/src/imagecollectionshared.h @@ -1,90 +1,90 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-01 * @brief image collection shared * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_IMAGECOLLECTIONSHARED_H #define KIPI_IMAGECOLLECTIONSHARED_H // Qt Includes. -#include -#include -#include +#include +#include +#include // Local includes #include "libkipi_export.h" namespace KIPI { /** See ImageCollection documentation for details. */ class LIBKIPI_EXPORT ImageCollectionShared { public: ImageCollectionShared(); virtual ~ImageCollectionShared(); /** These methods must be re-implemented in your KIPI host application to manage collection attributes with plugins. */ virtual QList images() = 0; virtual QString name() = 0; virtual QString comment(); virtual QString category(); virtual QDate date(); virtual QUrl url(); virtual QUrl uploadUrl(); virtual QUrl uploadRootUrl(); virtual QString uploadRootName(); virtual bool isDirectory(); virtual bool operator==(ImageCollectionShared&); private: void addRef(); void removeRef(); private: int m_count; private: friend class ImageCollection; }; } // namespace KIPI #endif /* IMAGECOLLECTIONSHARED_H */ diff --git a/src/imageinfo.h b/src/imageinfo.h index 2301df1..ad947aa 100644 --- a/src/imageinfo.h +++ b/src/imageinfo.h @@ -1,245 +1,245 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-07-22 * @brief image info * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_IMAGEINFO_H #define KIPI_IMAGEINFO_H // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // Local includes #include "libkipi_export.h" namespace KIPI { class ImageInfoShared; /** @class ImageInfo Holds info about an image from KIPI host application. NOTE: If you want to manage item properties from kipi-plugins, use wrapper class KIPIPlugins::KPImageInfo, not this class directly. See kipi-plugins/common/libkipi-plugins API for details. IMPORTANT: this class must re-implemented in KIPI host application through KIPI::ImageInfoShared. This implementation must be thread-safe, due to possible use into kipi plugins separated thread implementation in the future. */ class LIBKIPI_EXPORT ImageInfo { public: /** Constructor and interface for host application. */ ImageInfo(ImageInfoShared* const); ImageInfo(const ImageInfo&); ~ImageInfo(); /** Returns a Map of attributes of the image. In case the host application supports some special attributes of the image, this function can be used to return them. Following attributes are supported:
ATTRIBUTES VALUE RETURNED COMMENTS
"name" QString Returns name of item (usually file name).
"comment" QString Returns default item comment.
"date" QDateTime Returns date of item (usually the creation date). In the case the application supports date ranges (like this image is from 1998-2000), this attribute always return the start of date range.
"dateto" QDateTime In the case the application supports date ranges (like this image is from 1998-2000), this attribute returns the end of date range.
"isexactdate" bool value In the case the application supports date ranges (like this image is from 1998-2000), this attribute returns true if the date is an exact specification, and thus not a range.
"orientation" integer value Returns orientation information. See ExifOrientation values for details).
"title" QString Returns default item title.
"rating" integer value Returns item starts 0 <= rate <= 5).
"colorlabel" integer value Return item color flag 0 <= colorlabel <= 10.
"picklabel" integer value Return item workflow flag 0 <= picklabel <= 4.
"latitude" double value Return item latitude in degrees (-90.0 >= lat <=90.0).
"longitude" double value Return item longitude in degrees (-180.0 >= long <=180.0).
"altitude" double value Return item altitude in meters.
"tagspath" QStringList Return all tags path list of item, formatted as "Country/France/City/Paris" for ex.
"keywords" QStringList Return all tags name list (without path).
"filesize" qlonglong value Return item file size in bytes.
"creators" QStringList Return creators list of item.
"credit" QString Return credit of item.
"rights" QString Return rights of item.
"source" QString Return source of item.
"tags" QStringList For compatibility. DEPRECATED and replaced by "keywords" attribute.
"angle" integer value For compatibility. DEPRECATED and replaced by "orientation" attribute.
*/ QMap attributes() const; /** Set the attributes defined from the map to the image. Following keys/values are the same the attributes(), * excepted "keywords", "filesize", and "isexactdate" properties which are read-only values. */ void addAttributes(const QMap&); /** Remove attributes listed from the image. Following values can be used:
ATTRIBUTES COMMENTS
"comment" Remove all comments.
"date" Remove date info.
"orientation" Remove orientation info.
"title" Remove all titles.
"rating" Remove rating info.
"colorlabel" Remove color labels info.
"picklabel" Remove pick labels info.
"gpslocation" Return item altitude in meters.
"tagspath" Remove all tags path.
"copyrights" Remove all copyrights info.
"tags" For compatibility. DEPRECATED and replaced by "keywords" attribute.
"angle" For compatibility. DEPRECATED and replaced by "orientation" attribute.
*/ void delAttributes(const QStringList&); /** Remove all attribute from the image. See delAttributes() for list of all attributes removed. */ void clearAttributes(); /** Copies all the attributes from the other imageinfo. */ void cloneData(const ImageInfo& other); /** Return item url. */ QUrl url() const; private: ImageInfo(); /// Disable ImageInfo& operator=(const ImageInfo&); /// Disable private: mutable ImageInfoShared* d; }; } // namespace KIPI #endif /* KIPI_IMAGEINFO_H */ diff --git a/src/imageinfoshared.h b/src/imageinfoshared.h index 83c9dab..4386073 100644 --- a/src/imageinfoshared.h +++ b/src/imageinfoshared.h @@ -1,106 +1,106 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-19 * @brief image info shared * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2006-2012 by Marcel Wiesweg * marcel dot wiesweg at gmx dot de * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_IMAGEINFOSHARED_H #define KIPI_IMAGEINFOSHARED_H // Qt includes -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include // Local includes #include "imageinfo.h" #include "libkipi_export.h" namespace KIPI { class Interface; class FileReadWriteLock; /** See ImageInfo documentation for details. */ class LIBKIPI_EXPORT ImageInfoShared { public: ImageInfoShared(Interface* const interface, const QUrl &url); virtual ~ImageInfoShared(); QUrl url() const; /** Convenience methods calling the respective methods in the interface for this item. */ bool reserveForAction(QObject* const reservingObject, const QString& descriptionOfAction) const; void clearReservation(QObject* const reservingObject); bool itemIsReserved(QString* const descriptionOfAction = nullptr) const; FileReadWriteLock* createReadWriteLock() const; /** These methods must be re-implemented in your KIPI host application to manage image attributes with plugins. */ virtual QMap attributes() = 0; virtual void clearAttributes() = 0; virtual void addAttributes(const QMap&) = 0; virtual void delAttributes(const QStringList&) = 0; virtual void cloneData(ImageInfoShared* const other); protected: QUrl _url; private: ImageInfoShared(); // Disable /// Used by ImageInfo class. void addRef(); void removeRef(); private: class Private; Private* const d; friend class ImageInfo; }; } // namespace KIPI #endif /* IMAGEINFOSHARED_H */ diff --git a/src/interface.h b/src/interface.h index 7950a8c..d331153 100644 --- a/src/interface.h +++ b/src/interface.h @@ -1,579 +1,579 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-01 * @brief main kipi host application interface * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2006-2012 by Marcel Wiesweg * marcel dot wiesweg at gmx dot de * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_INTERFACE_H #define KIPI_INTERFACE_H // Qt includes -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include // Local includes #include "libkipi_export.h" class QPixmap; class QWidget; class QAbstractItemModel; /** @namespace KIPI */ namespace KIPI { class ImageCollection; class ImageCollectionSelector; class ImageInfo; class ImageInfoShared; class UploadWidget; /*! @enum KIPI::Features Not all host applications support the full subset of features that KIPI allows access to. Thus before a plugin expect a decant value for the comment, it should check whether KIPI::CollectionsHaveComments are set. It does so using KIPI::Interface::hasFeature(). */ enum Features { CollectionsHaveComments = 1 << 0, /** This feature specifies that albums have descriptions associated to them. */ ImagesHasComments = 1 << 1, /** This feature specifies that images in the host application has descriptions associated to them. */ ImagesHasTime = 1 << 2, /** This feature specifies that images has a date associated with it, which the host application can display and set. */ HostSupportsDateRanges = 1 << 3, /** This feature specifies whether the host application supports that the user can specify a date range for images, like 1998-2000. */ HostAcceptNewImages = 1 << 4, /** This feature specifies that the host application do accept new images. Use \ref ImageCollection::uploadUrl to find the location to place the image, and \ref Interface::addImage() to tell the host application about the new image. */ ImagesHasTitlesWritable = 1 << 5, /** This feature specifies whether the plugin can change the title for images. */ CollectionsHaveCategory = 1 << 6, /** This feature specifies that collections are category associated to them ('travels', 'friends', 'monuments', etc.). */ CollectionsHaveCreationDate = 1 << 7, /** This feature specifies that collections are a creation date associated to them. */ HostSupportsProgressBar = 1 << 8, /** This feature specifies whether the host application has a progress manager available to report progress information from plugins. */ HostSupportsTags = 1 << 9, /** This feature specifies whether the host application supports keywords for images. */ HostSupportsRating = 1 << 10, /** This feature specifies whether the host application supports rating values for images. */ HostSupportsThumbnails = 1 << 11, /** This feature specifies that host application can provide image thumbnails. */ HostSupportsReadWriteLock = 1 << 12, /** This feature specifies that host application has mechanism to lock/unlock items to prevent concurrent operations. */ HostSupportsPickLabel = 1 << 13, /** This feature specifies whether the host application supports pick label values for images, used for photograph workflow. */ HostSupportsColorLabel = 1 << 14, /** This feature specifies whether the host application supports color label values for images, used to sort item with color flag. */ HostSupportsItemReservation = 1 << 15, /** This feature specifies whether the host application supports item reservation. */ HostSupportsPreviews = 1 << 16, /** This feature specifies that host application can provide image preview. */ HostSupportsRawProcessing = 1 << 17, /** This feature specifies that host application can process Raw files. */ HostSupportsMetadataProcessing = 1 << 18, /** This feature specifies that host application can process Metadata from files. */ HostSupportsSaveImages = 1 << 19 /** This feature specifies that host application can save image files. */ }; // NOTE: When a new item is add to Features, please don't forget to patch Interface::hasFeature(). enum EditHint { UndefinedEditHint = 0, /** The image data (pixels) have been edited */ HintPixelContentChanged = 1 << 0, /** Metadata have been edited */ HintMetadataChanged = 1 << 1, /** All changes done (typically, to the metadata) are also communicated via image attributes. * In other words, if the host updates its internal storage from attribute changes * and ignores changes on disk, it already has all information. */ HintChangeReflectedByAttributes = 1 << 2, /** The operation indicated as "about to be done" has been aborted / did not result in a change. */ HintEditAborted = 1 << 3, /** Short name, implies that only metadata changed, and all metadata changes are communicated via attributes. */ HintMetadataOnlyChange = HintMetadataChanged | HintChangeReflectedByAttributes }; Q_DECLARE_FLAGS(EditHints, EditHint) // --------------------------------------------------------------------------------------------------------------- class LIBKIPI_EXPORT FileReadWriteLock { public: /** * A Kipi FileReadWriteLock refers to application-wide reading/writing * to a file on disk; it is created with createReadWriteLock for an Url. * All semantics are identical to a recursive QReadWriteLock. * You must unlock as often as you locked. * * Note: locking will incur a mutex wait if the file is not free. * Therefore, calling the lock methods, especially lockForWrite, * from the UI thread shall be done with care, or rather avoided. * * Note that you must not keep a lock for a longer time, but only for the imminent * low-level reading or writing on disk. * * See reserveForAction() API for longer lasting reservation which * do not incur waits. * * It is strongly recommended to use the FileReadLocker or FileWriteLocker * convenience locks instead of creating and locking a FileReadWriteLock directly. */ virtual ~FileReadWriteLock() {} virtual void lockForRead() = 0; virtual void lockForWrite() = 0; virtual bool tryLockForRead() = 0; virtual bool tryLockForRead(int timeout) = 0; virtual bool tryLockForWrite() = 0; virtual bool tryLockForWrite(int timeout) = 0; virtual void unlock() = 0; }; // --------------------------------------------------------------------------------------------------------------- /** * A Kipi MetadataProcessor refers to application-wide to process file metadata * about Exif/Iptc/Xmp management; it is created with Interface::createMetadataProcessor(). * You can use libkexiv2 to re-implement this class as it's implemented in tests/common/kipiinterface.cpp. */ class LIBKIPI_EXPORT MetadataProcessor : public QObject { public: /** Image orientation values from Exif tag. */ enum ExifOrientation { UNSPECIFIED = 0, NORMAL = 1, HFLIP = 2, ROT_180 = 3, VFLIP = 4, ROT_90_HFLIP = 5, ROT_90 = 6, ROT_90_VFLIP = 7, ROT_270 = 8 }; public: MetadataProcessor() {}; ~MetadataProcessor() override {}; virtual bool load(const QUrl& url) = 0; virtual bool applyChanges() = 0; /** NOTE: writeToFileOnly force to write metadata only in file without to manage XMP sidecar file */ virtual bool save(const QUrl& url, bool writeToFileOnly=false) = 0; virtual QSize getPixelSize() = 0; virtual bool setImageProgramId(const QString& program, const QString& version) = 0; virtual QSize getImageDimensions() = 0; virtual bool setImageDimensions(const QSize& size) = 0; /** NOTE: orientation is standard value from Exif orientation tag. See ExifOrientation values. */ virtual int getImageOrientation() = 0; virtual bool setImageOrientation(int orientation) = 0; virtual bool rotateExifQImage(QImage& img, int orientation) = 0; virtual QDateTime getImageDateTime() = 0; virtual bool setImageDateTime(const QDateTime& dt) = 0; virtual bool getImagePreview(QImage& img) = 0; virtual bool setImagePreview(const QImage& img) = 0; virtual bool hasExif() = 0; virtual bool hasIptc() = 0; virtual bool hasXmp() = 0; virtual QByteArray getExif() = 0; virtual QByteArray getIptc() = 0; virtual QByteArray getXmp() = 0; virtual bool setExif(const QByteArray& data) = 0; virtual bool setIptc(const QByteArray& data) = 0; virtual bool setXmp(const QByteArray& data) = 0; virtual bool registerXmpNameSpace(const QString& uri, const QString& prefix) = 0; virtual bool supportXmp() = 0; virtual bool canWriteXmp(const QUrl& url) = 0; virtual bool removeExifTags(const QStringList& tagFilters) = 0; virtual bool removeIptcTags(const QStringList& tagFilters) = 0; virtual bool removeXmpTags(const QStringList& tagFilters) = 0; virtual bool getGPSInfo(double& altitude, double& latitude, double& longitude) = 0; virtual bool setGPSInfo(const double altitude, const double latitude, const double longitude) = 0; virtual bool removeGPSInfo() = 0; virtual QString getExifTagString(const QString& tag) = 0; virtual bool setExifTagString(const QString& tag, const QString& val) = 0; virtual bool getExifTagRational(const QString& tag, long int& num, long int& den) = 0; virtual bool setExifTagRational(const QString& tag, long int num, long int den) = 0; virtual QString getXmpTagString(const QString& tag) = 0; virtual bool setXmpTagString(const QString& tag, const QString& val) = 0; virtual QStringList getXmpKeywords() = 0; virtual bool setXmpKeywords(const QStringList& keywords) = 0; virtual QVariant getXmpTagVariant(const QString& tag) = 0; }; // --------------------------------------------------------------------------------------------------------------- class LIBKIPI_EXPORT Interface : public QObject { Q_OBJECT public: explicit Interface(QObject* const parent, const QString& name=QString()); ~Interface() override; /** * Tells whether the host application under which the plugin currently executes a given feature. * See KIPI::Features for details on the individual features. */ bool hasFeature(Features feature) const; /** * Returns list of all images in current album. * If there are no current album, the returned * KIPI::ImageCollection::isValid() will return false. */ virtual ImageCollection currentAlbum() = 0; /** * Current selection in a thumbnail view for example. * If there are no current selection, the returned * KIPI::ImageCollection::isValid() will return false. */ virtual ImageCollection currentSelection() = 0; /** * Returns a list of albums. */ virtual QList allAlbums() = 0; /** * Returns the image info container for item pointed by url. */ virtual ImageInfo info(const QUrl&) = 0; /** * Tells to host application that a new image has been made available to it. * Returns true if the host application did accept the new image, otherwise err will be filled with * an error description. */ virtual bool addImage(const QUrl&, QString& err); /** * Tells to host application that a new image has been removed. */ virtual void delImage(const QUrl&); /** * Tells to host application that the following images has changed on disk */ virtual void refreshImages(const QList&); /** * Tells to host application to render immediatly a preview image for one item. * This method re-implemented in host application and be thread safe. */ virtual QImage preview(const QUrl& url); /** * Tell to host application to save image at url in specific format (JPG, PNG, TIF, etc). * Pixels image data must be in ARGB, with image size (width,height). * Pixels can be in sixteen bits per color per pixels and can have an alpha channel. * If cancel flag is passed it permit to cancel save operation. * This method re-implemented in host application must be thread safe. */ virtual bool saveImage(const QUrl& url, const QString& format, const QByteArray& data, uint width, uint height, bool sixteenBit, bool hasAlpha, bool* cancel = nullptr); /** * Tells to host application to render a preview image for one item. * A resizement to a specific size will be generated if preview is largest than. * Use a positive resizedTo value in this case, else -1. Aspect ratio is preserved while rendering. * This asynchronous method must be re-implemented in host application. * Use gotPreview() signal to take preview. */ virtual void preview(const QUrl& url, int resizedTo); /** * Tells to host application to render a thumbnail for one item. This asynchronous method must be * re-implemented in host application. Use gotThumbnail() signal to take thumb. */ virtual void thumbnail(const QUrl& url, int size); /** * Ask to Kipi host application to render thumbnails for a list of images. This asynchronous method must be * re-implemented in host application. Use gotThumbnail() signal to take thumbs. */ virtual void thumbnails(const QList& list, int size); /** Ask to Kipi host application to prepare progress manager for a new entry. This method must return from host a string identification about progress item created. This id will be used later to change in host progress item value and text. Title is text used to name progress item in host application. Set canBeCanceled to true if you want that progress item provide a cancel button to close process from kipi host. Use progressCanceled() signal to manage feedback from kipi host when cancel button is pressed. Set hasThumb to true if you want that progress item support small thumbnail near progress bar. Use progresssThumbnailChanged() to change thumbnail in kipi host and progressValueChanged() to advance progress bar in percent. Use progressStatusChanged() to change description string of progress item. To close progress item in kipi host, for example when all is done in plugin, use progressCompleted() method. If you Host do not re-implement this method, value returned is a null string. You must re-implement this method if your host support HostSupportsProgressBar feature. */ virtual QString progressScheduled(const QString& title, bool canBeCanceled, bool hasThumb) const; /** To manage progress state from plugin to host application. id is identification string of process item * returned from host by progressScheduled() method. */ virtual void progressValueChanged(const QString& id, float percent); virtual void progressStatusChanged(const QString& id, const QString& status); virtual void progressThumbnailChanged(const QString& id, const QPixmap& thumb); virtual void progressCompleted(const QString& id); /** Returns RAW file extensions managed by host application, separated by blank spaces, (ex: "NEF CR2 ARW PEF"). */ virtual QString rawFiles(); virtual ImageCollectionSelector* imageCollectionSelector(QWidget* parent)=0; virtual UploadWidget* uploadWidget(QWidget* parent)=0; virtual QAbstractItemModel* getTagTree() const; /** * Supported if HostSupportsItemReservation * * If an item is scheduled in a plugin for an action which will edit the object, * call this method. If the user tries to subject the reserved item to another operation, * possibly conflicting, a warning message or other action may be taken. * * Give the URL of the item and a QObject which acts as the holder of the reservation. * The object must not be null, and the reservation will be cancelled when the object is deleted. * descriptionOfAction is a user-presentable string describing the action for which * the reservation was made. * * Returns true if a reservation was made, or false if a reservation could not be made. */ virtual bool reserveForAction(const QUrl& url, QObject* const reservingObject, const QString& descriptionOfAction) const; /** * Supported if HostSupportsItemReservation * * Clears a reservation made previously with reserveForAction for the given reservingObject. * You must clear any reservation you made, or, alternatively, delete the reserving object. */ virtual void clearReservation(const QUrl& url, QObject* const reservingObject); /** * Supported if HostSupportsItemReservation * * Returns if the item is reserved. You can pass a pointer to a QString; if the return value * is true, the string will be set to the descriptionOfAction set with reserveForAction. */ virtual bool itemIsReserved(const QUrl& url, QString* const descriptionOfAction = nullptr) const; /** * Supported if HostSupportsReadWriteLock * Creates a ReadWriteLock for the given Url. * You must unlock the ReadWriteLock as often as you locked. * Deleting the object does not unlock it. * The implementation from KIPI host application must be thread-safe. * */ virtual FileReadWriteLock* createReadWriteLock(const QUrl& url) const; /** * Supported if HostSupportsMetadataProcessing. * Creates an instance of MetadataProcessor dedicated to manage file metadata. * The implementation from KIPI host application must be thread-safe. * */ virtual MetadataProcessor* createMetadataProcessor() const; /** * Supported if HostSupportsEditHints * * Before an edit operation starts when it has finished, specify a hint for it. * Change hints are optional and may allow optimizations. * * When aboutToEdit has been called, editingFinished must be called afterwards. * It is strongly recommended to use the EditHintScope instead of these methods. */ virtual void aboutToEdit(const QUrl& url, EditHints hints); virtual void editingFinished(const QUrl& url, EditHints hints); /** * Returns a string version of libkipi release ID. */ static QString version(); /** * Return a list of supported image type mimes by Qt image reader. * 'readWrite' query Qt to list type mimes in read mode (false), or in write mode (true). */ static QStringList supportedImageMimeTypes(bool readWrite=false); Q_SIGNALS: /** * Emit when item selection has changed from host application user interface. * Boolean argument is true if items are select or not in collection. */ void selectionChanged(bool hasSelection); /** * Emit when current album selection as changed from host application user interface. * Boolean argument is true if album are select or not in collection. */ void currentAlbumChanged(bool hasSelection); /** Emit when host application has rendered item thumbnail. See asynchronous thumbnail() and thumbnails() * methods for details. */ void gotThumbnail(const QUrl&, const QPixmap&); /** Emit when host application has rendered item preview image. See asynchronous preview() methods for details. */ void gotPreview(const QUrl&, const QImage&); /** * This signal is emit from kipi host when a progress item is canceled. id is identification string of progress item. */ void progressCanceled(const QString& id); /** * Supported if HostSupportsItemReservation * * Emitted from reservedForAction and clearReservation, respectively. * */ void reservedForAction(const QUrl& url, const QString& descriptionOfAction); void reservationCleared(const QUrl& url); protected: /** * Return a bitwise or of the KIPI::Features that thus application support. */ virtual int features() const = 0; private: bool hasFeature(const QString& feature) const; private: friend class PluginLoader; }; // --------------------------------------------------------------------------------------------------------------- /** * Convenience classes creating a FileReadWriteLock and locking it for you. * It is strongly recommended to use FileReadWriteLock only through these * classes, created on the stack, as unlocking will be done automatically for you. * * The API is modelled according to the QReadLocker/QWriteLocker classes. * * Note that operations are no-ops and fileReadWriteLock() is 0 if not HostSupportsReadWriteLock. */ class LIBKIPI_EXPORT FileReadLocker { public: FileReadLocker(Interface* const iface, const QUrl& url); FileReadLocker(ImageInfoShared* const info); ~FileReadLocker(); FileReadWriteLock* fileReadWriteLock() const; void unlock(); void relock(); private: FileReadWriteLock* const d; }; // --------------------------------------------------------------------------------------------------------------- class LIBKIPI_EXPORT FileWriteLocker { public: FileWriteLocker(Interface* const iface, const QUrl& url); FileWriteLocker(ImageInfoShared* const info); ~FileWriteLocker(); FileReadWriteLock* fileReadWriteLock() const; void unlock(); void relock(); private: FileReadWriteLock* const d; }; // --------------------------------------------------------------------------------------------------------------- class LIBKIPI_EXPORT EditHintScope { public: EditHintScope(Interface* const iface, const QUrl& url, EditHints hints); ~EditHintScope(); void changeAborted(); private: class Private; Private* const d; }; } // namespace KIPI Q_DECLARE_OPERATORS_FOR_FLAGS(KIPI::EditHints) #endif /* KIPI_INTERFACE_H */ diff --git a/src/libkipi_debug.h b/src/libkipi_debug.h index 1b8d8c5..d5741a2 100644 --- a/src/libkipi_debug.h +++ b/src/libkipi_debug.h @@ -1,27 +1,27 @@ /* This file is part of the KDE project Copyright (C) 2014 Laurent Montel This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #ifndef LIBKIPI_DEBUG_H #define LIBKIPI_DEBUG_H -#include +#include Q_DECLARE_LOGGING_CATEGORY(LIBKIPI_LOG) #endif // LIBKIPI_DEBUG_H diff --git a/src/plugin.h b/src/plugin.h index f222b09..955414c 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -1,219 +1,219 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-01 * @brief plugin interface * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2012 by Victor Dodon * dodonvictor at gmail dot com * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2004-2005 by Jesper K. Pedersen * blackie at kde dot org * @author Copyright (C) 2004-2005 by Aurelien Gateau * aurelien dot gateau at free dot fr * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_PLUGIN_H #define KIPI_PLUGIN_H // Qt includes -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // KDE includes #include // Local includes #include "libkipi_export.h" class QAction; namespace KIPI { class Interface; enum Category { InvalidCategory = -1, ImagesPlugin = 0, ToolsPlugin, ImportPlugin, ExportPlugin, BatchPlugin, CollectionsPlugin }; /** * @short Base class for the KIPI plugins * */ class LIBKIPI_EXPORT Plugin : public QObject, public KXMLGUIClient { Q_OBJECT typedef QList QDomElemList; typedef QHash QHashPath; typedef QMap > ActionCategoryMap; public: /** * Constructs a plugin * * @param parent the parent of this object * @param name the name of the plugin */ Plugin(QObject* const parent, const char* name); /** * Standard destructor * * All the actions in the actionCollection are deleted before the plugin is * deleted */ ~Plugin() override; /** * Returns the plugin actions associated with the widget passed as argument, or with * the default widget, if widget is null or not provided. The actions are in * the same order as added to the plugin. */ QList actions(QWidget* const widget = nullptr) const; /** * Returns the KIPI::Interface */ Interface* interface() const; /** * Virtual method that must be overridden by the non abstract descendants and * must be called before any actions are added. * * @param widget The widget which holds the plugin. It will be set as the default widget. */ virtual void setup(QWidget* const widget) = 0; /** * Returns the category of the specified plugin action, or InvalidCategory * if the action is not recognised */ Category category(QAction* const action) const; /** * Force the plugin to reread and to reload its xml file */ void rebuild(); protected: /** * Register an action to the plugin instance and add it to the action collection. * * The action is added only if the action name is not in the disabled actions * list of the PluginLoader singleton class. * * @param name the name by which the action will be added to the action collection * @param action the action to add * * @note It just calls addAction with the default category, so the default * category must be set using setDefaultCategory before you use this method */ void addAction(const QString& name, QAction* const action); /** * Register action to the plugin instance and add it to the action collection * * The action is added only if the action name is not in the disabled actions * list of the PluginLoader singleton class. * * @param name the name by which the action will be added to the action collection * @param action the action to add * @param cat the category of the action */ void addAction(const QString& name, QAction* const action, Category cat); /** * Sets the default category of the plugin actions * * \sa defaultCategory() */ void setDefaultCategory(Category cat); /** * Returns the default category of the plugin actions * * \sa setDefaultCategory() */ Category defaultCategory() const; /** * Sets the name of the xml file associated with this KXMLGUIClient. You must * provide only the filename without slashes. * * The default xml file must be installed in the ${DATA_INSTALL_DIR}/kipi, * modifications are stored in the local config dir of the KGlobal::mainComponent * * \sa uiBaseName() */ void setUiBaseName(const char* name); /** * Return the base name of the xml file associated with this KXMLGUIClient * * \sa setUiBaseName() */ QString uiBaseName() const; /** * Adapt the xml file of the plugin with the one of the KXmlGuiWindow main window. * It's recommended to call it on every creation of the plugin. * * @note the xml file of the plugin must be set using setUiBaseName() */ void setupXML(); private: /** For internal uses only */ void addAction(QAction* const action); void addAction(QAction* const action, Category cat); void mergeXMLFile(KXMLGUIClient* const host); void clearActions(); private: class Private; Private* const d; }; } // namespace KIPI #endif // KIPI_PLUGIN_H diff --git a/src/pluginloader.h b/src/pluginloader.h index af207f3..dfeafa4 100644 --- a/src/pluginloader.h +++ b/src/pluginloader.h @@ -1,323 +1,323 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2004-02-01 * @brief plugin loader * * @author Copyright (C) 2004-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * @author Copyright (C) 2004-2005 by Renchi Raju * renchi dot raju at gmail dot com * @author Copyright (C) 2009 by Andi Clemens * andi dot clemens at googlemail dot com * @author Copyright (C) 2009 by Aleix Pol Gonzalez * aleixpol at kde dot org * @author Copyright (C) 2012 by Victor Dodon * dodonvictor at gmail dot com * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_PLUGINLOADER_H #define KIPI_PLUGINLOADER_H // Qt includes -#include +#include // KDE includes #include #include // Local includes #include "libkipi_export.h" namespace KIPI { class Plugin; class Interface; class ConfigWidget; /** \author Gilles Caulier \par Maintainer: Victor Dodon \class PluginLoader This is the class that will help host applications to load plugins. The host application must create an instance of the plugin loader, and call the method loadPlugins() to get the plugins loaded. To ensure that plugins are correctly removed from menus and toolbars when loaded and unloaded after constructions, the application must connect to either the signals plug() / unplug() or the signal replug(). These signals are emitted when a plugin is to be inserted into the menus. If your application is using KDE XMLGUI, the easiest(nicest) way to get the plugins inserted into the menus is by adding an item in your application XML ui.rc file looking like this: \code &Image &Tools Main Toolbar \endcode Then loading plugins into menus could be done with code similar to this implementation: \code class MyKipiApplication : public KXmlGuiWindow { Q_OBJECT public: MyKipiApplication(); private Q_SLOTS: void slotKipiPluginPlug(); private: KIPI::Interface* m_iface; KIPI::PluginLoader* m_loader; }; // ------------------------------------------------------------------------------- MyKipiApplication::MyKipiApplication() : KXmlGuiWindow(0) { m_iface = new KIPI::Interface(this, "MyKipiApplication_KIPI_interface"); m_loader = new KIPI::PluginLoader(this); m_loader->setInterface(m_iface); m_loader->init(); connect(m_loader, SIGNAL(replug()), this, SLOT(slotKipiPluginPlug())); m_loader->loadPlugins(); } void MyKipiApplication::slotKipiPluginPlug() { QList kipiImageActions, kipiExportActions, kipiToolsActions; PluginLoader::PluginList list = m_loader->pluginList(); // We need to remove loaded plugins from the gui factory for (PluginLoader::PluginList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) { Plugin* plugin = (*it)->plugin(); if ( !plugin || !(*it)->shouldLoad() ) continue; guiFactory()->removeClient(plugin); } for (PluginLoader::PluginList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) { Plugin* plugin = (*it)->plugin(); if ( !plugin || !(*it)->shouldLoad() ) continue; plugin->setup(this); } // We add plugins to the factory for (PluginLoader::PluginList::ConstIterator it = list.constBegin(); it != list.constEnd(); ++it ) { Plugin* plugin = (*it)->plugin(); if ( !plugin || !(*it)->shouldLoad() ) continue; guiFactory()->addClient(plugin); } } \endcode For a implementation sample used to manage Kipi-plugins in host application, look the code of the kxmlkipicmd test application in the "test" folder from libkipi. To configure which plugins should be loaded, simply call PluginLoader::configWidget(), and insert the widget into your normal configuration dialog. */ class LIBKIPI_EXPORT PluginLoader : public QObject { Q_OBJECT public: class LIBKIPI_EXPORT Info { public: Info(KXmlGuiWindow* const parent, const KService::Ptr& service, bool shouldLoad); ~Info(); QString name() const; QString uname() const; QString author() const; QString comment() const; QIcon icon() const; QString library() const; KService::Ptr service() const; Plugin* plugin() const; QStringList pluginCategories() const; void reload(); bool shouldLoad() const; void setShouldLoad(bool); private: class Private; Private* const d; }; public: typedef QList PluginList; public: /** * Use this constructor if your application does not use KDE XML GUI technology */ PluginLoader(); /** * Standard constructor. You must pass the instance of KDE XML GUI application as argument. * @param parent the pointer to the KXmlGuiWindow of your application */ PluginLoader(KXmlGuiWindow* const parent); /** * Standard destructor */ ~PluginLoader() override; /** * Set KIPI interface instance from host application. */ void setInterface(Interface* const interface); /** * Return KIPI host interface instance. */ Interface* interface() const; /** * Set Plugins ignore list, with name of obsoletes plugins to not load through init(). */ void setIgnoredPluginsList(const QStringList& ignores); /** * Set disabled plugin actions that will not be plugged into the gui, */ void setDisabledPluginActions(const QStringList& disabledActions); /** * Return the list of disabled plugin actions */ QStringList disabledPluginActions() const; /** * Init plugin loader. Call this method to parse relevant plugins installed on your system. * Before to call this method, you must setup KIPI interface instance. * Optionally, setup list of plugins to ignore, the constraint list, and * the disabled plugin actions */ void init(); /** * Call this method to load relevant plugins installed on your system to your KIPI host application * NOTE: plugins can be loaded through Info item. */ void loadPlugins(); /** * Returns the list of loaded plugins */ const PluginList& pluginList(); /** * Return the kipi-plugins version installed on your computer if it's found through kipiplugins.desktop file. */ QString kipiPluginsVersion() const; /** * Return the config widget with list of plugins to manage. */ ConfigWidget* configWidget(QWidget* const parent) const; /** * Returns plugin loader instance. */ static PluginLoader* instance(); Q_SIGNALS: void plug(KIPI::PluginLoader::Info*); void unplug(KIPI::PluginLoader::Info*); // NOTE: plugin can be plugged through Info item. void replug(); private: class Private; Private* const d; private: friend class ConfigWidget; }; } // namespace KIPI #endif /* KIPI_PLUGINLOADER_H */ diff --git a/src/uploadwidget.h b/src/uploadwidget.h index 10deeef..89031d1 100644 --- a/src/uploadwidget.h +++ b/src/uploadwidget.h @@ -1,62 +1,62 @@ /** =========================================================== * @file * * This file is a part of KDE project * * * @date 2008-02-26 * @brief template widget to upload items in collection * * @author Copyright (C) 2008-2018 by Gilles Caulier * caulier dot gilles at gmail dot com * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General * Public License as published by the Free Software Foundation; * either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * ============================================================ */ #ifndef KIPI_UPLOADWIDGET_H #define KIPI_UPLOADWIDGET_H // Qt includes -#include +#include // Local includes #include "libkipi_export.h" namespace KIPI { class ImageCollection; /** Re-implement this widget in your KIPI host application to use your dedicated model/view */ class LIBKIPI_EXPORT UploadWidget : public QWidget { Q_OBJECT public: UploadWidget(QWidget* const parent); ~UploadWidget() override; virtual ImageCollection selectedImageCollection() const; Q_SIGNALS: void selectionChanged(); }; } // namespace KIPI #endif /* KIPI_UPLOADWIDGET_H */