OfxImporterPlugin Class Reference

#include <ofximporterplugin.h>

Inheritance diagram for OfxImporterPlugin:

KMyMoneyPlugin::Plugin KMyMoneyPlugin::ImporterPlugin KMyMoneyPlugin::OnlinePlugin QObject KXMLGUIClient
Collaboration diagram for OfxImporterPlugin:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 OfxImporterPlugin (QObject *parent=0, const char *name=0, const QStringList &=QStringList())
 ~OfxImporterPlugin ()
virtual QString formatName (void) const
virtual QString formatFilenameFilter (void) const
virtual bool isMyFormat (const QString &filename) const
virtual bool import (const QString &filename)
virtual QString lastError (void) const
QWidgetaccountConfigTab (const MyMoneyAccount &acc, QString &name)
MyMoneyKeyValueContainer onlineBankingSettings (const MyMoneyKeyValueContainer &current)
const MyMoneyAccountaccount (const QString &key, const QString &value) const
void protocols (QStringList &protocolList) const
bool mapAccount (const MyMoneyAccount &acc, MyMoneyKeyValueContainer &settings)
bool updateAccount (const MyMoneyAccount &acc, bool moreAccounts)

Protected Slots

void slotImportFile (void)
void slotImportFile (const QString &url)

Protected Member Functions

void createActions (void)
void addnew (void)
MyMoneyStatementback (void)
bool isValid (void) const
void setValid (void)
void addInfo (const QString &_msg)
void addWarning (const QString &_msg)
void addError (const QString &_msg)
const QStringList & infos (void) const
const QStringList & warnings (void) const
const QStringList & errors (void) const
bool storeStatements (QValueList< MyMoneyStatement > &statements)
bool importStatement (const MyMoneyStatement &s)

Static Protected Member Functions

static int ofxTransactionCallback (struct OfxTransactionData, void *)
static int ofxStatementCallback (struct OfxStatementData, void *)
static int ofxAccountCallback (struct OfxAccountData, void *)
static int ofxStatusCallback (struct OfxStatusData, void *)
static int ofxSecurityCallback (struct OfxSecurityData, void *)

Private Attributes

bool m_valid
bool m_preferName
QValueList< MyMoneyStatementm_statementlist
QValueList
< MyMoneyStatement::Security
m_securitylist
QString m_fatalerror
QStringList m_infos
QStringList m_warnings
QStringList m_errors
KOnlineBankingStatusm_statusDlg


Detailed Description

Author:
Ace Jones

Constructor & Destructor Documentation

OfxImporterPlugin::OfxImporterPlugin ( QObject parent = 0,
const char *  name = 0,
const QStringList &  = QStringList() 
)

OfxImporterPlugin::~OfxImporterPlugin (  ) 


Member Function Documentation

virtual QString OfxImporterPlugin::formatName ( void   )  const [virtual]

This method returns the english-language name of the format this plugin imports, e.g. "OFX"

Returns:
QString Name of the format

Implements KMyMoneyPlugin::ImporterPlugin.

virtual QString OfxImporterPlugin::formatFilenameFilter ( void   )  const [virtual]

This method returns the filename filter suitable for passing to KFileDialog::setFilter(), e.g. "*.ofx *.qfx" which describes how files of this format are likely to be named in the file system

Returns:
QString Filename filter string

Implements KMyMoneyPlugin::ImporterPlugin.

virtual bool OfxImporterPlugin::isMyFormat ( const QString &  filename  )  const [virtual]

This method returns whether this plugin is able to import a particular file.

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

Implements KMyMoneyPlugin::ImporterPlugin.

virtual bool OfxImporterPlugin::import ( const QString &  filename  )  [virtual]

Import a file

Parameters:
filename File to import
Returns:
bool Whether the import was successful.

Implements KMyMoneyPlugin::ImporterPlugin.

virtual QString OfxImporterPlugin::lastError ( void   )  const [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.

Implements KMyMoneyPlugin::ImporterPlugin.

QWidget* OfxImporterPlugin::accountConfigTab ( const MyMoneyAccount account,
QString &  tabName 
) [virtual]

This method returns a pointer to a widget representing an additional tab that will be added to the KNewAccountDlg. The string referenced with tabName will be filled with the text that should be placed on the tab. It should return 0 if no additional tab is needed.

Information about the account can be taken out of account.

Once the pointer to the widget is returned to KMyMoney, it takes care of destruction of all included widgets when the dialog is closed. The plugin can access the widgets created after the call to storeConfigParameters() happened.

Implements KMyMoneyPlugin::OnlinePlugin.

MyMoneyKeyValueContainer OfxImporterPlugin::onlineBankingSettings ( const MyMoneyKeyValueContainer current  )  [virtual]

This method is called by the framework whenever it is time to store the configuration data maintained by the plugin. The plugin should use the widgets created in accountConfigTab() to extract the current values.

Parameters:
current The current container contains the current settings

Implements KMyMoneyPlugin::OnlinePlugin.

const MyMoneyAccount& OfxImporterPlugin::account ( const QString &  key,
const QString &  value 
) const

void OfxImporterPlugin::protocols ( QStringList &  protocolList  )  const [virtual]

bool OfxImporterPlugin::mapAccount ( const MyMoneyAccount acc,
MyMoneyKeyValueContainer onlineBankingSettings 
) [virtual]

This method is called by the framework when the user wants to map a KMyMoney account onto an online account. The KMyMoney account is identified by acc and the online provider should store its data in onlineBankingSettings upon success.

Return values:
true if account is mapped
false if account is not mapped

Implements KMyMoneyPlugin::OnlinePlugin.

bool OfxImporterPlugin::updateAccount ( const MyMoneyAccount acc,
bool  moreAccounts 
) [virtual]

This method is called by the framework when the user wants to update a KMyMoney account with data from an online account. The KMyMoney account is identified by acc. The online provider should read its data from acc.onlineBankingSettings(). true is returned upon success. The plugin might consider to stack the requests in case moreAccounts is true. moreAccounts defaults to false.

Return values:
true if account is updated
false if account is not updated

Implements KMyMoneyPlugin::OnlinePlugin.

void OfxImporterPlugin::slotImportFile ( void   )  [protected, slot]

void OfxImporterPlugin::slotImportFile ( const QString &  url  )  [protected, slot]

void OfxImporterPlugin::createActions ( void   )  [protected]

void OfxImporterPlugin::addnew ( void   )  [inline, protected]

MyMoneyStatement& OfxImporterPlugin::back ( void   )  [inline, protected]

bool OfxImporterPlugin::isValid ( void   )  const [inline, protected]

void OfxImporterPlugin::setValid ( void   )  [inline, protected]

void OfxImporterPlugin::addInfo ( const QString &  _msg  )  [inline, protected]

void OfxImporterPlugin::addWarning ( const QString &  _msg  )  [inline, protected]

void OfxImporterPlugin::addError ( const QString &  _msg  )  [inline, protected]

const QStringList& OfxImporterPlugin::infos ( void   )  const [inline, protected]

const QStringList& OfxImporterPlugin::warnings ( void   )  const [inline, protected]

const QStringList& OfxImporterPlugin::errors ( void   )  const [inline, protected]

bool OfxImporterPlugin::storeStatements ( QValueList< MyMoneyStatement > &  statements  )  [protected]

bool OfxImporterPlugin::importStatement ( const MyMoneyStatement s  )  [protected]

static int OfxImporterPlugin::ofxTransactionCallback ( struct  OfxTransactionData,
void *   
) [static, protected]

static int OfxImporterPlugin::ofxStatementCallback ( struct  OfxStatementData,
void *   
) [static, protected]

static int OfxImporterPlugin::ofxAccountCallback ( struct  OfxAccountData,
void *   
) [static, protected]

static int OfxImporterPlugin::ofxStatusCallback ( struct  OfxStatusData,
void *   
) [static, protected]

static int OfxImporterPlugin::ofxSecurityCallback ( struct  OfxSecurityData,
void *   
) [static, protected]


Member Data Documentation

QStringList OfxImporterPlugin::m_infos [private]

QStringList OfxImporterPlugin::m_warnings [private]

QStringList OfxImporterPlugin::m_errors [private]


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

Generated on Wed Jan 26 13:09:33 2011 for KMyMoney by  doxygen 1.5.6