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.

29 lines
552 B
C++

#include "campgrid.h"
#include "campwizard.h"
#include "campservice.h"
CampGrid::CampGrid(QWidget *parent) : GridForm<CampData>(parent)
{
setTableModel(new AutoTableModel<CampData>);
}
void CampGrid::handleNewRecord()
{
CampService srv;
CampDataPtr data = srv.create();
CampWizard *wizard = new CampWizard();
wizard->setAttribute(Qt::WA_DeleteOnClose);
wizard->setData(data);
connect(wizard, &QDialog::accepted, [this, data](){
addRow(data);
});
wizard->show();
}
void CampGrid::handleEditRecord()
{
}