Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmtakeout
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李定达
fmtakeout
Commits
632fcc53
Commit
632fcc53
authored
Oct 15, 2018
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.添加标签打印可选配置
parent
74f20383
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
0 deletions
+39
-0
takeout/base/Print/printlib.cpp
+11
-0
takeout/preDefine.h
+1
-0
takeout/view/prtsettingform.cpp
+7
-0
takeout/view/prtsettingform.ui
+20
-0
No files found.
takeout/base/Print/printlib.cpp
View file @
632fcc53
...
...
@@ -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
;
}
...
...
takeout/preDefine.h
View file @
632fcc53
...
...
@@ -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"
...
...
takeout/view/prtsettingform.cpp
View file @
632fcc53
...
...
@@ -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
();
...
...
takeout/view/prtsettingform.ui
View file @
632fcc53
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment