[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Classes | Public Member Functions | Static Public Member Functions | List of all members
KLFMimeExportProfile Class Reference

An export profile grouping several mime types. More...

#include <klfmime.h>

Classes

struct  ExportType
 

Public Member Functions

 KLFMimeExportProfile (const QString &pname, const QString &desc, const QList< ExportType > &exporttypes)
 
 KLFMimeExportProfile (const KLFMimeExportProfile &copy)
 
QString profileName () const
 
QString description () const
 
QList< ExportTypeexportTypes () const
 
int exportTypesCount () const
 
ExportType exportType (int n) const
 
KLFMimeExporterexporterLookupFor (int n, bool warnNotFound=true) const
 
QStringList mimeTypes () const
 
int indexOfMimeType (const QString &mimeType) const
 
QStringList respectiveWinTypes () const
 
QString respectiveWinType (int k) const
 
QStringList availableExporterMimeTypes () const
 

Static Public Member Functions

static QList< KLFMimeExportProfileexportProfileList ()
 
static void addExportProfile (const KLFMimeExportProfile &exportProfile)
 
static KLFMimeExportProfile findExportProfile (const QString &pname)
 

Detailed Description

An export profile grouping several mime types.

Definition at line 103 of file klfmime.h.

Constructor & Destructor Documentation

KLFMimeExportProfile::KLFMimeExportProfile ( const QString pname,
const QString desc,
const QList< ExportType > &  exporttypes 
)

Definition at line 167 of file klfmime.cpp.

Referenced by findExportProfile().

KLFMimeExportProfile::KLFMimeExportProfile ( const KLFMimeExportProfile copy)

Definition at line 173 of file klfmime.cpp.

Member Function Documentation

void KLFMimeExportProfile::addExportProfile ( const KLFMimeExportProfile exportProfile)
static

Definition at line 279 of file klfmime.cpp.

References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and QList::push_front().

QStringList KLFMimeExportProfile::availableExporterMimeTypes ( ) const

Returns a list of mime types, for which we garantee that (at least at the time of calling this function), KLFMimeExporter::mimeExporterLookup(mimetype) will not return NULL.

Definition at line 253 of file klfmime.cpp.

References exporterLookupFor(), KLF_DEBUG_BLOCK, and KLF_FUNC_NAME.

Referenced by KLFMimeData::formats().

QString KLFMimeExportProfile::description ( ) const
inline
KLFMimeExporter * KLFMimeExportProfile::exporterLookupFor ( int  n,
bool  warnNotFound = true 
) const

Returns the KLFMimeExporter object that is responsible for exporting into the format at index n in the exportTypes() list.

If warnNotFound is TRUE, then a warning is emitted if the exporter was not found.

Definition at line 179 of file klfmime.cpp.

References KLF_ASSERT_CONDITION, KLF_ASSERT_NOT_NULL, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, KLFMimeExporter::mimeExporterLookup(), and KLFMimeExporter::mimeExporterLookupByName().

Referenced by availableExporterMimeTypes(), respectiveWinType(), KLFMimeData::retrieveData(), and KLFMimeData::~KLFMimeData().

QList< KLFMimeExportProfile > KLFMimeExportProfile::exportProfileList ( )
static
ExportType KLFMimeExportProfile::exportType ( int  n) const
inline

Returns export type at position n. n MUST be in the valid range 0 ... exportTypesCount().

Definition at line 126 of file klfmime.h.

QList<ExportType> KLFMimeExportProfile::exportTypes ( ) const
inline

List of formats to export when using this export profile.

Definition at line 122 of file klfmime.h.

Referenced by findExportProfile().

int KLFMimeExportProfile::exportTypesCount ( ) const
inline

Number of export types. Equivalent to exportTypes().size()

Definition at line 124 of file klfmime.h.

KLFMimeExportProfile KLFMimeExportProfile::findExportProfile ( const QString pname)
static
int KLFMimeExportProfile::indexOfMimeType ( const QString mimeType) const

Returns the index of the given mimeType in the export list, or -1 if not found.

Definition at line 214 of file klfmime.cpp.

References KLF_DEBUG_BLOCK, and KLF_FUNC_NAME.

Referenced by KLFMimeData::retrieveData(), and KLFMimeData::~KLFMimeData().

QStringList KLFMimeExportProfile::mimeTypes ( ) const

A list of mime types to export when using this profile.

This is equivalent to building a list of all ExportType::mimetype members of the return value of exportTypes().

Definition at line 203 of file klfmime.cpp.

References KLF_DEBUG_BLOCK, and KLF_FUNC_NAME.

Referenced by KLFMainWin::slotCopy().

QString KLFMimeExportProfile::profileName ( ) const
inline
QString KLFMimeExportProfile::respectiveWinType ( int  k) const

Returns the k-th element in respectiveWinTypes. If that element is empty, queries the correct mime-type exporter for a windows format name with KLFMimeExporter::windowsFormatName().

Definition at line 235 of file klfmime.cpp.

References exporterLookupFor(), KLF_ASSERT_CONDITION, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, and KLFMimeExporter::windowsFormatName().

Referenced by respectiveWinTypes(), and KLFMainWin::slotCopy().

QStringList KLFMimeExportProfile::respectiveWinTypes ( ) const

Windows Clipboard Formats to show for each mime type (respectively).

This is equivalent to building a list of all return values of respectiveWinType(int) for all integers ranging from 0 to exportTypesCount().

Definition at line 225 of file klfmime.cpp.

References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, and respectiveWinType().


The documentation for this class was generated from the following files:

Generated by doxygen 1.8.11