|
|
|
#ifndef COUNTRYDATA_H
|
|
|
|
#define COUNTRYDATA_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QString>
|
|
|
|
#include <QSharedPointer>
|
|
|
|
#include "../countryregister_global.h"
|
|
|
|
#include <QxOrm.h>
|
|
|
|
#include <combodata.h>
|
|
|
|
|
|
|
|
#include <QtCore/qglobal.h>
|
|
|
|
|
|
|
|
class COUNTRYREGISTERSHARED_EXPORT CountryData : public ComboItem
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
QX_REGISTER_FRIEND_CLASS(CountryData)
|
|
|
|
Q_PROPERTY(QString code2 READ code2 WRITE setCode2)
|
|
|
|
Q_PROPERTY(QString code3 READ code3 WRITE setCode3)
|
|
|
|
Q_PROPERTY(QString czechFullName READ czechFullName WRITE setCzechFullName)
|
|
|
|
Q_PROPERTY(QString czechName READ czechName WRITE setCzechName)
|
|
|
|
Q_PROPERTY(QString englishFullName READ englishFullName WRITE setEnglishFullName)
|
|
|
|
Q_PROPERTY(QString englishName READ englishName WRITE setEnglishName)
|
|
|
|
public:
|
|
|
|
Q_INVOKABLE explicit CountryData(QObject *parent = 0);
|
|
|
|
|
|
|
|
long id() const;
|
|
|
|
void setId(long id);
|
|
|
|
|
|
|
|
QString code2() const;
|
|
|
|
void setCode2(const QString &code2);
|
|
|
|
|
|
|
|
QString code3() const;
|
|
|
|
void setCode3(const QString &code3);
|
|
|
|
|
|
|
|
QString czechFullName() const;
|
|
|
|
void setCzechFullName(const QString &czechFullName);
|
|
|
|
|
|
|
|
QString czechName() const;
|
|
|
|
void setCzechName(const QString &czechName);
|
|
|
|
|
|
|
|
QString englishFullName() const;
|
|
|
|
void setEnglishFullName(const QString &englishFullName);
|
|
|
|
|
|
|
|
QString englishName() const;
|
|
|
|
void setEnglishName(const QString &englishName);
|
|
|
|
|
|
|
|
private:
|
|
|
|
long m_id{0};
|
|
|
|
QString m_code2;
|
|
|
|
QString m_code3;
|
|
|
|
QString m_czechFullName;
|
|
|
|
QString m_czechName;
|
|
|
|
QString m_englishFullName;
|
|
|
|
QString m_englishName;
|
|
|
|
|
|
|
|
|
|
|
|
// ComboItem interface
|
|
|
|
public:
|
|
|
|
bool eq(ComboItem *other) override;
|
|
|
|
QString toString() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef QSharedPointer<CountryData> CountryDataPtr;
|
|
|
|
|
|
|
|
QX_REGISTER_HPP_COUNTRY(CountryData, ComboItem, 0)
|
|
|
|
|
|
|
|
#endif // COUNTRYDATA_H
|