Added setting for hide control for item count on shop form.

This commit is contained in:
2021-01-29 22:09:34 +01:00
parent ad9a66ab32
commit ab20fe9b34
8 changed files with 52 additions and 12 deletions
+14 -4
View File
@@ -155,11 +155,8 @@ void ShopForm::loadLast()
}
}
void ShopForm::loadButtons()
void ShopForm::loadButtons(const ShopSettingsPtr& settings)
{
SettingsService srv("SHOP");
ShopSettingsPtr settings = srv.loadSettings<ShopSettings>();
Service<FavoritItem> srvFav;
QMap<QString, FavoritItemPtr> btnMap;
@@ -234,6 +231,19 @@ void ShopForm::setEetStatusText(const QString &statusText)
ui->lblEetState->setText(statusText);
}
void ShopForm::setupForm()
{
SettingsService srv("SHOP");
ShopSettingsPtr settings = srv.loadSettings<ShopSettings>();
ui->spnCount->setVisible(settings->showCount());
ui->lblCount->setVisible(settings->showCount());
loadLast();
fillRaceiptCombo();
loadButtons(settings);
}
void ShopForm::on_directSale_clicked()
{
SettingsService srv("SHOP");