Implemented base functionality for commodity grid on shop form.

This commit is contained in:
2016-07-13 15:15:18 +02:00
parent f9d7df9ab5
commit fb6b4fe027
15 changed files with 138 additions and 10 deletions
+9
View File
@@ -18,6 +18,7 @@ ShopForm::ShopForm(QWidget *parent) :
{
ui->setupUi(this);
m_itemsModel = NULL;
m_commodityModel = NULL;
ui->temporarySaveButton->setEnabled(false);
ui->saveButton->setEnabled(false);
@@ -54,6 +55,14 @@ void ShopForm::loadLast()
ui->saveButton->setEnabled(true);
ui->payButton->setEnabled(true);
}
if (m_commodityModel == NULL)
{
m_commodityModel = new AutoTableModel<ShopItem>(this);
ui->commodityTable->setModel(m_commodityModel);
}
m_commodityModel->setData(srv.allSellableItems());
}
void ShopForm::fillRaceiptCombo()