MagicSmoke  $VERSION$
MOCustomer Class Reference

#include <customer.h>

Inheritance diagram for MOCustomer:
MOCustomerAbstract

Public Member Functions

 MOCustomer (qint64)
 shortcut: gets the customer from the DB More...
 
 MOCustomer (const MOCustomerInfo &)
 shortcut: extracts the ID from the info and retrieves the customer from the DB More...
 
QString address (int i=0)
 returns the address of the customer More...
 
Nullable< qint64 > customerid () const
 alias for id() More...
 
QString fullName () const
 returns the full name (incl. More...
 
bool isValid ()
 returns whether the customer is valid More...
 
- Public Member Functions inherited from MOCustomerAbstract
 MOCustomerAbstract ()
 default constructor: constructs an invalid instance of MOCustomerAbstract More...
 
 MOCustomerAbstract (const MOCustomerAbstract &)
 copy constructor: creates a (deep) copy of the object More...
 
 MOCustomerAbstract (const QDomElement &)
 special constructor: create from the XML representation, deserializing the object More...
 
virtual ~MOCustomerAbstract ()
 destructor: deletes this copy of the object More...
 
virtual void addaddresses (Nullable< MOAddress > a)
 
virtual void addcontacts (Nullable< MOContact > a)
 
virtual QList< MOAddressaddresses () const
 
virtual Nullable< QString > cflags () const
 
virtual void clearaddresses ()
 
virtual void clearcontacts ()
 
virtual Nullable< QString > comments () const
 
virtual QList< MOContactcontacts () const
 
virtual Nullable< QString > email () const
 
virtual Nullable< QString > firstname () const
 
virtual Nullable< qint64 > id () const
 
virtual Nullable< QString > name () const
 
MOCustomerAbstractoperator= (const MOCustomerAbstract &)
 copy assignment: creates a (deep) copy of the object More...
 
virtual void setaddresses (QList< MOAddress > s)
 
virtual void setcflags (Nullable< QString > s)
 
virtual void setcomments (Nullable< QString > s)
 
virtual void setcontacts (QList< MOContact > s)
 
virtual void setemail (Nullable< QString > s)
 
virtual void setfirstname (Nullable< QString > s)
 
virtual void setid (Nullable< qint64 > s)
 
virtual void setname (Nullable< QString > s)
 
virtual void settags (Nullable< QString > s)
 
virtual void settitle (Nullable< QString > s)
 
virtual Nullable< QString > tags () const
 
virtual Nullable< QString > title () const
 
QString toString ()
 Serializes the object to XML and returns the string representation of that XML. More...
 
QDomElement toXml (QDomDocument &doc, QString name="Customer")
 Transforms the object into its XML representation, the element node returned is not appended to the document - you have to do that yourself. More...
 
void toXml (QDomDocument &, QDomElement &)
 Serializes the object into the given element. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from MOCustomerAbstract
static MOCustomerAbstract fromString (const QString &)
 create MOCustomerAbstract from XML formatted string (inverse of toString) More...
 
static MOCustomerAbstract fromXml (const QDomElement &)
 create MOCustomerAbstract from XML (inverse of toXml) More...
 
- Protected Attributes inherited from MOCustomerAbstract
QList< MOAddressmp_addresses
 
Nullable< QString > mp_cflags
 
Nullable< QString > mp_comments
 
QList< MOContactmp_contacts
 
Nullable< QString > mp_email
 
Nullable< QString > mp_firstname
 
Nullable< qint64 > mp_id
 
Nullable< QString > mp_name
 
Nullable< QString > mp_tags
 
Nullable< QString > mp_title
 

Constructor & Destructor Documentation

MOCustomer::MOCustomer ( qint64  i)

shortcut: gets the customer from the DB

References MTGetCustomer::getcustomer(), and req.

MOCustomer::MOCustomer ( const MOCustomerInfo ci)

shortcut: extracts the ID from the info and retrieves the customer from the DB

References MTGetCustomer::getcustomer(), MOCustomerInfo::id(), and req.

Member Function Documentation

QString MOCustomer::address ( int  i = 0)

returns the address of the customer

References MOCustomerAbstract::addresses(), and fullName().

Nullable<qint64> MOCustomer::customerid ( ) const
inline

alias for id()

References MOCustomerAbstract::id().

Referenced by MCustomerDialog::getCustomer().

QString MOCustomer::fullName ( ) const

returns the full name (incl.

title)

References MOCustomerAbstract::firstname(), MOCustomerAbstract::name(), and MOCustomerAbstract::title().

Referenced by address().

bool MOCustomer::isValid ( )
inline

returns whether the customer is valid

References MOCustomerAbstract::id().

Referenced by MCustomerDialog::MCustomerDialog().


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