aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCrystalwarrior <varsash@gmail.com>2019-09-12 18:28:08 +0300
committerCrystalwarrior <varsash@gmail.com>2019-09-12 22:45:02 +0300
commite76a83ddfe8f6fe16ee7e2a91d3ac30e89f80345 (patch)
tree82c9d89a88db5255ef8df59b2f895fe0f1931d1f /include
parent961563daf3af7fd0167b281ed101d11c67a4eaf7 (diff)
Allow AOMovie to have timers that take priority over the animated image frame count
Set it up so feeding the timer value when playing the AOMovie would use the timer but only in cases where a non-animated image is used Update shouts and wtce to pass the 'duration' argument which will be used if the image used is non-animated. Otherwise, prioritize the animated image duration.
Diffstat (limited to 'include')
-rw-r--r--include/aomovie.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/aomovie.h b/include/aomovie.h
index 1f278bf8..33b31586 100644
--- a/include/aomovie.h
+++ b/include/aomovie.h
@@ -15,13 +15,15 @@ public:
AOMovie(QWidget *p_parent, AOApplication *p_ao_app);
void set_play_once(bool p_play_once);
- void play(QString p_gif, QString p_char = "", QString p_custom_theme = "");
+ void start_timer(int delay);
+ void play(QString p_gif, QString p_char = "", QString p_custom_theme = "", int duration = 0);
void combo_resize(int w, int h);
void stop();
private:
QMovie *m_movie;
AOApplication *ao_app;
+ QTimer *timer;
bool play_once = true;
signals:
@@ -29,6 +31,7 @@ signals:
private slots:
void frame_change(int n_frame);
+ void timer_done();
};
#endif // AOMOVIE_H