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 ©) | |
QString | profileName () const |
QString | description () const |
QList< ExportType > | exportTypes () const |
int | exportTypesCount () const |
ExportType | exportType (int n) const |
KLFMimeExporter * | exporterLookupFor (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) |
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.
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] |
Definition at line 271 of file klfmime.cpp.
References KLF_DEBUG_BLOCK, and KLF_FUNC_NAME.
Referenced by KLFSettings::populateExportProfilesCombos(), and KLFMainWin::startupFinished().
ExportType KLFMimeExportProfile::exportType | ( | int | n | ) | const [inline] |
Returns export type at position n
. n
MUST be in the valid range 0
... exportTypesCount().
QList<ExportType> KLFMimeExportProfile::exportTypes | ( | ) | const [inline] |
int KLFMimeExportProfile::exportTypesCount | ( | ) | const [inline] |
Number of export types. Equivalent to exportTypes().size()
KLFMimeExportProfile KLFMimeExportProfile::findExportProfile | ( | const QString & | pname | ) | [static] |
Definition at line 287 of file klfmime.cpp.
References KLF_DEBUG_BLOCK, KLF_FUNC_NAME, profileName(), and QList::size().
Referenced by KLFMainWin::eventFilter(), KLFMainWin::slotCopy(), and KLFMainWin::slotDrag().
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().