Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_home
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
zhenfei.zhang
fmp_home
Commits
beca7d07
Commit
beca7d07
authored
Apr 26, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 实现stop某个插件的所有闪烁。 2. 修改外卖图片名。
parent
7be0da64
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
31 additions
and
4 deletions
+31
-4
fmp_home.cpp
+6
-0
fmp_home.h
+1
-0
fmp_home_i.h
+1
-0
fmp_home_navwindow.cpp
+12
-0
fmp_home_navwindow.h
+1
-0
fmp_home_navwindow.ui
+2
-2
fmp_home_p.cpp
+5
-0
fmp_home_p.h
+1
-0
res/img.qrc
+2
-2
No files found.
fmp_home.cpp
View file @
beca7d07
...
...
@@ -66,6 +66,12 @@ bool FMPHome::stopBlink(int blinkId)
return
d
->
stopBlink
(
blinkId
);
}
bool
FMPHome
::
stopBlink
(
FMPluginInterface
*
ctkPlugin
)
{
Q_D
(
FMPHome
);
return
d
->
stopBlink
(
ctkPlugin
);
}
void
FMPHome
::
notification
(
const
QString
&
msg
,
const
QString
&
title
,
QSystemTrayIcon
::
MessageIcon
icon
,
int
mecs
)
{
...
...
fmp_home.h
View file @
beca7d07
...
...
@@ -27,6 +27,7 @@ public:
int
blink
(
FMPluginInterface
*
plugin
,
const
QString
&
image
);
bool
stopBlink
(
int
blinkId
);
bool
stopBlink
(
FMPluginInterface
*
ctkPlugin
);
void
notification
(
const
QString
&
msg
,
const
QString
&
title
=
QString
::
fromLocal8Bit
(
FMP_APPNAME
),
QSystemTrayIcon
::
MessageIcon
icon
=
QSystemTrayIcon
::
Information
,
int
mecs
=
1000
);
...
...
fmp_home_i.h
View file @
beca7d07
...
...
@@ -47,6 +47,7 @@ public:
* @return bool 如果参数blinkId标识的闪烁不存在或已结束则返回false, 否则返回true
*/
virtual
bool
stopBlink
(
int
blinkId
)
=
0
;
virtual
bool
stopBlink
(
FMPluginInterface
*
ctkPlugin
)
=
0
;
/**
* @brief notification
...
...
fmp_home_navwindow.cpp
View file @
beca7d07
...
...
@@ -259,6 +259,18 @@ bool NavWindow::removeBlink(int blinkId)
return
isOk
;
}
bool
NavWindow
::
removeBlink
(
FMPluginInterface
*
plugin
)
{
bool
isOk
=
true
;
for
(
int
i
=
0
;
i
<
_blinkObjQueue
.
size
();
++
i
)
{
if
(
_blinkObjQueue
.
at
(
i
).
plugin
==
plugin
)
{
isOk
&=
removeBlink
(
_blinkObjQueue
.
at
(
i
).
id
);
}
}
return
isOk
;
}
void
NavWindow
::
blink
()
{
_blinkFuture
=
QtConcurrent
::
run
([
this
](){
...
...
fmp_home_navwindow.h
View file @
beca7d07
...
...
@@ -72,6 +72,7 @@ public slots:
* @return 是否成功
*/
bool
removeBlink
(
int
blinkId
);
bool
removeBlink
(
FMPluginInterface
*
plugin
);
/**
* @brief showMessage
...
...
fmp_home_navwindow.ui
View file @
beca7d07
...
...
@@ -46,10 +46,10 @@ QPushButton:hover {
border-image: url(:vip_onclick);
}
#takeout {
border-image: url(:take
away
);
border-image: url(:take
out
);
}
#takeout:pressed {
border-image: url(:take
away
_onclick);
border-image: url(:take
out
_onclick);
}
#coupons {
border-image: url(:coupons);
...
...
fmp_home_p.cpp
View file @
beca7d07
...
...
@@ -99,6 +99,11 @@ bool FMPHomePrivate::stopBlink(int blinkId)
return
_navWindow
->
removeBlink
(
blinkId
);
}
bool
FMPHomePrivate
::
stopBlink
(
FMPluginInterface
*
ctkPlugin
)
{
return
_navWindow
->
removeBlink
(
ctkPlugin
);
}
void
FMPHomePrivate
::
notification
(
const
QString
&
msg
,
const
QString
&
title
,
QSystemTrayIcon
::
MessageIcon
icon
,
int
mecs
)
{
...
...
fmp_home_p.h
View file @
beca7d07
...
...
@@ -24,6 +24,7 @@ public:
int
blink
(
FMPluginInterface
*
plugin
,
const
QString
&
image
);
bool
stopBlink
(
int
blinkId
);
bool
stopBlink
(
FMPluginInterface
*
ctkPlugin
);
void
notification
(
const
QString
&
msg
,
const
QString
&
title
=
QString
::
fromLocal8Bit
(
FMP_APPNAME
),
QSystemTrayIcon
::
MessageIcon
icon
=
QSystemTrayIcon
::
Information
,
int
mecs
=
1000
);
...
...
res/img.qrc
View file @
beca7d07
...
...
@@ -10,8 +10,8 @@
<file alias="fm-icon_tray">img/fm-icon_tray.png</file>
<file alias="vip">img/fm-icon_member02.png</file>
<file alias="vip_onclick">img/fm-icon_member02_2.png</file>
<file alias="take
away
">img/fm-icon_book.png</file>
<file alias="take
away
_onclick">img/fm-icon_book_02.png</file>
<file alias="take
out
">img/fm-icon_book.png</file>
<file alias="take
out
_onclick">img/fm-icon_book_02.png</file>
<file alias="coupons">img/fm-icon_coupons.png</file>
<file alias="coupons_onclick">img/fm-icon_coupons_02.png</file>
<file>img/fm-icon_close_02.png</file>
...
...
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