#include <KoFilterManager.h>
Graphe de collaboration de KoFilterManager:
Types publics | |
enum | Direction { Import = 1, Export = 2 } |
Signaux | |
void | sigProgress (int) |
Fonctions membres publiques | |
KoFilterManager (KoDocument *document) | |
KoFilterManager (const QString &url, const QByteArray &mimetypeHint="", KoFilterChain *const parentChain=0) | |
virtual | ~KoFilterManager () |
QString | import (const QString &url, KoFilter::ConversionStatus &status) |
KoFilter::ConversionStatus | exp0rt (const QString &url, QByteArray &mimeType) |
Exports the given file/document to the specified URL/mimetype. | |
void | setBatchMode (const bool batch) |
bool | getBatchMode (void) const |
Fonctions membres publiques statiques | |
Static API | |
static KOFFICECORE_EXPORT QStringList | mimeFilter (const QByteArray &mimetype, Direction direction, const QStringList &extraNativeMimeTypes=QStringList()) |
static QStringList | mimeFilter () |
static bool | filterAvailable (KoFilterEntry::Ptr entry) |
Fonctions membres privées | |
QString | importFile () const |
QString | exportFile () const |
KoDocument * | document () const |
int | direction () const |
KoFilterChain *const | parentChain () const |
KoFilterManager (const KoFilterManager &rhs) | |
KoFilterManager & | operator= (const KoFilterManager &rhs) |
void | importErrorHelper (const QString &mimeType, const bool suppressDialog=false) |
Attributs privés | |
KoDocument * | m_document |
KoFilterChain *const | m_parentChain |
QString | m_importUrl |
QString | m_exportUrl |
QByteArray | m_importUrlMimetypeHint |
suggested mimetype | |
KOffice::Graph | m_graph |
Direction | m_direction |
Private * | d |
Attributs privés statiques | |
static const int | s_area |
static QMap< QString, bool > | m_filterAvailable |
A static cache for the availability checks of filters. | |
Amis | |
QString | KoFilterChain::filterManagerImportFile () const |
QString | KoFilterChain::filterManagerExportFile () const |
KoDocument * | KoFilterChain::filterManagerKoDocument () const |
int | KoFilterChain::filterManagerDirection () const |
KoFilterChain *const | KoFilterChain::filterManagerParentChain () const |
Classes | |
class | Private |
This class manages all filters for a KOffice application. Normally you will not have to use it, since KoMainWindow takes care of loading and saving documents.
Définition à la ligne 46 du fichier KoFilterManager.h.
This enum is used to distinguish the import/export cases
Définition à la ligne 53 du fichier KoFilterManager.h.
KoFilterManager::KoFilterManager | ( | KoDocument * | document | ) |
Create a filter manager for a document
Définition à la ligne 125 du fichier KoFilterManager.cpp.
Références d, document(), et sigProgress().
Voici le graphe d'appel pour cette fonction :
KoFilterManager::KoFilterManager | ( | const QString & | url, | |
const QByteArray & | mimetypeHint = "" , |
|||
KoFilterChain *const | parentChain = 0 | |||
) |
Create a filter manager for a filter which wants to embed something. The url it passes is the file to convert, obviously. You cannot use the import() method -- use exp0rt() to convert the file to the destination mimetype you prefer.
url | The file you want to export | |
mimetypeHint | The mimetype of the file you want to export. You have to specify this information only if the automatic detection will fail because e.g. you saved an embedded stream to a *.tmp file. Most likely you do not have to care about that. | |
parentChain | The parent filter chain of this filter manager. Used to allow embedding for filters. Most likely you do not have to care. |
Définition à la ligne 136 du fichier KoFilterManager.cpp.
Références d.
KoFilterManager::~KoFilterManager | ( | ) | [virtual] |
KoFilterManager::KoFilterManager | ( | const KoFilterManager & | rhs | ) | [private] |
QString KoFilterManager::import | ( | const QString & | url, | |
KoFilter::ConversionStatus & | status | |||
) |
Imports the passed URL and returns the resultant filename (most likely some file in /tmp). The status
variable signals the success/error of the conversion If the QString which is returned isEmpty() and the status is OK, then we imported the file directly into the document.
Définition à la ligne 150 du fichier KoFilterManager.cpp.
Références KoFilter::BadConversionGraph, KOffice::Graph::chain(), KoDocument::extraNativeMimeTypes(), gensymbolfontmap::f, KoFilterChooser::filterSelected(), Import, importErrorHelper(), KoDocument::isAutoErrorHandlingEnabled(), KOffice::Graph::isValid(), m_direction, m_document, m_exportUrl, m_graph, m_importUrl, mimeFilter(), KoDocument::nativeFormatMimeType(), KoFilter::OK, s_area, KOffice::Graph::setSourceMimeType(), et KoFilter::UsageError.
Référencé par KoDocument::openFile().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
KoFilter::ConversionStatus KoFilterManager::exp0rt | ( | const QString & | url, | |
QByteArray & | mimeType | |||
) |
Exports the given file/document to the specified URL/mimetype.
If mimeType
is empty, then the closest matching KOffice part is searched and when the method returns mimeType
contains this mimetype. Oh, well, export is a C++ keyword ;)
Définition à la ligne 243 du fichier KoFilterManager.cpp.
Références KoFilter::BadConversionGraph, KoFilter::BadMimeType, KOffice::Graph::chain(), Export, KoDocument::extraNativeMimeTypes(), KoFilterChooser::filterSelected(), KOffice::Graph::isValid(), m_direction, m_document, m_exportUrl, m_graph, m_importUrl, m_importUrlMimetypeHint, mimeFilter(), KoDocument::nativeFormatMimeType(), s_area, et KOffice::Graph::setSourceMimeType().
Référencé par KoEmbeddingFilter::embedPart(), et KoDocument::saveFile().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
QStringList KoFilterManager::mimeFilter | ( | const QByteArray & | mimetype, | |
Direction | direction, | |||
const QStringList & | extraNativeMimeTypes = QStringList() | |||
) | [static] |
Suitable for passing to KFileDialog::setMimeFilter. The default mime gets set by the "users" of this method, as we do not have enough information here. Optionally, extraNativeMimeTypes
are added after the native mimetype.
Définition à la ligne 482 du fichier KoFilterManager.cpp.
Références buildGraph(), et connected().
Voici le graphe d'appel pour cette fonction :
QStringList KoFilterManager::mimeFilter | ( | ) | [static] |
The same method as KoFilterManager::mimeFilter but suited for KoShell. We do not need the mimetype, as we will simply use all available KOffice mimetypes. The Direction enum is omitted, as we only call this for importing. When saving from KoShell we already know the KOffice part we are using.
Définition à la ligne 512 du fichier KoFilterManager.cpp.
Références buildGraph(), connected(), Import, KoDocumentEntry::query(), et testguiform::result.
Référencé par exp0rt(), import(), main(), KoMainWindow::saveDocument(), KoTemplateChooseDia::setupFileDialog(), KoOpenPane::showOpenFileDialog(), et KoMainWindow::slotFileOpen().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
bool KoFilterManager::filterAvailable | ( | KoFilterEntry::Ptr | entry | ) | [static] |
Method used to check if that filter is available at all.
Définition à la ligne 550 du fichier KoFilterManager.cpp.
Références check(), Py::int, et m_filterAvailable.
Référencé par buildGraph(), KOffice::Graph::buildGraph(), et main().
Voici le graphe d'appel pour cette fonction :
Voici le graphe d'appel pour cette fonction :
void KoFilterManager::setBatchMode | ( | const bool | batch | ) |
Set the filter manager is batch mode (no dialog shown) instead of the interactive mode (dialog shown)
Définition à la ligne 600 du fichier KoFilterManager.cpp.
Références d, et KoFilterManager::Private::m_batch.
bool KoFilterManager::getBatchMode | ( | void | ) | const |
Get if the filter manager is batch mode (true) or in interactive mode (true)
Définition à la ligne 605 du fichier KoFilterManager.cpp.
Références d, et KoFilterManager::Private::m_batch.
void KoFilterManager::sigProgress | ( | int | ) | [signal] |
Référencé par KoFilterManager().
QString KoFilterManager::importFile | ( | ) | const [inline, private] |
Définition à la ligne 148 du fichier KoFilterManager.h.
Référencé par KoFilterChain::filterManagerImportFile().
Voici le graphe d'appel pour cette fonction :
QString KoFilterManager::exportFile | ( | ) | const [inline, private] |
Définition à la ligne 150 du fichier KoFilterManager.h.
Référencé par KoFilterChain::filterManagerExportFile().
Voici le graphe d'appel pour cette fonction :
KoDocument* KoFilterManager::document | ( | ) | const [inline, private] |
Définition à la ligne 152 du fichier KoFilterManager.h.
Référencé par KoFilterChain::filterManagerKoDocument(), et KoFilterManager().
Voici le graphe d'appel pour cette fonction :
int KoFilterManager::direction | ( | ) | const [inline, private] |
Définition à la ligne 154 du fichier KoFilterManager.h.
Référencé par KoFilterChain::filterManagerDirection().
Voici le graphe d'appel pour cette fonction :
KoFilterChain* const KoFilterManager::parentChain | ( | ) | const [inline, private] |
Définition à la ligne 156 du fichier KoFilterManager.h.
Référencé par KoFilterChain::filterManagerParentChain().
Voici le graphe d'appel pour cette fonction :
KoFilterManager& KoFilterManager::operator= | ( | const KoFilterManager & | rhs | ) | [private] |
void KoFilterManager::importErrorHelper | ( | const QString & | mimeType, | |
const bool | suppressDialog = false | |||
) | [private] |
Définition à la ligne 593 du fichier KoFilterManager.cpp.
Référencé par import().
Voici le graphe d'appel pour cette fonction :
QString KoFilterChain::filterManagerImportFile | ( | ) | const [friend] |
QString KoFilterChain::filterManagerExportFile | ( | ) | const [friend] |
KoDocument* KoFilterChain::filterManagerKoDocument | ( | ) | const [friend] |
int KoFilterChain::filterManagerDirection | ( | ) | const [friend] |
KoFilterChain* const KoFilterChain::filterManagerParentChain | ( | ) | const [friend] |
const int KoFilterManager::s_area [static, private] |
KoDocument* KoFilterManager::m_document [private] |
KoFilterChain* const KoFilterManager::m_parentChain [private] |
Définition à la ligne 167 du fichier KoFilterManager.h.
QString KoFilterManager::m_importUrl [private] |
QString KoFilterManager::m_exportUrl [private] |
QByteArray KoFilterManager::m_importUrlMimetypeHint [private] |
KOffice::Graph KoFilterManager::m_graph [private] |
Direction KoFilterManager::m_direction [private] |
QMap< QString, bool > KoFilterManager::m_filterAvailable [static, private] |
A static cache for the availability checks of filters.
Définition à la ligne 174 du fichier KoFilterManager.h.
Référencé par filterAvailable().
Private* KoFilterManager::d [private] |
Définition à la ligne 176 du fichier KoFilterManager.h.
Référencé par getBatchMode(), KoFilterManager(), setBatchMode(), et ~KoFilterManager().