#include "accserviceform.h" #include "ui_accserviceform.h" AccServiceForm::AccServiceForm(QWidget *parent) : AutoForm(parent), ui(new Ui::AccServiceForm) { ui->setupUi(this); registerBinding(ui->accServiceName); registerBinding(ui->price); registerBinding(ui->salePossible); registerBinding(ui->active); } AccServiceForm::~AccServiceForm() { delete ui; } void AccServiceForm::bindOtherToUi() { ui->serviceType->clear(); ui->serviceType->addItems(QStringList()<serviceType->setCurrentIndex(this->entity()->serviceType()); } bool AccServiceForm::bindOtherToData() { this->entity()->setServiceType((AccService::ServiceType)ui->serviceType->currentIndex()); return true; }