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.
35 lines
619 B
C++
35 lines
619 B
C++
#include "acform.h"
|
|
#include "ui_acform.h"
|
|
#include <QList>
|
|
|
|
#include <settingsservice.h>
|
|
#include <settings/globalsettings.h>
|
|
|
|
#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);
|
|
}
|