Implemented base functionality of DirectSaleForm.
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user