KMyMoneyPlugin::ImporterPlugin

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 http://web.archive.org/web/20100305214125/http://developer.kde.org/documentation/tutorials/developing-a-plugin-structure/index.html

Definition at line 241 of file kmymoneyplugin.h.

Member Function Documentation

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.

Returns
QStringList List of MIME types
virtual bool KMyMoneyPlugin::ImporterPlugin::import ( const QString filename)
pure virtual

Import a file.

Parameters
filenameFile to import
Returns
bool Whether the import was successful.
bool KMyMoneyPlugin::ImporterPlugin::isMyFormat ( const QString filename) const
virtual

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

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

Definition at line 138 of file kmymoneyplugin.cpp.

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

Returns the error result of the last import.

Returns
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-2021 The KDE developers.
Generated on Sun Oct 24 2021 23:21:45 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.