#include "dialog.h" #include "ui_dialog.h" #include #include #include "data/person.h" #include "accommodation-odb.hxx" Dialog::Dialog(QWidget *parent) : QDialog(parent), ui(new Ui::Dialog) { ui->setupUi(this); } Dialog::~Dialog() { delete ui; } void Dialog::on_buttonBox_accepted() { IPlugin *plugin = Context::instance().plugins().at(0); QSharedPointer p(new Person()); p->setFirstName(ui->lineEdit->text()); p->setLastName(ui->lineEdit_2->text()); plugin->service()->save(p); }