MyMoneyStorageXML Class Reference

#include <mymoneystoragexml.h>

Inheritance diagram for MyMoneyStorageXML:

IMyMoneyStorageFormat MyMoneyStorageANON
Collaboration diagram for MyMoneyStorageXML:

Collaboration graph
[legend]

List of all members.

Public Types

enum  fileVersionDirectionType { Reading = 0, Writing = 1 }

Public Member Functions

 MyMoneyStorageXML ()
virtual ~MyMoneyStorageXML ()

Protected Member Functions

void setProgressCallback (void(*callback)(int, int, const QString &))
void signalProgress (int current, int total, const QString &="")
QValueList< QDomElement > readElements (QString groupTag, QString itemTag=QString())
bool readFileInformation (const QDomElement &fileInfo)
virtual void writeFileInformation (QDomElement &fileInfo)
virtual void writeUserInformation (QDomElement &userInfo)
virtual void writeInstitution (QDomElement &institutions, const MyMoneyInstitution &i)
virtual void writeInstitutions (QDomElement &institutions)
virtual void writePrices (QDomElement &prices)
virtual void writePricePair (QDomElement &price, const MyMoneyPriceEntries &p)
virtual void writePrice (QDomElement &prices, const MyMoneyPrice &p)
virtual void writePayees (QDomElement &payees)
virtual void writePayee (QDomElement &payees, const MyMoneyPayee &p)
virtual void writeAccounts (QDomElement &accounts)
virtual void writeAccount (QDomElement &accounts, const MyMoneyAccount &p)
virtual void writeTransactions (QDomElement &transactions)
virtual void writeTransaction (QDomElement &transactions, const MyMoneyTransaction &tx)
virtual void writeSchedules (QDomElement &scheduled)
virtual void writeSchedule (QDomElement &scheduledTx, const MyMoneySchedule &tx)
virtual void writeReports (QDomElement &e)
virtual void writeBudgets (QDomElement &e)
virtual void writeBudget (QDomElement &budget, const MyMoneyBudget &b)
virtual void writeSecurities (QDomElement &securities)
virtual void writeSecurity (QDomElement &securityElement, const MyMoneySecurity &security)
virtual void writeCurrencies (QDomElement &currencies)
virtual QDomElement writeKeyValuePairs (const QMap< QString, QString > pairs)
virtual void readFile (QIODevice *s, IMyMoneySerialize *storage)
virtual void writeFile (QIODevice *s, IMyMoneySerialize *storage)
bool readUserInformation (const QDomElement &userElement)
void readPricePair (const QDomElement &pricePair)
const MyMoneyPrice readPrice (const QString &from, const QString &to, const QDomElement &price)
QDomElement findChildElement (const QString &name, const QDomElement &root)

Static Protected Member Functions

static unsigned int fileVersion (fileVersionDirectionType dir=Reading)

Protected Attributes

IMyMoneySerializem_storage
QDomDocument * m_doc

Private Attributes

void(* m_progressCallback )(int, int, const QString &)
Private *const d
QString m_baseCurrencyId

Static Private Attributes

static unsigned int fileVersionRead
static unsigned int fileVersionWrite

Friends

class MyMoneyXmlContentHandler


Member Enumeration Documentation

Enumerator:
Reading  version of file to be read
Writing  version to be used when writing a file

Reimplemented from IMyMoneyStorageFormat.


Constructor & Destructor Documentation

MyMoneyStorageXML::MyMoneyStorageXML (  ) 

virtual MyMoneyStorageXML::~MyMoneyStorageXML (  )  [virtual]


Member Function Documentation

void MyMoneyStorageXML::setProgressCallback ( void(*)(int, int, const QString &)  callback  )  [protected, virtual]

Implements IMyMoneyStorageFormat.

void MyMoneyStorageXML::signalProgress ( int  current,
int  total,
const QString &  = "" 
) [protected]

static unsigned int MyMoneyStorageXML::fileVersion ( fileVersionDirectionType  dir = Reading  )  [static, protected]

This method returns the version of the underlying file. It is used by the MyMoney objects contained in a MyMoneyStorageBin object (e.g. MyMoneyAccount, MyMoneyInstitution, MyMoneyTransaction, etc.) to determine the layout used when reading/writing a persistant file. A parameter is used to determine the direction.

Parameters:
dir information about the direction (reading/writing). The default is reading.
Returns:
version QString of file's version
See also:
m_fileVersionRead, m_fileVersionWrite

QValueList<QDomElement> MyMoneyStorageXML::readElements ( QString  groupTag,
QString  itemTag = QString() 
) [protected]

bool MyMoneyStorageXML::readFileInformation ( const QDomElement &  fileInfo  )  [protected]

virtual void MyMoneyStorageXML::writeFileInformation ( QDomElement &  fileInfo  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeUserInformation ( QDomElement &  userInfo  )  [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeInstitution ( QDomElement &  institutions,
const MyMoneyInstitution i 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeInstitutions ( QDomElement &  institutions  )  [protected, virtual]

virtual void MyMoneyStorageXML::writePrices ( QDomElement &  prices  )  [protected, virtual]

virtual void MyMoneyStorageXML::writePricePair ( QDomElement &  price,
const MyMoneyPriceEntries p 
) [protected, virtual]

virtual void MyMoneyStorageXML::writePrice ( QDomElement &  prices,
const MyMoneyPrice p 
) [protected, virtual]

virtual void MyMoneyStorageXML::writePayees ( QDomElement &  payees  )  [protected, virtual]

virtual void MyMoneyStorageXML::writePayee ( QDomElement &  payees,
const MyMoneyPayee p 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeAccounts ( QDomElement &  accounts  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeAccount ( QDomElement &  accounts,
const MyMoneyAccount p 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeTransactions ( QDomElement &  transactions  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeTransaction ( QDomElement &  transactions,
const MyMoneyTransaction tx 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeSchedules ( QDomElement &  scheduled  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeSchedule ( QDomElement &  scheduledTx,
const MyMoneySchedule tx 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeReports ( QDomElement &  e  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeBudgets ( QDomElement &  e  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeBudget ( QDomElement &  budget,
const MyMoneyBudget b 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeSecurities ( QDomElement &  securities  )  [protected, virtual]

virtual void MyMoneyStorageXML::writeSecurity ( QDomElement &  securityElement,
const MyMoneySecurity security 
) [protected, virtual]

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeCurrencies ( QDomElement &  currencies  )  [protected, virtual]

virtual QDomElement MyMoneyStorageXML::writeKeyValuePairs ( const QMap< QString, QString >  pairs  )  [protected, virtual]

virtual void MyMoneyStorageXML::readFile ( QIODevice *  s,
IMyMoneySerialize storage 
) [protected, virtual]

Implements IMyMoneyStorageFormat.

Reimplemented in MyMoneyStorageANON.

virtual void MyMoneyStorageXML::writeFile ( QIODevice *  s,
IMyMoneySerialize storage 
) [protected, virtual]

Implements IMyMoneyStorageFormat.

bool MyMoneyStorageXML::readUserInformation ( const QDomElement &  userElement  )  [protected]

void MyMoneyStorageXML::readPricePair ( const QDomElement &  pricePair  )  [protected]

const MyMoneyPrice MyMoneyStorageXML::readPrice ( const QString &  from,
const QString &  to,
const QDomElement &  price 
) [protected]

QDomElement MyMoneyStorageXML::findChildElement ( const QString &  name,
const QDomElement &  root 
) [protected]

Reimplemented in MyMoneyStorageANON.


Friends And Related Function Documentation

friend class MyMoneyXmlContentHandler [friend]


Member Data Documentation

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

QDomDocument* MyMoneyStorageXML::m_doc [protected]

Private* const MyMoneyStorageXML::d [private]

unsigned int MyMoneyStorageXML::fileVersionRead [static, private]

This member is used to store the file version information obtained while reading a file.

Reimplemented from IMyMoneyStorageFormat.

unsigned int MyMoneyStorageXML::fileVersionWrite [static, private]

This member is used to store the file version information to be used when writing a file.

Reimplemented from IMyMoneyStorageFormat.

This member keeps the id of the base currency. We need this temporarily to convert the price history from the old to the new format. This should go at some time beyond 0.8 (ipwizard)


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

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