MyMoneyTemplate Class Reference

#include <mymoneytemplate.h>

Collaboration diagram for MyMoneyTemplate:

Collaboration graph

List of all members.

Public Member Functions

 MyMoneyTemplate ()
 MyMoneyTemplate (const KURL &url)
 ~MyMoneyTemplate ()
bool loadTemplate (const KURL &url)
bool saveTemplate (const KURL &url)
bool importTemplate (void(*callback)(int, int, const QString &))
bool exportTemplate (void(*callback)(int, int, const QString &))
const QString & title (void) const
const QString & shortDescription (void) const
const QString & longDescription (void) const
void hierarchy (QMap< QString, QListViewItem * > &list)

Protected Member Functions

bool loadDescription (void)
bool createAccounts (MyMoneyAccount &parent, QDomNode account)
bool setFlags (MyMoneyAccount &acc, QDomNode flags)
bool saveToLocalFile (QFile *qfile)
bool addAccountStructure (QDomElement &parent, const MyMoneyAccount &acc)
bool hierarchy (QMap< QString, QListViewItem * > &list, const QString &parent, QDomNode account)
void signalProgress (int current, int total, const QString &="")

Private Attributes

QDomDocument m_doc
QDomNode m_accounts
QString m_title
QString m_shortDesc
QString m_longDesc
KURL m_source
void(* m_progressCallback )(int, int, const QString &)
int m_accountsRead

Detailed Description

Thomas Baumgart This class represents an account template handler. It is capable to read an XML formatted account template file and import it into the current engine. Also, it can save the current account structure of the engine to an XML formatted template file.

Constructor & Destructor Documentation

MyMoneyTemplate::MyMoneyTemplate (  ) 

MyMoneyTemplate::MyMoneyTemplate ( const KURL &  url  ) 

MyMoneyTemplate::~MyMoneyTemplate (  ) 

Member Function Documentation

bool MyMoneyTemplate::loadTemplate ( const KURL &  url  ) 

bool MyMoneyTemplate::saveTemplate ( const KURL &  url  ) 

bool MyMoneyTemplate::importTemplate ( void(*)(int, int, const QString &)  callback  ) 

bool MyMoneyTemplate::exportTemplate ( void(*)(int, int, const QString &)  callback  ) 

const QString& MyMoneyTemplate::title ( void   )  const [inline]

const QString& MyMoneyTemplate::shortDescription ( void   )  const [inline]

const QString& MyMoneyTemplate::longDescription ( void   )  const [inline]

void MyMoneyTemplate::hierarchy ( QMap< QString, QListViewItem * > &  list  ) 

bool MyMoneyTemplate::loadDescription ( void   )  [protected]

bool MyMoneyTemplate::createAccounts ( MyMoneyAccount parent,
QDomNode  account 
) [protected]

bool MyMoneyTemplate::setFlags ( MyMoneyAccount acc,
QDomNode  flags 
) [protected]

bool MyMoneyTemplate::saveToLocalFile ( QFile *  qfile  )  [protected]

bool MyMoneyTemplate::addAccountStructure ( QDomElement &  parent,
const MyMoneyAccount acc 
) [protected]

bool MyMoneyTemplate::hierarchy ( QMap< QString, QListViewItem * > &  list,
const QString &  parent,
QDomNode  account 
) [protected]

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

This method is used to update the progress information. It checks if an appropriate function is known and calls it.

For a parameter description see KMyMoneyView::progressCallback().

Member Data Documentation

QDomDocument MyMoneyTemplate::m_doc [private]

QDomNode MyMoneyTemplate::m_accounts [private]

QString MyMoneyTemplate::m_title [private]

QString MyMoneyTemplate::m_shortDesc [private]

QString MyMoneyTemplate::m_longDesc [private]

KURL MyMoneyTemplate::m_source [private]

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

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