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.

81 lines
2.0 KiB
C++

#ifndef ADDRESSITEM_H
#define ADDRESSITEM_H
#include "camp-data.h"
#include <QObject>
#include <QSharedPointer>
#include <QWeakPointer>
#include <QDecDouble.hh>
#include <data/addressbookdata.h>
#include "../camp_global.h"
class CampData;
class AddressItem : public QObject
{
Q_OBJECT
QX_REGISTER_FRIEND_CLASS(AddressItem)
Q_PROPERTY(QString firstName READ firstName WRITE setFirstName)
Q_PROPERTY(QString lastName READ lastName WRITE setLastName)
Q_PROPERTY(QString address READ address WRITE setAddress)
Q_PROPERTY(QDecDouble price READ price WRITE setPrice)
Q_PROPERTY(QDecDouble sale READ sale WRITE setSale)
Q_PROPERTY(QDecDouble totalPrice READ totalPrice WRITE setTotalPrice)
Q_PROPERTY(bool owner READ owner WRITE setOwner)
public:
explicit AddressItem(QObject *parent = 0);
long id() const;
void setId(long id);
QString firstName() const;
void setFirstName(const QString &firstName);
QString lastName() const;
void setLastName(const QString &lastName);
QString address() const;
void setAddress(const QString &address);
QDecDouble price() const;
void setPrice(QDecDouble price);
QSharedPointer<CampData> campData() const;
void setCampData(const QSharedPointer<CampData> &campData);
PersonPricePtr personPrice() const;
void setPersonPrice(const PersonPricePtr &personPrice);
AddressbookDataPtr adbItem() const;
void setAdbItem(const AddressbookDataPtr &adbItem);
bool owner() const;
void setOwner(bool owner);
QDecDouble totalPrice() const;
void setTotalPrice(QDecDouble totalPrice);
QDecDouble sale() const;
void setSale(QDecDouble sale);
private:
long m_id;
QString m_firstName;
QString m_lastName;
QString m_address;
AddressbookDataPtr m_adbItem;
int m_price;
int m_totalPrice;
int m_sale;
CampDataPtr m_campData;
PersonPricePtr m_personPrice;
bool m_owner;
};
QX_REGISTER_HPP_CAMP(AddressItem, QObject, 0)
#endif // ADDRESSITEM_H