KIPI::Interface

Search for usage in LXR

#include <KIPI/Interface>

Inheritance diagram for KIPI::Interface:

Signals

void currentAlbumChanged (bool hasSelection)
 
void gotPreview (const QUrl &, const QImage &)
 
void gotThumbnail (const QUrl &, const QPixmap &)
 
void progressCanceled (const QString &id)
 
void reservationCleared (const QUrl &url)
 
void reservedForAction (const QUrl &url, const QString &descriptionOfAction)
 
void selectionChanged (bool hasSelection)
 

Public Member Functions

 Interface (QObject *const parent, const QString &name=QString())
 
virtual void aboutToEdit (const QUrl &url, EditHints hints)
 
virtual bool addImage (const QUrl &, QString &err)
 
virtual QList< ImageCollectionallAlbums ()=0
 
virtual void clearReservation (const QUrl &url, QObject *const reservingObject)
 
virtual MetadataProcessorcreateMetadataProcessor () const
 
virtual FileReadWriteLockcreateReadWriteLock (const QUrl &url) const
 
virtual ImageCollection currentAlbum ()=0
 
virtual ImageCollection currentSelection ()=0
 
virtual void delImage (const QUrl &)
 
virtual void editingFinished (const QUrl &url, EditHints hints)
 
virtual QAbstractItemModelgetTagTree () const
 
bool hasFeature (Features feature) const
 
virtual ImageCollectionSelectorimageCollectionSelector (QWidget *parent)=0
 
virtual ImageInfo info (const QUrl &url)=0
 
virtual bool itemIsReserved (const QUrl &url, QString *const descriptionOfAction=nullptr) const
 
virtual QImage preview (const QUrl &url)
 
virtual void preview (const QUrl &url, int resizedTo)
 
virtual void progressCompleted (const QString &id)
 
virtual QString progressScheduled (const QString &title, bool canBeCanceled, bool hasThumb) const
 
virtual void progressStatusChanged (const QString &id, const QString &status)
 
virtual void progressThumbnailChanged (const QString &id, const QPixmap &thumb)
 
virtual void progressValueChanged (const QString &id, float percent)
 
virtual QString rawFiles ()
 
virtual void refreshImages (const QList< QUrl > &)
 
virtual bool reserveForAction (const QUrl &url, QObject *const reservingObject, const QString &descriptionOfAction) const
 
virtual bool saveImage (const QUrl &url, const QString &format, const QByteArray &data, uint width, uint height, bool sixteenBit, bool hasAlpha, bool *cancel=nullptr)
 
virtual void thumbnail (const QUrl &url, int size)
 
virtual void thumbnails (const QList< QUrl > &list, int size)
 
virtual UploadWidgetuploadWidget (QWidget *parent)=0
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Static Public Member Functions

static QStringList supportedImageMimeTypes (bool readWrite=false)
 
static QString version ()
 
- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 

Protected Member Functions

virtual int features () const =0
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

Additional Inherited Members

- Properties inherited from QObject
 objectName
 
- Public Attributes inherited from QObject
typedef QObjectList
 

Detailed Description

The Interface class.

Definition at line 259 of file interface.h.

Member Function Documentation

void KIPI::Interface::aboutToEdit ( const QUrl url,
EditHints  hints 
)
virtual

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.

Definition at line 286 of file interface.cpp.

bool KIPI::Interface::addImage ( const QUrl ,
QString err 
)
virtual

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.

Definition at line 121 of file interface.cpp.

QList< ImageCollection > KIPI::Interface::allAlbums ( )
pure virtual

Returns a list of albums.

Definition at line 144 of file interface.cpp.

void KIPI::Interface::clearReservation ( const QUrl url,
QObject *const  reservingObject 
)
virtual

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.

Definition at line 263 of file interface.cpp.

MetadataProcessor * KIPI::Interface::createMetadataProcessor ( ) const
virtual

Supported if HostSupportsMetadataProcessing.

Creates an instance of MetadataProcessor dedicated to manage file metadata. The implementation from KIPI host application must be thread-safe.

Definition at line 280 of file interface.cpp.

FileReadWriteLock * KIPI::Interface::createReadWriteLock ( const QUrl url) const
virtual

Supported if HostSupportsReadWriteLock Creates a ReadWriteLock for the given URL.

You must unlock the FileReadWriteLock as often as you locked. Deleting the object does not unlock it. The implementation from KIPI host application must be thread-safe.

Definition at line 274 of file interface.cpp.

ImageCollection KIPI::Interface::currentAlbum ( )
pure virtual

Returns list of all images in current album.

If there are no current album, the returned KIPI::ImageCollection::isValid() will return false.

Definition at line 132 of file interface.cpp.

void KIPI::Interface::currentAlbumChanged ( bool  hasSelection)
signal

Emit when current album selection as changed from host application user interface.

Parameters
hasSelectiontrue if album are select or not in collection.
ImageCollection KIPI::Interface::currentSelection ( )
pure virtual

Current selection in a thumbnail view for example.

If there are no current selection, the returned KIPI::ImageCollection::isValid() will return false.

Definition at line 138 of file interface.cpp.

void KIPI::Interface::delImage ( const QUrl )
virtual

Tells to host application that a new image has been removed.

Definition at line 127 of file interface.cpp.

int KIPI::Interface::features ( ) const
protectedpure virtual

Return a bitwise or of the KIPI::Features that thus application support.

Definition at line 150 of file interface.cpp.

void KIPI::Interface::gotPreview ( const QUrl ,
const QImage  
)
signal

Emit when host application has rendered item preview image.

See asynchronous preview() methods for details.

void KIPI::Interface::gotThumbnail ( const QUrl ,
const QPixmap  
)
signal

Emit when host application has rendered item thumbnail.

See asynchronous thumbnail() and thumbnails() methods for details.

bool KIPI::Interface::hasFeature ( Features  feature) const

Tells whether the host application under which the plugin currently executes a given feature.

See KIPI::Features for details on the individual features.

Definition at line 71 of file interface.cpp.

virtual ImageInfo KIPI::Interface::info ( const QUrl url)
pure virtual

Returns the image info container for item pointed by url.

bool KIPI::Interface::itemIsReserved ( const QUrl url,
QString *const  descriptionOfAction = nullptr 
) const
virtual

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().

Definition at line 268 of file interface.cpp.

QImage KIPI::Interface::preview ( const QUrl url)
virtual

Tells to host application to render immediatly a preview image for one item.

This method re-implemented in host application and be thread safe.

Definition at line 173 of file interface.cpp.

void KIPI::Interface::preview ( const QUrl url,
int  resizedTo 
)
virtual

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.

Definition at line 199 of file interface.cpp.

void KIPI::Interface::progressCanceled ( const QString id)
signal

This signal is emit from kipi host when a progress item is canceled.

id is identification string of progress item.

QString KIPI::Interface::progressScheduled ( const QString title,
bool  canBeCanceled,
bool  hasThumb 
) const
virtual

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.

Definition at line 221 of file interface.cpp.

void KIPI::Interface::progressValueChanged ( const QString id,
float  percent 
)
virtual

To manage progress state from plugin to host application.

Parameters
ididentification string of process item returned from host by progressScheduled() method.

Definition at line 230 of file interface.cpp.

QString KIPI::Interface::rawFiles ( )
virtual

Returns RAW file extensions managed by host application, separated by blank spaces, (ex: "NEF CR2 ARW PEF").

Definition at line 209 of file interface.cpp.

void KIPI::Interface::refreshImages ( const QList< QUrl > &  )
virtual

Tells to host application that the following images has changed on disk.

Definition at line 66 of file interface.cpp.

void KIPI::Interface::reservedForAction ( const QUrl url,
const QString descriptionOfAction 
)
signal

Supported if HostSupportsItemReservation.

Emitted from reservedForAction() and clearReservation(), respectively.

bool KIPI::Interface::reserveForAction ( const QUrl url,
QObject *const  reservingObject,
const QString descriptionOfAction 
) const
virtual

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.

Parameters
descriptionOfActiona 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.

Definition at line 257 of file interface.cpp.

bool KIPI::Interface::saveImage ( const QUrl url,
const QString format,
const QByteArray data,
uint  width,
uint  height,
bool  sixteenBit,
bool  hasAlpha,
bool *  cancel = nullptr 
)
virtual

Tell to host application to save image at a 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.

Definition at line 181 of file interface.cpp.

void KIPI::Interface::selectionChanged ( bool  hasSelection)
signal

Emit when item selection has changed from host application user interface.

Parameters
hasSelectionset true if items are select or not in collection.
QStringList KIPI::Interface::supportedImageMimeTypes ( bool  readWrite = false)
static

Return a list of supported image MIME types by Qt image reader.

Parameters
readWritequery Qt to list MIME types in read mode (false), or in write mode (true).

Definition at line 294 of file interface.cpp.

void KIPI::Interface::thumbnail ( const QUrl url,
int  size 
)
virtual

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.

Definition at line 156 of file interface.cpp.

void KIPI::Interface::thumbnails ( const QList< QUrl > &  list,
int  size 
)
virtual

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.

Definition at line 161 of file interface.cpp.

QString KIPI::Interface::version ( )
static

Returns a string version of libkipi release ID.

Definition at line 61 of file interface.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jan 20 2022 22:32:03 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.