Skip to content

Commit ffff3c4

Browse files
deepin-ci-robot18202781743
authored andcommitted
sync: from linuxdeepin/dtkgui
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#336
1 parent 2b2c880 commit ffff3c4

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

docs/util/ddciiconplayer.zh_CN.dox

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,11 @@
171171
@details 为指定的图标模式计算要显示的内容,这可能会导致 currentImage 发生变化。这是个一次性行为,不会影响下一次调用 setMode 后的结果。
172172
@param[in] mode 指定要播放的图标模式,如果此模式支持动画,会触发此模式自身的动画播放(与 setMode 导致的动画不同的是,此动画不涉及两种模式变化时的过渡规则),否则将修改 currentImage 为此模式对应的静态图片资源。
173173

174+
@fn Dtk::Gui::DDciIconPlayer::play(DDciIcon::Mode mode, DDciIconImagePlayer::Flags flags)
175+
@details 为指定的图标模式和播放参数计算要显示的内容。
176+
@param[in] mode 指定要播放的图标模式。
177+
@param[in] flags 播放参数
178+
174179
@fn Dtk::Gui::DDciIconPlayer::stop()
175180
@details 如果当前正在播放动画,则停止当前动画的播放,但不会影响队列中下一个动画的播放。可能会导致 DDciIconPlayer::state 发生变化。
176181
@sa DDciIconPlayer::abort

include/util/ddciiconplayer.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ class DDciIconPlayer : public QObject, public DCORE_NAMESPACE::DObject
106106

107107
QImage currentImage() const;
108108
void play(DDciIcon::Mode mode);
109+
void play(DDciIcon::Mode mode, DDciIconImagePlayer::Flags flags);
109110
void stop();
110111
void abort();
111112

src/util/ddciiconplayer.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,10 +1075,15 @@ QImage DDciIconPlayer::currentImage() const
10751075
return d->image;
10761076
}
10771077

1078-
void DDciIconPlayer::play(DDciIcon::Mode mode)
1078+
void DDciIconPlayer::play(DDciIcon::Mode mode, DDciIconImagePlayer::Flags flags)
10791079
{
10801080
D_D(DDciIconPlayer);
1081-
d->play(mode, DDciIconImagePlayer::IgnoreLastImageLoop);
1081+
d->play(mode, flags);
1082+
}
1083+
1084+
void DDciIconPlayer::play(DDciIcon::Mode mode)
1085+
{
1086+
play(mode, DDciIconImagePlayer::IgnoreLastImageLoop);
10821087
}
10831088

10841089
void DDciIconPlayer::stop()

0 commit comments

Comments
 (0)