#include "campgrid.h" #include "campwizard.h" #include "campservice.h" CampGrid::CampGrid(QWidget *parent) : GridForm(parent) { setTableModel(new AutoTableModel); } 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() { }