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.

70 lines
1.4 KiB
C++

#ifndef CAMPWIZARD_H
#define CAMPWIZARD_H
#include <QWizard>
#include "data/camp-data.h"
#include <objectbinder.h>
#include <data/addressbookdata.h>
#include <core.h>
class AddressHelper : public QObject
{
Q_OBJECT
Q_PROPERTY(QSharedPointer<QObject> address READ address WRITE setAddress)
public:
AddressHelper(QObject *parent = NULL);
QSharedPointer<QObject> address() const;
void setAddress(const QSharedPointer<QObject> &address);
AddressbookDataPtr addr() const;
void setAddr(const AddressbookDataPtr &address);
AddressbookDataPtr newAddress();
AddressbookDataPtr copyAddress();
private:
AddressbookDataPtr m_address;
AddressbookDataPtr m_copyAddress;
};
namespace Ui {
class CampWizard;
}
class CampWizard : public QWizard
{
Q_OBJECT
public:
explicit CampWizard(QWidget *parent = 0);
~CampWizard();
void setData(const CampDataPtr &data);
private slots:
void on_btnAdd_clicked();
void on_address_currentIndexChanged(int index);
void on_btnRemove_clicked();
void on_btnOwner_clicked();
void on_groupNew_clicked(bool checked);
private:
Ui::CampWizard *ui;
CampDataPtr m_data;
ObjectBinder *m_dataBinder;
ObjectBinder *m_addrHelperBinder;
ObjectBinder *m_addressBinder;
AddressHelper *m_addrHelper;
AutoTableModel<AddressItem> *m_peopleModel;
bool m_bindAddrCombo;
};
#endif // CAMPWIZARD_H