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.

49 lines
960 B
C++

#ifndef SALE_H
#define SALE_H
#include <QObject>
#include <QDecDouble.hh>
#include <combodata.h>
#include "../camp_global.h"
class Sale : public ComboItem
{
Q_OBJECT
QX_REGISTER_FRIEND_CLASS(Sale)
Q_PROPERTY(QString description READ description WRITE setDescription)
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
Q_PROPERTY(bool fixed READ fixed WRITE setFixed)
public:
explicit Sale(QObject *parent = nullptr);
long id() const;
void setId(long id);
QDecDouble sale() const;
void setSale(QDecDouble sale);
bool fixed() const;
void setFixed(bool fixed);
QString description() const;
void setDescription(const QString &description);
private:
long m_id;
QString m_description;
int m_sale;
bool m_fixed;
// ComboItem interface
public:
bool eq(ComboItem *other) override;
QString toString() override;
};
QX_REGISTER_HPP_CAMP(Sale, ComboItem, 0)
#endif // SALE_H