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

60 lines
1.1 KiB
C

#ifndef __BASE_DEFINE_H_
#define __BASE_DEFINE_H_
#include "sysInclude.h"
#ifndef BYTE
typedef unsigned char BYTE;
#endif
#ifndef WORD
typedef unsigned short WORD;
#endif
#ifndef DWORD
typedef unsigned long DWORD;
#endif
#define MAX(a, b) (a) > (b) ? (a) : (b)
#define MIN(a, b) (a) > (b) ? (b) : (a)
#define ABS(a) (a) < 0 ? (-(a)) : (a)
#define SELF_ABS(a) if( a < 0 ) a = -a
#define ZStringA QByteArray
//#define USE_PIXMAP_AS_SHOW
#ifdef USE_PIXMAP_AS_SHOW
#define ZShowImage QPixmap
#else
#define ZShowImage QImage
#endif
//#define QT_NO_DEBUG_OUTPUT //open this remark to enable qDebug
#ifndef tpDebugOut
#define tpDebugOut(...) qDebug(__VA_ARGS__)
#endif
enum emTpColorFormat{
TP_COLOR_NONE = 0,
TP_COLOR_Y800 = 1,//"GRAY8"
TP_COLOR_RGB24 = 2,//"RGB24"
TP_COLOR_RGB32 = 3,//"RGB32"
TP_COLOR_Y16 = 4,//"GRAY16"
TP_COLOR_RGB48 = 5,
TP_COLOR_BGR24 = 11,//"BGR24"
TP_COLOR_BGR32 = 12,//"BGR32"
// UYVY = 5,
};
//#define _USE_SPIDER_LOG
enum emTpWarningCode {
WARNING_NO,
WARNING_COMM_CLOSED,
};
#ifndef PI
#define PI 3.1415927
#endif
#endif