Commit 632fcc53 by 李定达

1.添加标签打印可选配置

parent 74f20383
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include <QsLog.h> #include <QsLog.h>
PrintLib::PrintLib() PrintLib::PrintLib()
{ {
m_b_load_sucfl =false; m_b_load_sucfl =false;
...@@ -150,7 +151,12 @@ bool PrintLib::DoPrint(const QByteArray &content, OrderObject *orderObject, QStr ...@@ -150,7 +151,12 @@ bool PrintLib::DoPrint(const QByteArray &content, OrderObject *orderObject, QStr
return false; return false;
} }
_PrintLineNode(doc,_order); _PrintLineNode(doc,_order);
_PrintLab(_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
f_ClosePrinter(); f_ClosePrinter();
return true; return true;
} }
...@@ -187,7 +193,12 @@ bool PrintLib::DoPrint(const QString &content, OrderObject *orderObject, QString ...@@ -187,7 +193,12 @@ bool PrintLib::DoPrint(const QString &content, OrderObject *orderObject, QString
return false; return false;
} }
_PrintLineNode(doc,_order); _PrintLineNode(doc,_order);
_PrintLab(_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
f_ClosePrinter(); f_ClosePrinter();
return true; return true;
} }
......
...@@ -61,6 +61,7 @@ ...@@ -61,6 +61,7 @@
#define INI_UIVISIBLE "Ui/visible" #define INI_UIVISIBLE "Ui/visible"
#define INI_NEEDPTR "all/needotherprt" #define INI_NEEDPTR "all/needotherprt"
#define INI_NEEDLABEL "all/needlabel"
#define INI_PUSHSERVER "info/pushserver" #define INI_PUSHSERVER "info/pushserver"
#define INI_GETSERVER "info/getserver" #define INI_GETSERVER "info/getserver"
......
...@@ -402,6 +402,13 @@ void PrtSettingForm::on_btn_lab_save_clicked() ...@@ -402,6 +402,13 @@ void PrtSettingForm::on_btn_lab_save_clicked()
else else
labtype = "1"; labtype = "1";
QString confilename = qApp->applicationDirPath() + "/" + CONFIG_NAME;
if(ui->checkBox_needlabel->isChecked())
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 1);
else
QSettings(confilename, QSettings::IniFormat).setValue(INI_NEEDLABEL, 0);
QString wigth = ui->lineEdit_lab_widgh->text(); QString wigth = ui->lineEdit_lab_widgh->text();
QString high = ui->lineEdit_lab_high->text(); QString high = ui->lineEdit_lab_high->text();
......
...@@ -1056,6 +1056,26 @@ ...@@ -1056,6 +1056,26 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_25">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item>
<widget class="QCheckBox" name="checkBox_needlabel">
<property name="text">
<string>打印杯贴</string>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
<item> <item>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment