Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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
xiaojing.zhang
fmp_vip
Commits
49d66828
Commit
49d66828
authored
Feb 02, 2018
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 临时版本:数据传输完毕后向屏幕发送鼠标点击事件解决POS获取不到焦点问题。
parent
1cb233de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
fmp_vip_server.cpp
+8
-0
fmp_vip_server.h
+2
-0
No files found.
fmp_vip_server.cpp
View file @
49d66828
...
...
@@ -2,6 +2,8 @@
#include "fmvipdispatcher.h"
#include "fmp_vip_settings.h"
#include <QTcpSocket>
#include <Windows.h>
#include <QDesktopWidget>
#include <QDebug>
FMPVipServer
*
FMPVipServer
::
instance
()
...
...
@@ -18,6 +20,8 @@ FMPVipServer::FMPVipServer() :
Listen
(
23770
);
connect
(
this
,
&
QTcpServer
::
newConnection
,
this
,
&
FMPVipServer
::
onNewConnection
);
isNeedSocketHeader
=
FMPVipSettings
::
instance
()
->
getIsNeedSocketHeader
();
_centerPoint
=
QPoint
(
qApp
->
desktop
()
->
width
()
/
2
,
qApp
->
desktop
()
->
height
()
/
2
);
}
void
FMPVipServer
::
Listen
(
quint16
port
)
...
...
@@ -76,4 +80,8 @@ void FMPVipServer::onReadyRead()
socket
->
close
();
socket
->
deleteLater
();
socket
=
nullptr
;
//! WARNING 这是一个临时版本,以解决POS接收消息后获取不到焦点问题。
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
_centerPoint
.
x
(),
_centerPoint
.
y
(),
0
,
0
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
_centerPoint
.
x
(),
_centerPoint
.
y
(),
0
,
0
);
}
fmp_vip_server.h
View file @
49d66828
...
...
@@ -36,6 +36,8 @@ private:
FMVipDispatcher
*
dispatcher
;
bool
isNeedSocketHeader
;
QPoint
_centerPoint
;
};
#endif // FMP_VIP_SERVER_H
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