|
|
@ -60,6 +60,7 @@ void ShopForm::loadLast()
|
|
|
|
if (m_commodityModel == NULL)
|
|
|
|
if (m_commodityModel == NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
m_commodityModel = new AutoTableModel<ShopItem>(this);
|
|
|
|
m_commodityModel = new AutoTableModel<ShopItem>(this);
|
|
|
|
|
|
|
|
m_commodityModel->setTranslations(Context::instance().plugin("SHOP")->translations());
|
|
|
|
ui->commodityTable->setModel(m_commodityModel);
|
|
|
|
ui->commodityTable->setModel(m_commodityModel);
|
|
|
|
|
|
|
|
|
|
|
|
connect(ui->commodityTable->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, const QModelIndex &){
|
|
|
|
connect(ui->commodityTable->selectionModel(), &QItemSelectionModel::currentRowChanged, [this](const QModelIndex ¤t, const QModelIndex &){
|
|
|
@ -68,6 +69,8 @@ void ShopForm::loadLast()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
m_commodityModel->setData(srv.allSellableItems());
|
|
|
|
m_commodityModel->setData(srv.allSellableItems());
|
|
|
|
|
|
|
|
ui->commodityTable->horizontalHeader()->setSectionResizeMode(1, QHeaderView::Stretch);
|
|
|
|
|
|
|
|
ui->commodityTable->setColumnHidden(3, true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void ShopForm::fillRaceiptCombo()
|
|
|
|
void ShopForm::fillRaceiptCombo()
|
|
|
|