Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
takeout_sbk
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
yunpeng.song
takeout_sbk
Commits
0e439129
Commit
0e439129
authored
Aug 14, 2018
by
wuyang.zou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug:修复 星巴克多家门店 pos 插件 点击按钮位置 不一样问题
parent
80399af3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
3 deletions
+25
-3
fmTakeout/Control/flowControl.cpp
+8
-3
fmTakeout/DTools/configManger.cpp
+11
-0
fmTakeout/DTools/configManger.h
+4
-0
fmTakeout/preDefine.h
+2
-0
No files found.
fmTakeout/Control/flowControl.cpp
View file @
0e439129
...
@@ -182,11 +182,16 @@ void FlowControl::_AddOrderPull(const QString &orderId, const QString &channel,
...
@@ -182,11 +182,16 @@ void FlowControl::_AddOrderPull(const QString &orderId, const QString &channel,
void
FlowControl
::
_ClickOMSAssignArea
()
void
FlowControl
::
_ClickOMSAssignArea
()
{
{
QPoint
point
=
ConfigManger
::
GetInstance
().
GetOMSBtnPostion
();
// 由于星巴克POS存在两种屏幕[①大屏:1366*768 ②小屏:1024*768] 因此采用获取系统屏幕底部坐标减去一个相对距离来实现正确的点击事件(2018-08-13 初步设定:x-10,y-30);
SetCursorPos
(
point
.
x
(),
point
.
y
());
// QPoint point=ConfigManger::GetInstance().GetOMSBtnPostion();
int
nWidth
=
GetSystemMetrics
(
SM_CXSCREEN
)
-
ConfigManger
::
GetInstance
().
GetOMSBtnWidthOffset
();
int
nHeight
=
GetSystemMetrics
(
SM_CYSCREEN
)
-
ConfigManger
::
GetInstance
().
GetOMSBtnHeightOffset
();
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"(x%1:,y:%2)"
).
arg
(
nWidth
).
arg
(
nHeight
);
SetCursorPos
(
nWidth
,
nHeight
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---触发按钮点击事件:Simphony获取订单请求->坐标(x%1:,y:%2):--->>>>]"
).
arg
(
point
.
x
()).
arg
(
point
.
y
());
//QLOG_INFO()<<QString::fromLocal8Bit("[<<<<---触发按钮点击事件:Simphony获取订单请求->坐标(x%1:,y:%2):--->>>>]").arg(point.x()).arg(point.y());
QLOG_INFO
()
<<
QString
::
fromLocal8Bit
(
"[<<<<---触发按钮点击事件:Simphony获取订单请求->坐标(x%1:,y:%2):--->>>>]"
).
arg
(
nWidth
).
arg
(
nHeight
);
}
}
void
FlowControl
::
_ClickToLogin
()
void
FlowControl
::
_ClickToLogin
()
...
...
fmTakeout/DTools/configManger.cpp
View file @
0e439129
...
@@ -149,6 +149,17 @@ QPoint ConfigManger::GetOMSBtnPostion()
...
@@ -149,6 +149,17 @@ QPoint ConfigManger::GetOMSBtnPostion()
return
m_userConfig
->
value
(
INI_OMSBTNPOSTION
).
toPoint
();
return
m_userConfig
->
value
(
INI_OMSBTNPOSTION
).
toPoint
();
}
}
int
ConfigManger
::
GetOMSBtnWidthOffset
()
{
return
m_userConfig
->
value
(
INI_OMSBTNWIDTHOFFSET
).
toInt
();
}
int
ConfigManger
::
GetOMSBtnHeightOffset
()
{
return
m_userConfig
->
value
(
INI_OMSBTNHEIGHTOFFSET
).
toInt
();
}
int
ConfigManger
::
GetLoginSslConfig
()
int
ConfigManger
::
GetLoginSslConfig
()
{
{
return
m_config
->
value
(
"SSLConfig/login"
).
toInt
();
return
m_config
->
value
(
"SSLConfig/login"
).
toInt
();
...
...
fmTakeout/DTools/configManger.h
View file @
0e439129
...
@@ -127,6 +127,10 @@ public:
...
@@ -127,6 +127,10 @@ public:
QString
GetIpAddress
();
QString
GetIpAddress
();
QPoint
GetOMSBtnPostion
();
QPoint
GetOMSBtnPostion
();
// 获取Simphony 为OMS所做button 相对系统屏幕最右下角的偏移位置;
int
ConfigManger
::
GetOMSBtnWidthOffset
();
int
ConfigManger
::
GetOMSBtnHeightOffset
();
int
GetLoginSslConfig
();
int
GetLoginSslConfig
();
int
GetOrderSslConfig
();
int
GetOrderSslConfig
();
...
...
fmTakeout/preDefine.h
View file @
0e439129
...
@@ -24,6 +24,8 @@
...
@@ -24,6 +24,8 @@
#define INI_STORESERVER "FmServer/storeUrl"
#define INI_STORESERVER "FmServer/storeUrl"
#define INI_PRINTERNAME "Printer/name"
#define INI_PRINTERNAME "Printer/name"
#define INI_OMSBTNPOSTION "OmsBtn/postion"
#define INI_OMSBTNPOSTION "OmsBtn/postion"
#define INI_OMSBTNWIDTHOFFSET "OmsBtn/widthoffset"
#define INI_OMSBTNHEIGHTOFFSET "OmsBtn/heightoffset"
#define INI_FLOATPOSTION "Float/postion"
#define INI_FLOATPOSTION "Float/postion"
#define INI_FLOATOPACITY "Float/opacity"
#define INI_FLOATOPACITY "Float/opacity"
#define INI_BLINKINTERVAL "Float/blinkInterval"
#define INI_BLINKINTERVAL "Float/blinkInterval"
...
...
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