Implemented base functionality for commodity grid on shop form.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user