You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
743 B
C

#ifndef COMMODITYTYPEDATA_H
#define COMMODITYTYPEDATA_H
#include <QObject>
#include <QString>
#include <data/comboitem.h>
#include "../commodity_global.h"
class CommodityTypeData :public ComboItem
{
Q_OBJECT
QX_REGISTER_FRIEND_CLASS(CommodityTypeData)
Q_PROPERTY(QString name READ name WRITE setName)
public:
explicit CommodityTypeData(QObject *parent = nullptr);
long id() const;
void setId(long id);
QString name() const;
void setName(const QString &name);
private:
long m_id{0};
QString m_name;
// ComboItem interface
public:
bool eq(ComboItem *other) override;
QString toString() override;
};
QX_REGISTER_HPP_COMM(CommodityTypeData, ComboItem, 0)
#endif // COMMODITYTYPEDATA_H