2017-04-19 22:38:49 +02:00
|
|
|
#ifndef CAMPGRID_H
|
|
|
|
|
#define CAMPGRID_H
|
|
|
|
|
|
|
|
|
|
#include <core.h>
|
|
|
|
|
#include "data/camp-data.h"
|
|
|
|
|
|
2017-06-08 14:24:33 +02:00
|
|
|
#include "detailwidget.h"
|
|
|
|
|
|
2017-04-19 22:38:49 +02:00
|
|
|
class CampGrid : public GridForm<CampData>
|
|
|
|
|
{
|
2017-06-09 10:31:36 +02:00
|
|
|
Q_OBJECT
|
2017-04-19 22:38:49 +02:00
|
|
|
public:
|
2023-04-28 22:25:29 +02:00
|
|
|
explicit CampGrid(QWidget *parent = nullptr);
|
2017-05-13 21:57:11 +02:00
|
|
|
|
|
|
|
|
// IGridForm interface
|
|
|
|
|
protected:
|
2023-04-28 22:25:29 +02:00
|
|
|
void handleNewRecord() override;
|
|
|
|
|
void handleEditRecord() override;
|
2017-06-07 15:57:15 +02:00
|
|
|
|
|
|
|
|
// GridForm interface
|
|
|
|
|
protected:
|
2023-04-28 22:25:29 +02:00
|
|
|
void doDelete(CampDataPtr entity) override;
|
2017-06-07 15:57:15 +02:00
|
|
|
|
|
|
|
|
private:
|
2023-04-28 22:25:29 +02:00
|
|
|
void addToVoucher(const CampDataPtr& data);
|
2017-06-08 14:24:33 +02:00
|
|
|
DetailWidget *m_detail;
|
|
|
|
|
|
2017-06-07 15:57:15 +02:00
|
|
|
|
2017-06-08 14:24:33 +02:00
|
|
|
// IGridForm interface
|
|
|
|
|
protected:
|
2023-04-28 22:25:29 +02:00
|
|
|
void currentIndexChanged(const QModelIndex ¤t) override;
|
2018-06-19 20:19:54 +02:00
|
|
|
|
|
|
|
|
// GridForm interface
|
|
|
|
|
protected:
|
2023-04-28 22:25:29 +02:00
|
|
|
QList<CampDataPtr> listForGrid() override;
|
2017-04-19 22:38:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // CAMPGRID_H
|