forked from AttorneyOnline/AO2-Client
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathaocharmovie.h
49 lines (33 loc) · 915 Bytes
/
aocharmovie.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef AOCHARMOVIE_H
#define AOCHARMOVIE_H
#include <QMovie>
#include <QLabel>
#include <QTimer>
class AOApplication;
class AOCharMovie : public QLabel
{
Q_OBJECT
public:
AOCharMovie(QWidget *p_parent, AOApplication *p_ao_app);
void play(QString p_char, QString p_emote, QString emote_prefix);
void play_pre(QString p_char, QString p_emote, int duration);
void play_talking(QString p_char, QString p_emote);
void play_idle(QString p_char, QString p_emote);
void set_flipped(bool p_flipped) {m_flipped = p_flipped;}
void stop();
void combo_resize(int w, int h);
private:
AOApplication *ao_app = nullptr;
QMovie *m_movie;
QVector<QImage> movie_frames;
QTimer *preanim_timer;
const int time_mod = 62;
bool m_flipped = false;
bool play_once = true;
signals:
void done();
private slots:
void frame_change(int n_frame);
void timer_done();
};
#endif // AOCHARMOVIE_H