Implemented search in shop items on ShopForm. Prepare for favorite buttons.
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
#include "ui_shopsettingsform.h"
|
||||
|
||||
#include <settingsservice.h>
|
||||
#include "shopservice.h"
|
||||
|
||||
ShopSettingsForm::ShopSettingsForm(QWidget *parent) :
|
||||
FormBinder<ShopSettings>(parent),
|
||||
@@ -12,6 +13,8 @@ ShopSettingsForm::ShopSettingsForm(QWidget *parent) :
|
||||
registerBinding(ui->output);
|
||||
registerBinding(ui->lettersPerLine);
|
||||
registerBinding(ui->byMessage);
|
||||
|
||||
m_itemModel = new AutoTableModel<ShopItem>();
|
||||
}
|
||||
|
||||
ShopSettingsForm::~ShopSettingsForm()
|
||||
@@ -24,6 +27,10 @@ void ShopSettingsForm::loadEntity()
|
||||
SettingsService srv("SHOP");
|
||||
ShopSettingsPtr settings = srv.loadSettings<ShopSettings>();
|
||||
setEntity(settings);
|
||||
|
||||
ShopService srvShop;
|
||||
m_itemModel->setData(srvShop.allSellableItems());
|
||||
ui->tableItems->setModel(m_itemModel);
|
||||
}
|
||||
|
||||
bool ShopSettingsForm::saveRecord()
|
||||
|
||||
Reference in New Issue
Block a user