oopapidocs
2.0
|
00001 #ifndef _COUNTRY_H 00002 #define _COUNTRY_H 00003 #include <qstringlist.h> 00004 #include "dataobject.h" 00005 00018 class DOBJS_EXPORT Country : public DataObject { 00019 Q_OBJECT 00020 Q_PROPERTY( CountryType val READ getVal WRITE setVal ); 00021 Q_ENUMS(CountryType); 00022 public: 00026 enum CountryType {Undefined=0, USA, Canada}; 00027 00028 Country(CountryType val=USA) : m_Val(val) {} 00029 Country(const QString& str); 00030 00036 Country& operator=(const Country& newCountry) { 00037 m_Val=newCountry.m_Val; 00038 return *this; 00039 } 00043 static QStringList getCountryNames() ; 00044 00045 CountryType getVal() const { 00046 return m_Val; 00047 } 00048 00049 void setVal(CountryType nc) { 00050 m_Val = nc; 00051 } 00052 00053 QString toString() const; 00054 00055 private: 00056 // static QStringList sm_CountryNames; 00057 CountryType m_Val; 00058 }; 00059 #endif