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 234 of file kmymoneyplugin.h.

Constructor & Destructor Documentation

◆ ImporterPlugin()

KMyMoneyPlugin::ImporterPlugin::ImporterPlugin ( )

Definition at line 114 of file kmymoneyplugin.cpp.

◆ ~ImporterPlugin()

KMyMoneyPlugin::ImporterPlugin::~ImporterPlugin ( )
virtual

Definition at line 133 of file kmymoneyplugin.cpp.

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.

Returns
QStringList List of MIME types

◆ import()

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

Import a file.

Parameters
filenameFile to import
Returns
bool Whether the import was successful.

◆ isMyFormat()

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 118 of file kmymoneyplugin.cpp.

◆ lastError()

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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:00:05 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.