|
|
|
#include "shop.h"
|
|
|
|
#include <QIcon>
|
|
|
|
#include "shopform.h"
|
|
|
|
#include "shopservice.h"
|
|
|
|
#include "settings/shopsettingsform.h"
|
|
|
|
|
|
|
|
|
|
|
|
Shop::Shop()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void Shop::initServiceUi()
|
|
|
|
{
|
|
|
|
m_ui = new ShopForm();
|
|
|
|
m_service = new ShopService();
|
|
|
|
m_settingsUi = new ShopSettingsForm();
|
|
|
|
}
|
|
|
|
|
|
|
|
QIcon Shop::pluginIcon()
|
|
|
|
{
|
|
|
|
return QIcon(":/icons/shop.svg");
|
|
|
|
}
|
|
|
|
|
|
|
|
QWidget *Shop::ui()
|
|
|
|
{
|
|
|
|
QWidget *uiWidget = IPlugin::ui();
|
|
|
|
|
|
|
|
if (uiWidget == NULL)
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
qobject_cast<ShopForm*>(uiWidget)->loadLast();
|
|
|
|
qobject_cast<ShopForm*>(uiWidget)->fillRaceiptCombo();
|
|
|
|
qobject_cast<ShopForm*>(uiWidget)->loadButtons();
|
|
|
|
return uiWidget;
|
|
|
|
}
|
|
|
|
|
|
|
|
QTranslator *Shop::translator()
|
|
|
|
{
|
|
|
|
return translatorFrom(":/translations/shop_");
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Shop::hasNumberSeries()
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
QString Shop::numberSeriesPrefix()
|
|
|
|
{
|
|
|
|
return "PD";
|
|
|
|
}
|