|
|
|
#ifndef CAMPGRID_H
|
|
|
|
#define CAMPGRID_H
|
|
|
|
|
|
|
|
#include <core.h>
|
|
|
|
#include "data/camp-data.h"
|
|
|
|
|
|
|
|
#include "detailwidget.h"
|
|
|
|
|
|
|
|
class CampGrid : public GridForm<CampData>
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit CampGrid(QWidget *parent = nullptr);
|
|
|
|
|
|
|
|
// IGridForm interface
|
|
|
|
protected:
|
|
|
|
void handleNewRecord() override;
|
|
|
|
void handleEditRecord() override;
|
|
|
|
|
|
|
|
// GridForm interface
|
|
|
|
protected:
|
|
|
|
void doDelete(CampDataPtr entity) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
void addToVoucher(const CampDataPtr& data);
|
|
|
|
DetailWidget *m_detail;
|
|
|
|
|
|
|
|
|
|
|
|
// IGridForm interface
|
|
|
|
protected:
|
|
|
|
void currentIndexChanged(const QModelIndex ¤t) override;
|
|
|
|
|
|
|
|
// GridForm interface
|
|
|
|
protected:
|
|
|
|
QList<CampDataPtr> listForGrid() override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CAMPGRID_H
|