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.

32 lines
552 B
C++

#include "acform.h"
#include "ui_acform.h"
#include <QList>
#include "accommodation-odb.hxx"
AcForm::AcForm(QWidget *parent) :
AutoForm<Person>(parent),
ui(new Ui::AcForm)
{
ui->setupUi(this);
registerBinding(ui->firstName);
registerBinding(ui->lastName);
}
AcForm::~AcForm()
{
delete ui;
}
void AcForm::registerCombos()
{
QList<ComboData> cbData;
Service<Address> srv;
foreach (QSharedPointer<Address> adr, srv.all()) {
cbData.append(ComboData(adr));
}
registerBinding(ui->address, cbData);
}