oopapidocs  2.0
customer.cpp
00001 #include "customer.h"
00002 #include "address.h"
00003 
00004 Customer::Customer(QString name, QString id, CustomerType type) {
00005     setName(name);
00006     setId(id);
00007     setType(type);
00008 }
00009 
00014 Address* Customer::getAddress(QString name) const {
00015        Address* retval = findChild<Address*>(name);
00016        return retval;
00017 }
00018 
00019 void Customer::setAddress(Address* address, QString name) {
00020     address->setParent(this);
00021     address->setObjectName(name);
00022 }
00023 
00024 void Customer::setName(const QString &newName) {
00025     //  m_Name=newName;
00026     DataObject::setObjectName(newName);
00027 }
00028 
00029 void Customer::setId(const QString &newId) {
00030     m_Id=newId;
00031 }
00032 
00033 void Customer::setDateEstablished(const QDate & newDate) {
00034     m_DateEstablished = newDate;
00035 }
00036 
00037 void Customer::setType(CustomerType newType) {
00038     m_Type = newType;
00039 }
00040 
00041 void Customer::setTypeString(QString newType) {
00042     m_Type.fromString(newType);
00043 }
00044 
 All Classes Namespaces Functions Enumerations