You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1005 B

#ifndef USDATA_H
#define USDATA_H
#include <QString>
#include <QByteArray>
#include <QDataStream>
#include "model/ultrasoundModule/metadata/UsMetadataBag.h"
#define DEFAULT_COMPRESS_RATIO 3
/*************************************************************************************************/
/**
* @brief The UsData class
* @author Mohamad Mohsem Talaii
* @date 2020/8/1
*/
/*************************************************************************************************/
class UsData
{
private:
bool _compressed = false;
QByteArray _data;
UsMetadataBag _metadata;
public:
void clear();
QByteArray getData() const;
void setData(QByteArray data);
UsMetadataBag getMetadataBag() const;
void setMetadataBag(const UsMetadataBag& metadata);
bool isNull() const;
bool compress(int ratio = DEFAULT_COMPRESS_RATIO);
bool uncompress();
bool compressed();
unsigned long getSize() const;
};
Q_DECLARE_METATYPE(UsData)
#endif //USDATA_H