Commit 632fcc53 by 李定达

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

parent 74f20383
......@@ -9,6 +9,7 @@
#include <QsLog.h>
PrintLib::PrintLib()
{
m_b_load_sucfl =false;
......@@ -150,7 +151,12 @@ bool PrintLib::DoPrint(const QByteArray &content, OrderObject *orderObject, QStr
return false;
}
_PrintLineNode(doc,_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
f_ClosePrinter();
return true;
}
......@@ -187,7 +193,12 @@ bool PrintLib::DoPrint(const QString &content, OrderObject *orderObject, QString
return false;
}
_PrintLineNode(doc,_order);
QString confilename = qApp->applicationDirPath() + "/" + "config.ini";
int needlabel = QSettings(confilename, QSettings::IniFormat).value("all/needlabel", 0).toInt();
if(needlabel)
_PrintLab(_order);
f_ClosePrinter();
return true;
}
......
......@@ -61,6 +61,7 @@
#define INI_UIVISIBLE "Ui/visible"
#define INI_NEEDPTR "all/needotherprt"
#define INI_NEEDLABEL "all/needlabel"
#define INI_PUSHSERVER "info/pushserver"
#define INI_GETSERVER "info/getserver"
......
......@@ -402,6 +402,13 @@ void PrtSettingForm::on_btn_lab_save_clicked()
else
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 high = ui->lineEdit_lab_high->text();
......
......@@ -1056,6 +1056,26 @@
</property>
</widget>
</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>
</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