IMyMoneyReader Class Reference

#include <imymoneyreader.h>

Inheritance diagram for IMyMoneyReader:

QObject
Collaboration diagram for IMyMoneyReader:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 IMyMoneyReader ()
virtual ~IMyMoneyReader ()
virtual void setFilename (const QString &name)=0
virtual void setProfile (const QString &name)=0
virtual const bool startImport (void)=0
virtual const bool finishImport (void)=0
virtual void setAutoCreatePayee (const bool create)=0
virtual void setAskPayeeCategory (const bool ask)=0
virtual const MyMoneyAccountaccount () const
virtual void setProgressCallback (void(*callback)(int, int, const QString &))

Private Attributes

MyMoneyAccount m_account
void(* m_progressCallback )(int, int, const QString &)
QString m_filename


Detailed Description

Author:
Kevin Tambascio

Constructor & Destructor Documentation

IMyMoneyReader::IMyMoneyReader (  )  [inline]

virtual IMyMoneyReader::~IMyMoneyReader (  )  [inline, virtual]


Member Function Documentation

virtual void IMyMoneyReader::setFilename ( const QString &  name  )  [pure virtual]

This method is used to store the filename into the object. The file should exist. If it does and an external filter program is specified with the current selected profile, the file is send through this filter and the result is stored in the m_tempFile file.

Parameters:
name path and name of the file to be imported

virtual void IMyMoneyReader::setProfile ( const QString &  name  )  [pure virtual]

This method is used to store the name of the profile into the object. The selected profile will be loaded if it exists. If an external filter program is specified with the current selected profile, the file is send through this filter and the result is stored in the m_tempFile file.

Parameters:
name QString reference to the name of the profile

virtual const bool IMyMoneyReader::startImport ( void   )  [pure virtual]

This method actually starts the import of data from the selected file into the MyMoney engine.

This method also starts the user defined import filter program defined in the QIF profile(when a QIF file is selected). If none is defined, the file is read as is (actually the UNIX command 'cat -' is used as the filter).

If data from the filter program is available, the slot slotReceivedDataFromFilter() will be called.

Make sure to connect the signal importFinished() to detect when the import actually ended. Call the method finishImport() to clean things up and get the overall result of the import.

Return values:
true the import was started successfully
false the import could not be started.

virtual const bool IMyMoneyReader::finishImport ( void   )  [pure virtual]

This method must be called once the signal importFinished() has been emitted. It will clean up the reader state and determines the actual return code of the import.

Return values:
true Import was successful.
false Import failed because the filter program terminated abnormally or the user aborted the import process.

virtual void IMyMoneyReader::setAutoCreatePayee ( const bool  create  )  [pure virtual]

This method is used to modify the auto payee creation flag. If this flag is set, records for payees that are not currently found in the engine will be automatically created with no further user interaction required. If this flag is no set, the user will be asked if the payee should be created or not. If the MyMoneyQifReader object is created auto payee creation is turned off.

Parameters:
create flag if this feature should be turned on (true) or turned off (false)

virtual void IMyMoneyReader::setAskPayeeCategory ( const bool  ask  )  [pure virtual]

virtual const MyMoneyAccount& IMyMoneyReader::account (  )  const [inline, virtual]

virtual void IMyMoneyReader::setProgressCallback ( void(*)(int, int, const QString &)  callback  )  [inline, virtual]


Member Data Documentation

void(* IMyMoneyReader::m_progressCallback)(int, int, const QString &) [private]

QString IMyMoneyReader::m_filename [private]


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

Generated on Wed Jan 26 13:05:35 2011 for KMyMoney by  doxygen 1.5.6