Added setting for bill double printing.
This commit is contained in:
@@ -16,6 +16,8 @@ ShopSettings::ShopSettings(QObject *parent) : QObject(parent)
|
||||
|
||||
m_rounding = Enums::R_NONE;
|
||||
m_decimalPlaces = 0;
|
||||
|
||||
m_doublePrint = false;
|
||||
}
|
||||
|
||||
QString ShopSettings::output() const
|
||||
@@ -197,3 +199,23 @@ void ShopSettings::setRoundingItem(const QString &roundingItem)
|
||||
{
|
||||
m_roundingItem = roundingItem;
|
||||
}
|
||||
|
||||
bool ShopSettings::doublePrint() const
|
||||
{
|
||||
return m_doublePrint;
|
||||
}
|
||||
|
||||
void ShopSettings::setDoublePrint(bool doublePrint)
|
||||
{
|
||||
m_doublePrint = doublePrint;
|
||||
}
|
||||
|
||||
QString ShopSettings::doublePrintItem() const
|
||||
{
|
||||
return m_doublePrintItem;
|
||||
}
|
||||
|
||||
void ShopSettings::setDoublePrintItem(const QString &doublePrintItem)
|
||||
{
|
||||
m_doublePrintItem = doublePrintItem;
|
||||
}
|
||||
|
||||
@@ -23,6 +23,9 @@ class ShopSettings : public QObject
|
||||
Q_PROPERTY(int favBtnRows READ favBtnRows WRITE setFavBtnRows)
|
||||
Q_PROPERTY(int favBtnSize READ favBtnSize WRITE setFavBtnSize)
|
||||
|
||||
Q_PROPERTY(bool doublePrint READ doublePrint WRITE setDoublePrint)
|
||||
Q_PROPERTY(QString doublePrintItem READ doublePrintItem WRITE setDoublePrintItem)
|
||||
|
||||
Q_PROPERTY(Enums::Rounding rounding READ rounding WRITE setRounding)
|
||||
Q_PROPERTY(int decimalPlaces READ decimalPlaces WRITE setDecimalPlaces)
|
||||
Q_PROPERTY(QString roundingItem READ roundingItem WRITE setRoundingItem)
|
||||
@@ -91,6 +94,12 @@ public:
|
||||
QString roundingItem() const;
|
||||
void setRoundingItem(const QString &roundingItem);
|
||||
|
||||
bool doublePrint() const;
|
||||
void setDoublePrint(bool doublePrint);
|
||||
|
||||
QString doublePrintItem() const;
|
||||
void setDoublePrintItem(const QString &doublePrintItem);
|
||||
|
||||
private:
|
||||
QString m_output;
|
||||
CODEPAGE m_codepage;
|
||||
@@ -106,6 +115,9 @@ private:
|
||||
bool m_eetTest;
|
||||
bool m_eetPlayground;
|
||||
|
||||
bool m_doublePrint;
|
||||
QString m_doublePrintItem;
|
||||
|
||||
int m_favBtnCols;
|
||||
int m_favBtnRows;
|
||||
int m_favBtnSize;
|
||||
|
||||
@@ -45,6 +45,9 @@ ShopSettingsForm::ShopSettingsForm(QWidget *parent) :
|
||||
registerBinding(ui->decimalPlaces);
|
||||
registerBinding(ui->roundingItem);
|
||||
|
||||
registerBinding(ui->doublePrint);
|
||||
registerBinding(ui->doublePrintItem);
|
||||
|
||||
m_itemModel = new AutoTableModel<ShopItem>();
|
||||
}
|
||||
|
||||
|
||||
@@ -320,6 +320,31 @@
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QGroupBox" name="doublePrint">
|
||||
<property name="title">
|
||||
<string>Doub&le print bill</string>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QFormLayout" name="formLayout_5">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label_15">
|
||||
<property name="text">
|
||||
<string>Item name</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QLineEdit" name="doublePrintItem"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
|
||||
Reference in New Issue
Block a user