Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

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)

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
QValueList< MyMoneyStatementm_statementlist
QValueList< MyMoneyStatement::Securitym_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

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

QWidget* OfxImporterPlugin::accountConfigTab const MyMoneyAccount acc,
QString &  name
[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.

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

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

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

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

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

void OfxImporterPlugin::createActions void   )  [protected]
 

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

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

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

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

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.

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

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.

bool OfxImporterPlugin::mapAccount const MyMoneyAccount acc,
MyMoneyKeyValueContainer settings
[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.

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

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

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

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

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

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.

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

Implements KMyMoneyPlugin::OnlinePlugin.

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

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

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

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

bool OfxImporterPlugin::updateAccount const MyMoneyAccount acc  )  [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.

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

Implements KMyMoneyPlugin::OnlinePlugin.

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


Member Data Documentation

QStringList OfxImporterPlugin::m_errors [private]
 

QString OfxImporterPlugin::m_fatalerror [private]
 

QStringList OfxImporterPlugin::m_infos [private]
 

QValueList<MyMoneyStatement::Security> OfxImporterPlugin::m_securitylist [private]
 

QValueList<MyMoneyStatement> OfxImporterPlugin::m_statementlist [private]
 

KOnlineBankingStatus* OfxImporterPlugin::m_statusDlg [private]
 

bool OfxImporterPlugin::m_valid [private]
 

QStringList OfxImporterPlugin::m_warnings [private]
 


The documentation for this class was generated from the following file:
Generated on Sun Sep 7 04:10:43 2008 for KMyMoney by  doxygen 1.4.1