[KLF Application][KLF Tools][KLF Backend][KLF Home]
KLatexFormula Project
Classes | Public Member Functions | Static Public Member Functions

KLFMimeExportProfile Class Reference

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

#include <klfmime.h>

Collaboration diagram for KLFMimeExportProfile:
Collaboration graph
[legend]

List of all members.

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

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, KLF_FUNC_NAME, and QList::size().

Referenced by KLFMimeData::formats().

QString KLFMimeExportProfile::description ( ) const [inline]

Definition at line 119 of file klfmime.h.

Referenced by KLFMainWin::eventFilter(), KLFMainWin::slotCopy(), and KLFMainWin::slotDrag().

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 QList::isEmpty(), KLF_ASSERT_CONDITION, KLF_ASSERT_NOT_NULL, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, KLFMimeExporter::mimeExporterLookup(), KLFMimeExporter::mimeExporterLookupByName(), and QList::size().

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

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.

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, KLF_FUNC_NAME, and QList::size().

Referenced by KLFMimeData::retrieveData().

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, KLF_FUNC_NAME, and QList::size().

Referenced by KLFMainWin::slotCopy().

QString KLFMimeExportProfile::profileName ( ) const [inline]

Definition at line 118 of file klfmime.h.

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

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(), QList::isEmpty(), KLF_ASSERT_CONDITION, KLF_DEBUG_BLOCK, KLF_FUNC_NAME, klfDbg, QList::size(), 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, respectiveWinType(), and QList::size().


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

Generated by doxygen 1.7.3