MyMoneyPayee Class Reference

#include <mymoneypayee.h>

Inheritance diagram for MyMoneyPayee:

MyMoneyObject
Collaboration diagram for MyMoneyPayee:

Collaboration graph
[legend]

List of all members.

Public Types

enum  payeeMatchType { matchDisabled = 0, matchName, matchKey }

Public Member Functions

 MyMoneyPayee ()
 MyMoneyPayee (const QString &id, const MyMoneyPayee &payee)
 MyMoneyPayee (const QString &name, const QString &address=QString::null, const QString &city=QString::null, const QString &state=QString::null, const QString &postcode=QString::null, const QString &telephone=QString::null, const QString &email=QString::null)
 MyMoneyPayee (const QDomElement &el)
 ~MyMoneyPayee ()
QString name (void) const
QString address (void) const
QString city (void) const
QString state (void) const
QString postcode (void) const
QString telephone (void) const
QString email (void) const
QString notes (void) const
const QString id (void) const
const QString reference (void) const
void setName (const QString &val)
void setAddress (const QString &val)
void setCity (const QString &val)
void setState (const QString &val)
void setPostcode (const QString &val)
void setTelephone (const QString &val)
void setEmail (const QString &val)
void setNotes (const QString &val)
void setReference (const QString &ref)
payeeMatchType matchData (bool &ignorecase, QStringList &keys) const
void setMatchData (payeeMatchType type, bool ignorecase, const QStringList &keys)
payeeMatchType matchData (bool &ignorecase, QString &keyString) const
void setMatchData (payeeMatchType type, bool ignorecase, const QString &keys)
bool defaultAccountEnabled () const
const QString & defaultAccountId () const
void setDefaultAccountId (const QString &id=QString())
 MyMoneyPayee (const MyMoneyPayee &)
bool operator== (const MyMoneyPayee &) const
void writeXML (QDomDocument &document, QDomElement &parent) const
virtual bool hasReferenceTo (const QString &id) const

Static Public Attributes

static MyMoneyPayee null

Private Attributes

QString m_name
QString m_address
QString m_city
QString m_state
QString m_postcode
QString m_telephone
QString m_email
QString m_notes
bool m_matchingEnabled
bool m_usingMatchKey
bool m_matchKeyIgnoreCase
QString m_matchKey
QString m_defaultAccountId
QString m_reference


Detailed Description

This class represents a payee or receiver within the MyMoney engine. Since it is not payee-specific, it is also used as a generic address book entry.

Author:
Thomas Baumgart

Member Enumeration Documentation

Enumerator:
matchDisabled 
matchName 
matchKey 


Constructor & Destructor Documentation

MyMoneyPayee::MyMoneyPayee (  ) 

MyMoneyPayee::MyMoneyPayee ( const QString &  id,
const MyMoneyPayee payee 
)

MyMoneyPayee::MyMoneyPayee ( const QString &  name,
const QString &  address = QString::null,
const QString &  city = QString::null,
const QString &  state = QString::null,
const QString &  postcode = QString::null,
const QString &  telephone = QString::null,
const QString &  email = QString::null 
)

MyMoneyPayee::MyMoneyPayee ( const QDomElement &  el  ) 

This is the constructor for a payee that is described by a QDomElement (e.g. from a file).

Parameters:
el const reference to the QDomElement from which to create the object

MyMoneyPayee::~MyMoneyPayee (  ) 

MyMoneyPayee::MyMoneyPayee ( const MyMoneyPayee  ) 


Member Function Documentation

QString MyMoneyPayee::name ( void   )  const [inline]

QString MyMoneyPayee::address ( void   )  const [inline]

QString MyMoneyPayee::city ( void   )  const [inline]

QString MyMoneyPayee::state ( void   )  const [inline]

QString MyMoneyPayee::postcode ( void   )  const [inline]

QString MyMoneyPayee::telephone ( void   )  const [inline]

QString MyMoneyPayee::email ( void   )  const [inline]

QString MyMoneyPayee::notes ( void   )  const [inline]

const QString MyMoneyPayee::id ( void   )  const [inline]

This method retrieves the id of the object

Returns:
ID of object

Reimplemented from MyMoneyObject.

const QString MyMoneyPayee::reference ( void   )  const [inline]

void MyMoneyPayee::setName ( const QString &  val  )  [inline]

void MyMoneyPayee::setAddress ( const QString &  val  )  [inline]

void MyMoneyPayee::setCity ( const QString &  val  )  [inline]

void MyMoneyPayee::setState ( const QString &  val  )  [inline]

void MyMoneyPayee::setPostcode ( const QString &  val  )  [inline]

void MyMoneyPayee::setTelephone ( const QString &  val  )  [inline]

void MyMoneyPayee::setEmail ( const QString &  val  )  [inline]

void MyMoneyPayee::setNotes ( const QString &  val  )  [inline]

void MyMoneyPayee::setReference ( const QString &  ref  )  [inline]

payeeMatchType MyMoneyPayee::matchData ( bool &  ignorecase,
QStringList &  keys 
) const

Get all match data in one call

Parameters:
ignorecase Bool which will be replaced to indicate whether the match is case-sensitive (false) or case-insensitive (true)
keys List of strings which will be replaced by the match key to use for this payee
Returns:
the matching type (see payeeMatchType for details)

void MyMoneyPayee::setMatchData ( payeeMatchType  type,
bool  ignorecase,
const QStringList &  keys 
)

Set all match data in one call

Parameters:
type matching type (see payeeMatchType for details)
ignorecase Whether case should be ignored for the key/name match
keys A list of keys themselves, if applicable

payeeMatchType MyMoneyPayee::matchData ( bool &  ignorecase,
QString &  keyString 
) const

Get all match data in one call (overloaded version for database module)

Parameters:
ignorecase Bool which will be replaced to indicate whether the match is case-sensitive (false) or case-insensitive (true)
keyString A list of keys in single-string format, if applicable
Returns:
the matching type (see payeeMatchType for details)

void MyMoneyPayee::setMatchData ( payeeMatchType  type,
bool  ignorecase,
const QString &  keys 
)

Set all match data in one call (overloaded version for database module)

Parameters:
type matching type (see payeeMatchType for details)
ignorecase Whether case should be ignored for the key/name match
keys A list of keys in single-string format, if applicable

bool MyMoneyPayee::defaultAccountEnabled (  )  const [inline]

const QString& MyMoneyPayee::defaultAccountId (  )  const [inline]

void MyMoneyPayee::setDefaultAccountId ( const QString &  id = QString()  )  [inline]

bool MyMoneyPayee::operator== ( const MyMoneyPayee  )  const

void MyMoneyPayee::writeXML ( QDomDocument &  document,
QDomElement &  parent 
) const [virtual]

This method creates a QDomElement for the document under the parent node parent.

Parameters:
document reference to QDomDocument
parent reference to QDomElement parent node

Implements MyMoneyObject.

virtual bool MyMoneyPayee::hasReferenceTo ( const QString &  id  )  const [virtual]

This method checks if a reference to the given object exists. It returns, a true if the object is referencing the one requested by the parameter id. If it does not, this method returns false.

Parameters:
id id of the object to be checked for references
Return values:
true This object references object with id id.
false This object does not reference the object with id id.

Implements MyMoneyObject.


Member Data Documentation

QString MyMoneyPayee::m_name [private]

QString MyMoneyPayee::m_address [private]

QString MyMoneyPayee::m_city [private]

QString MyMoneyPayee::m_state [private]

QString MyMoneyPayee::m_postcode [private]

QString MyMoneyPayee::m_telephone [private]

QString MyMoneyPayee::m_email [private]

QString MyMoneyPayee::m_notes [private]

QString MyMoneyPayee::m_matchKey [private]

Semicolon separated list of matching keys used when trying to find a suitable payee for imported transactions.

QString MyMoneyPayee::m_reference [private]

This member keeps a reference to an external database (e.g. kaddressbook). It is the responsability of the application to format the reference string (e.g. encoding the name of the external database into the reference string). If no external database is available it should be kept empty by the application.


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

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