AntiClipSettings/DataStructure.h
2024-09-11 14:18:56 +08:00

34 lines
925 B
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __DATASTRUCTURE_H__
#define __DATASTRUCTURE_H__
#include <QObject>
#include <QQmlEngine>
constexpr int ImageWidth = 576;
constexpr int ImageHeight = 320;
enum class ImageFormat : int {
Jpeg = 0,
YUV, // nv21 576x320
None, // 新增枚举需要放在这上面
};
std::ostream &operator<<(std::ostream &os, const ImageFormat &format);
struct NetworkInfomation {
Q_GADGET
QML_NAMED_ELEMENT(networkInfomation)
Q_PROPERTY(bool dhcp MEMBER dhcp)
Q_PROPERTY(QString ip MEMBER ip)
Q_PROPERTY(QString netmask MEMBER netmask)
Q_PROPERTY(QString gateway MEMBER gateway)
Q_PROPERTY(QString dns MEMBER dns)
public:
bool dhcp;
QString ip;
QString netmask;
QString gateway;
QString dns = "8.8.8.8"; // dns被屏蔽现在默认赋值 8.8.8.8 以通过校验
};
Q_DECLARE_METATYPE(NetworkInfomation)
#endif // __DATASTRUCTURE_H__