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.
nmWATI/Include/iBase/iDefines/Defines.h

137 lines
4.5 KiB
C


#pragma once
#include "qglobal.h"
#if (QT_VERSION >= 0x050000)
#include <QtWidgets>
#define QStringCH QStringLiteral
#else
#include <QtGui>
#define QStringCH QString::fromLocal8Bit
#endif
#include "Commands.h"
#include "Macros.h"
#include "Enums.h"
/// @brief 数值定义
#define SYS_VALUE_INVALID -999.f
#define SYS_VALUE_INVALID1 -999.25f
#define SYS_VALUE_INVALID2 -9999.f
#define SYS_VALUE_MAX 1e32f
#define SYS_VALUE_MIN -1e32f
#define SYS_VALUE_ZERO_PLUS 1e-32f
#define SYS_VALUE_NULL SYS_VALUE_INVALID
#define SYS_VALUE_PI 3.14159265358979
/// @brief 数组定义
typedef QVector<float> VecFloat;
typedef QVector< QVector<float> > VVecFloat;
typedef QVector<double> VecDouble;
typedef QVector< QVector<double> > VVecDouble;
typedef QVector<int> VecInt;
typedef QVector<QString> VecString;
typedef QVector< QVector<QString> > VVecString;
typedef QVector<QVariant> VecVariant;
typedef QVector<QVector<QVariant> > VVecVariant;
typedef QVector<QPointF> VecPointF;
#define VecDataObjects QVector<ZxDataObject*>
#define ZxDataObjectList QList<ZxDataObject*>
/// @brief 统一目录
#define s_Dir_Bin "Bin"
#define s_Dir_Config "Config"
#define s_Dir_Doc "Doc"
#define s_Dir_Release "Release"
#define s_Dir_Res "Res"
#define s_Dir_Temp "Temp"
#define s_Dir_Unit "Config/Unit"
/// @brief 窗口视图大小
#define s_Zoom_Tag_FitWindow QObject::tr("FitWindow")
#define s_Zoom_Tag_FitWidth QObject::tr("FitWidth")
#define s_Zoom_Tag_FitHeight QObject::tr("FitHeight")
/// @brief 配置文件
#define zxConfigIni zxAppID + "Config.ini"
#define zxLoginIni zxAppID + "Login.ini"
#define zxUnitFile "UnitDefault.xml"
/// @brief 常量定义,比如配置环境应用
#define s_Recent_Projects "recentProjects"
#define s_Recent_Dirs "recentDirectories"
#define s_Last_Project "lastProject"
#define s_Last_Dir "lastDir"
#define s_Last_Url "lastUrl"
#define s_Current_Project "currentProject"
#define s_Current_Project_Dir "currentProjectDir"
#define s_Current_WellCode "currentWellCode"
#define s_Current_WellName "currentWellName"
#define s_Project_Directory "projectDirectory"
#define s_Current_ModelSeries "CurModelSeries"
// 井流体性质,油气水井
#define s_Tag_Oil_EN "Oil"
#define s_Tag_Gas_EN "Gas"
#define s_Tag_Water_EN "Water"
#define s_Tag_Oil_CN QStringCH("油")
#define s_Tag_Gas_CN QStringCH("气")
#define s_Tag_Water_CN QStringCH("水")
#define s_Axis_UnitX "hr"
#define s_Axis_UnitY_P "MPa"
#define s_Axis_UnitY_F "m^3/d"
#define s_Axis_UnitY_O "m^3/d"
#define s_Axis_UnitY_G "10^4*m^3/d"
#define s_Axis_UnitY_W "m^3/d"
#define s_Axis_UnitY_PGas "MPa^2/cp"
// WTAI大的模型分类导航中选定等目前暂时保留后续会逐步屏蔽
#define s_Tag_LP_EN "LP"
#define s_Tag_HW_EN "HW"
#define s_Tag_PF_EN "PF"
#define s_Tag_SR_EN "SR"
#define s_Tag_LP_CN QObject::tr("Low permibility")
#define s_Tag_HW_CN QObject::tr("Horizational well")
#define s_Tag_PF_CN QObject::tr("Prod driven")
#define s_Tag_SR_CN QObject::tr("Special reservoirs")
/// @brief 其它
#define s_Zoom_Tag_FitWindow QObject::tr("FitWindow")
#define s_Zoom_Tag_FitWidth QObject::tr("FitWidth")
#define s_Zoom_Tag_FitHeight QObject::tr("FitHeight")
#define s_Tag_InValid_Data "---"
#define s_Infinite_Max QStringCH("∞")
#define s_Infinite_Min QStringCH("-∞")
// 保存时提示相关
#define s_Save_Option "saveOption"
#define s_Save_Option_NotUse "NotUse"
#define s_Save_Option_Use "Use"
#define s_Save_Option_YesAll "YesAll"
#define s_Save_Option_NoAll "NoAll"
#define s_Infinite_Max QStringCH("∞")
#define s_Infinite_Min QStringCH("-∞")
// 配置来源,分别对应 SysCOnfig、工区下面用户指定
#define s_Config_From_Soft QObject::tr("Soft system used")
#define s_Config_From_Project QObject::tr("Current project used")
#define s_Config_From_User QObject::tr("Customed by user")
// 线程管理
#define s_Tag_Thread_Pause QObject::tr("Pause")
#define s_Tag_Thread_Continue QObject::tr("Continue")
#define s_Tag_Thread_Quit QObject::tr("Quit")
#define s_DbType_SqlLite "QSQLITE"
#define s_DbType_Oracle "QOCI"
#define s_DbType_DM "QDM"
#define s_DbType_KB "QKB"
#define s_Conn_DbStr "ConnDbBaseStr"
#define s_Conn_DbStrExt "ConnDbBaseStrExt"