Search for usage in LXR

KMyMoneyPlugin::ImporterPlugin Class Referenceabstract

#include <kmymoneyplugin.h>

Public Member Functions

virtual QStringList formatMimeTypes () const =0
virtual bool import (const QString &filename)=0
virtual bool isMyFormat (const QString &filename) const
virtual QString lastError () const =0

Detailed Description

This class describes the interface between the KMyMoney application and it's IMPORTER plugins.

All importer plugins must provide this interface.

A good tutorial on how to design and develop a plugin structure for a KDE application (e.g. KMyMoney) can be found at

Definition at line 234 of file kmymoneyplugin.h.

Member Function Documentation

◆ formatMimeTypes()

virtual QStringList KMyMoneyPlugin::ImporterPlugin::formatMimeTypes ( ) const
pure virtual

This method returns the list of the MIME types that this plugin handles, e.g.

{"application/x-ofx", "application/x-qfx"}. Be specific: don't use generic types, like "text/plain", which many other types inherit from, and which would result in isMyFormat() returning false positives.

QStringList List of MIME types

◆ import()

virtual bool KMyMoneyPlugin::ImporterPlugin::import ( const QString filename)
pure virtual

Import a file.

filenameFile to import
bool Whether the import was successful.

◆ isMyFormat()

bool KMyMoneyPlugin::ImporterPlugin::isMyFormat ( const QString filename) const

This method checks whether the file provided is of expected format.

The default implementation checks whether the file's MIME type inherits any of the types provided by formatMimeTypes().

filenameFully-qualified pathname to a file
bool Whether the indicated file is importable by this plugin

Definition at line 118 of file kmymoneyplugin.cpp.

◆ lastError()

virtual QString KMyMoneyPlugin::ImporterPlugin::lastError ( ) const
pure virtual

Returns the error result of the last import.

QString English-language name of the error encountered in the last import, or QString() if it was successful.

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Jan 28 2023 04:12:31 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.