89 lines
1.2 KiB
C++
89 lines
1.2 KiB
C++
#ifndef PLAY_H
|
|
#define PLAY_H
|
|
|
|
#include <QWidget>
|
|
#include "ParsePack.h"
|
|
|
|
#include "Parse.h"
|
|
#include "PlayThread.h"
|
|
#include "QResizeEvent"
|
|
#include "QHostAddress"
|
|
#include "QTimer"
|
|
|
|
namespace Ui {
|
|
class Play;
|
|
}
|
|
|
|
class Play : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Play(QWidget *parent = nullptr);
|
|
~Play();
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
void ParseData();
|
|
|
|
void setSave(QHostAddress ip,uint16_t port,QByteArray data);
|
|
|
|
//void frameList(QMap<QDateTime,QByteArray> data);
|
|
|
|
|
|
protected:
|
|
|
|
void resizeEvent(QResizeEvent *event);
|
|
|
|
signals:
|
|
|
|
void frameData(quint8 channel,quint8 type,QDateTime time, QByteArray raw);
|
|
|
|
void changedframe(uint64_t frame);
|
|
|
|
void changedPlayState(uint8_t state);
|
|
|
|
private slots:
|
|
|
|
void on_pushButton_last_clicked();
|
|
|
|
void on_pushButton_play_clicked();
|
|
|
|
void on_pushButton_next_clicked();
|
|
|
|
|
|
|
|
private:
|
|
Ui::Play *ui;
|
|
|
|
Packer_t packer;
|
|
Parser_t parser;
|
|
|
|
|
|
uint64_t current_frame = 0;
|
|
uint64_t total_frame = 0;
|
|
|
|
|
|
QString select_file = "";
|
|
|
|
QMap<QString,QString> filelist;
|
|
|
|
|
|
QString logname = "00001";
|
|
|
|
|
|
QMap<QDateTime,QByteArray> playdata;
|
|
|
|
|
|
uint8_t play_state = 0;//0 停止 1 播放 2 暂停
|
|
|
|
|
|
QStringList lastloglist;
|
|
uint64_t save_count = 0;
|
|
|
|
};
|
|
|
|
#endif // PLAY_H
|