Implemented base functionality of DirectSaleForm.

This commit is contained in:
2016-04-13 22:37:41 +02:00
parent 049314a245
commit 2ed7d7077b
15 changed files with 206 additions and 14 deletions
+23
View File
@@ -6,9 +6,32 @@ DirectSaleForm::DirectSaleForm(QWidget *parent) :
ui(new Ui::DirectSaleForm)
{
ui->setupUi(this);
m_shopItem = QSharedPointer<DirectSaleItem>(new DirectSaleItem);
m_binder.setData(m_shopItem.data());
m_binder.registerBinding(ui->name);
m_binder.registerBinding(ui->unitPrice);
m_binder.registerBinding(ui->count);
m_binder.bindToUi();
}
DirectSaleForm::~DirectSaleForm()
{
delete ui;
}
QSharedPointer<IShopItem> DirectSaleForm::shopItem() const
{
return m_shopItem;
}
void DirectSaleForm::on_buttonBox_rejected()
{
this->reject();
}
void DirectSaleForm::on_buttonBox_accepted()
{
m_binder.bindToData();
this->accept();
}