|
|
|
|
|
|
|
|
|
|
|
#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"
|
|
|
|
|
|
|
|
|
|
|
|
// 数值定义
|
|
|
|
|
|
#define SYS_VALUE_INVALID -999.0
|
|
|
|
|
|
#define SYS_VALUE_INVALID1 -999.25
|
|
|
|
|
|
#define SYS_VALUE_INVALID2 -9999.0
|
|
|
|
|
|
#define SYS_VALUE_MAX 1e32
|
|
|
|
|
|
#define SYS_VALUE_MIN -1e32
|
|
|
|
|
|
#define SYS_VALUE_ZERO_PLUS 1e-32
|
|
|
|
|
|
#define SYS_VALUE_NULL SYS_VALUE_INVALID
|
|
|
|
|
|
#define SYS_VALUE_PI 3.14159265358979
|
|
|
|
|
|
|
|
|
|
|
|
// 数组定义
|
|
|
|
|
|
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*>
|
|
|
|
|
|
|
|
|
|
|
|
// 统一目录
|
|
|
|
|
|
#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"
|
|
|
|
|
|
|
|
|
|
|
|
// 窗口视图大小
|
|
|
|
|
|
#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 zxConfigIni zxAppID + "Config.ini"
|
|
|
|
|
|
#define zxLoginIni zxAppID + "Login.ini"
|
|
|
|
|
|
#define zxUnitFile "UnitDefault.xml"
|
|
|
|
|
|
|
|
|
|
|
|
// 常量定义,比如配置环境应用
|
|
|
|
|
|
#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"
|
|
|
|
|
|
|
|
|
|
|
|
// 窗口Size
|
|
|
|
|
|
#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_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 "∞"
|
|
|
|
|
|
#define s_Infinite_Min "-∞"
|
|
|
|
|
|
|
|
|
|
|
|
// 配置来源,分别对应 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_Tag_BdyType_CloseB QObject::tr("CloseB")
|
|
|
|
|
|
#define s_Tag_BdyType_FixP QObject::tr("FixP")
|
|
|
|
|
|
#define s_Tag_BdyType_Infinite QObject::tr("Infinite")
|
|
|
|
|
|
|
|
|
|
|
|
// 数据库引擎
|
|
|
|
|
|
#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"
|
|
|
|
|
|
|
|
|
|
|
|
// 参数大类区分,默认的,即ModelParaDefinesLP.xml
|
|
|
|
|
|
// 在此基础上,其它可以根据需要进行扩展
|
|
|
|
|
|
// 该设计的原因是,产能模块加入之后,为了与原来的模块解耦,而改为支持多种标识
|
|
|
|
|
|
#define s_Sys_Para_Default "Default"
|