Référence de la classe KoFilter

The base class for import and export filters. Plus de détails...

#include <KoFilter.h>

Graphe d'héritage de KoFilter:

[légende]
Graphe de collaboration de KoFilter:
[légende]
Liste de tous les membres

Types publics

enum  ConversionStatus {
  OK, StupidError, UsageError, CreationError,
  FileNotFound, StorageCreationError, BadMimeType, BadConversionGraph,
  EmbeddedDocError, WrongFormat, NotImplemented, ParsingError,
  InternalError, UnexpectedEOF, UnexpectedOpcode, UserCancelled,
  OutOfMemory, PasswordProtected, JustInCaseSomeBrokenCompilerUsesLessThanAByte = 255
}

Signaux

void sigProgress (int value)

Fonctions membres publiques

virtual ~KoFilter ()
virtual ConversionStatus convert (const QByteArray &from, const QByteArray &to)=0

Fonctions membres protégées

 KoFilter (QObject *parent=0)

Attributs protégés

KoFilterChainm_chain

Fonctions membres privées

 KoFilter (const KoFilter &rhs)
KoFilteroperator= (const KoFilter &rhs)

Attributs privés

Private * d

Amis

class KoFilterEntry
class KoFilterChain

Description détaillée

The base class for import and export filters.

Derive your filter class from this base class and implement the convert() method. Don't forget to specify the Q_OBJECT macro in your class even if you don't use signals or slots. This is needed as filters are created on the fly. The m_chain member allows access to the KoFilterChain which invokes the filter to query for input/output.

Note:
Take care: The m_chain pointer is invalid while the constructor runs due to the implementation -- don't use it in the constructor. After the constructor, when running the convert() method it's guaranteed to be valid, so no need to check against 0.
Auteur:
Werner Trobin <trobin@kde.org>
À faire:
the class has no constructor and therefore cannot initialize its private class

Définition à la ligne 48 du fichier KoFilter.h.


Documentation des énumérations membres

enum KoFilter::ConversionStatus

This enum is used to signal the return state of your filter. Return OK in convert() in case everything worked as expected. Feel free to add some more error conditions before the last item if it's needed.

Valeurs énumérées:
OK 
StupidError 
UsageError 
CreationError 
FileNotFound 
StorageCreationError 
BadMimeType 
BadConversionGraph 
EmbeddedDocError 
WrongFormat 
NotImplemented 
ParsingError 
InternalError 
UnexpectedEOF 
UnexpectedOpcode 
UserCancelled 
OutOfMemory 
PasswordProtected 
JustInCaseSomeBrokenCompilerUsesLessThanAByte 

Définition à la ligne 62 du fichier KoFilter.h.


Documentation des contructeurs et destructeur

KoFilter::~KoFilter (  )  [virtual]

Définition à la ligne 36 du fichier KoFilter.cpp.

KoFilter::KoFilter ( QObject *  parent = 0  )  [protected]

This is the constructor your filter has to call, obviously.

Définition à la ligne 32 du fichier KoFilter.cpp.

KoFilter::KoFilter ( const KoFilter rhs  )  [private]


Documentation des fonctions membres

virtual ConversionStatus KoFilter::convert ( const QByteArray &  from,
const QByteArray &  to 
) [pure virtual]

The filter chain calls this method to perform the actual conversion. The passed mimetypes should be a pair of those you specified in your .desktop file. You have to implement this method to make the filter work.

Paramètres:
from The mimetype of the source file/document
to The mimetype of the destination file/document
Renvoie:
The error status, see the ConversionStatus enum. KoFilter::OK means that everything is alright.

Référencé par KoFilterChain::ChainLink::invokeFilter().

Voici le graphe d'appel pour cette fonction :

void KoFilter::sigProgress ( int  value  )  [signal]

Emit this signal with a value in the range of 1...100 to have some progress feedback for the user in the statusbar of the application.

Paramètres:
value The actual progress state. Should always remain in the range 1..100.

KoFilter& KoFilter::operator= ( const KoFilter rhs  )  [private]


Documentation des fonctions amies et associées

friend class KoFilterEntry [friend]

Définition à la ligne 52 du fichier KoFilter.h.

friend class KoFilterChain [friend]

Réimplémentée dans KoEmbeddingFilter.

Définition à la ligne 53 du fichier KoFilter.h.


Documentation des données membres

KoFilterChain* KoFilter::m_chain [protected]

Use this pointer to access all information about input/output during the conversion. Don't use it in the constructor - it's invalid while constructing the object!

Définition à la ligne 106 du fichier KoFilter.h.

Référencé par KoFilterEntry::createFilter(), KoEmbeddingFilter::embedPart(), KoEmbeddingFilter::filterChainEnterDirectory(), et KoEmbeddingFilter::filterChainLeaveDirectory().

Private* KoFilter::d [private]

Réimplémentée dans KoEmbeddingFilter.

Définition à la ligne 112 du fichier KoFilter.h.


La documentation de cette classe a été générée à partir des fichiers suivants :
Généré le Wed Nov 22 23:45:25 2006 pour KPlato par  doxygen 1.5.1-p1