new plugin commodity implemented
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#ifndef COMMODITYTYPEDATA_H
|
||||
#define COMMODITYTYPEDATA_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <odb/core.hxx>
|
||||
#include <data/comboitem.h>
|
||||
|
||||
#pragma db object
|
||||
class CommodityTypeData :public ComboItem
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QString name READ name WRITE setName)
|
||||
|
||||
public:
|
||||
CommodityTypeData(QObject *parent = 0);
|
||||
|
||||
int id() const;
|
||||
void setId(int id);
|
||||
|
||||
QString name() const;
|
||||
void setName(const QString &name);
|
||||
|
||||
private:
|
||||
friend class odb::access;
|
||||
#pragma db id auto
|
||||
int m_id;
|
||||
QString m_name;
|
||||
|
||||
// ComboItem interface
|
||||
public:
|
||||
bool eq(ComboItem *other);
|
||||
QString toString();
|
||||
};
|
||||
|
||||
#endif // COMMODITYTYPEDATA_H
|
||||
Reference in New Issue
Block a user