#include <KoFilter.h>
Graphe d'héritage de KoFilter:
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 | |
KoFilterChain * | m_chain |
Fonctions membres privées | |
KoFilter (const KoFilter &rhs) | |
KoFilter & | operator= (const KoFilter &rhs) |
Attributs privés | |
Private * | d |
Amis | |
class | KoFilterEntry |
class | KoFilterChain |
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.
Définition à la ligne 48 du fichier KoFilter.h.
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.
Définition à la ligne 62 du fichier KoFilter.h.
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] |
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.
from | The mimetype of the source file/document | |
to | The mimetype of the destination file/document |
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.
value | The actual progress state. Should always remain in the range 1..100. |
friend class KoFilterEntry [friend] |
Définition à la ligne 52 du fichier KoFilter.h.
friend class KoFilterChain [friend] |
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] |