Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FmclientUi
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
shuai.liu
FmclientUi
Commits
20527f5d
Commit
20527f5d
authored
Dec 14, 2017
by
刘帅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 实现支付过程中置顶窗口
parent
918e3391
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
63 additions
and
3 deletions
+63
-3
.gitignore
+1
-2
bin/FmclientUi.exe
+0
-0
bin/测试数据.txt
+33
-0
main.cpp
+1
-1
widget.cpp
+27
-0
widget.h
+1
-0
No files found.
.gitignore
View file @
20527f5d
...
@@ -68,5 +68,4 @@ Thumbs.db
...
@@ -68,5 +68,4 @@ Thumbs.db
# Binaries
# Binaries
# --------
# --------
*.exe
bin/FmclientUi.exe
View file @
20527f5d
No preview for this file type
bin/测试数据.txt
0 → 100644
View file @
20527f5d
{
{
"business_date": "20171214",
"clientReqCount": 1,
"operator_id": "001",
"partnerId": "1371",
"reqtype": 72,
"station_id": "1",
"store_id": "fm99999",
"trans_id": "201712140003",
"transactions": [
{
"amount": 2,
"code": "134638432582236320",
"products": [
{
"consume_num": 1,
"pid": "0079020",
"price": 1000
},
{
"consume_num": 1,
"pid": "0077842",
"price": 8000
}
],
"undis_amount": 0
}
],
"ver": 2,
"checkValue":32.12
}
\ No newline at end of file
main.cpp
View file @
20527f5d
...
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
...
@@ -9,7 +9,7 @@ int main(int argc, char *argv[])
Widget
w
;
Widget
w
;
QFmClient
client
;
QFmClient
client
;
QObject
::
connect
(
&
client
,
&
QFmClient
::
HideUi
,
&
w
,
&
Widget
::
hide
,
Qt
::
QueuedConnection
);
QObject
::
connect
(
&
client
,
&
QFmClient
::
HideUi
,
&
w
,
&
Widget
::
hide
,
Qt
::
QueuedConnection
);
QObject
::
connect
(
&
client
,
&
QFmClient
::
ShowUi
,
&
w
,
&
Widget
::
show
,
Qt
::
QueuedConnection
);
QObject
::
connect
(
&
client
,
&
QFmClient
::
ShowUi
,
&
w
,
&
Widget
::
show
Top
,
Qt
::
QueuedConnection
);
client
.
start
();
client
.
start
();
return
a
.
exec
();
return
a
.
exec
();
}
}
widget.cpp
View file @
20527f5d
...
@@ -3,6 +3,8 @@
...
@@ -3,6 +3,8 @@
#include <QPixmap>
#include <QPixmap>
#include <QPropertyAnimation>
#include <QPropertyAnimation>
#include <Windows.h>
#pragma comment(lib, "user32.lib")
Widget
::
Widget
(
QWidget
*
parent
)
:
Widget
::
Widget
(
QWidget
*
parent
)
:
QWidget
(
parent
),
QWidget
(
parent
),
...
@@ -43,3 +45,28 @@ void Widget::move()
...
@@ -43,3 +45,28 @@ void Widget::move()
animation
->
start
();
animation
->
start
();
}
}
}
}
//void Widget::showTop()
//{
// hide();
// Qt::WindowFlags wf = windowFlags();
// wf = wf | Qt::WindowStaysOnTopHint;
// setWindowFlags(wf);
// showNormal();
// //show();
//}
void
Widget
::
showTop
()
{
showNormal
();
HWND
hForeWnd
=
::
GetForegroundWindow
();
DWORD
dwForeID
=
::
GetWindowThreadProcessId
(
hForeWnd
,
NULL
);
DWORD
dwCurID
=
::
GetCurrentThreadId
();
::
AttachThreadInput
(
dwCurID
,
dwForeID
,
TRUE
);
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetWindowPos
(
(
HWND
)
effectiveWinId
(),
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_SHOWWINDOW
);
showNormal
();
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
AttachThreadInput
(
dwCurID
,
dwForeID
,
FALSE
);
QWidget
::
show
();
}
widget.h
View file @
20527f5d
...
@@ -15,6 +15,7 @@ class Widget : public QWidget
...
@@ -15,6 +15,7 @@ class Widget : public QWidget
public
:
public
:
explicit
Widget
(
QWidget
*
parent
=
0
);
explicit
Widget
(
QWidget
*
parent
=
0
);
~
Widget
();
~
Widget
();
void
showTop
();
protected
slots
:
protected
slots
:
void
move
();
void
move
();
...
...
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