-
Notifications
You must be signed in to change notification settings - Fork 1
/
voiceplayer.h
43 lines (34 loc) · 1018 Bytes
/
voiceplayer.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
#ifndef VOICEPLAYER_H
#define VOICEPLAYER_H
#include <QWidget>
#include "message.h"
#include <QtMultimedia/QMediaPlayer>
namespace Ui {
class VoicePlayer;
}
class VoicePlayer : public QWidget
{
Q_OBJECT
public:
explicit VoicePlayer(QWidget *parent = 0);
~VoicePlayer();
void setMessage(const Message& msg);
Message message() const;
private:
//std::function<const QString(const QString&)> m_funcVoiceLocalUrl;
//std::function<void(const QString &)> m_funcGetVoiceFile;
QMediaPlayer *m_msgVoicePlayer;
QMap<QString, QString> m_msgVoiceMap; // <localVoiceUrl, VoiceIconFilePath>
QString m_inPlayVoiceImgPath;
QString m_inReadyVoiceImgPath;
QString m_outPlayVoiceImgPath;
QString m_outReadyVoiceImgPath;
QString m_currentLocalVoiceUrl;
//void refreshVoiceImage(QString localVoiceUrl, bool play);
Message m_message;
private slots:
//void stopPlaying(QMediaPlayer::MediaStatus status);
private:
Ui::VoicePlayer *ui;
};
#endif // VOICEPLAYER_H