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.
nmWTAI-Platform/Include/mGui/mGuiSysManager/iCardInfo.h

95 lines
2.2 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "mModuleDefines.h"
#include "mGuiSysManager_global.h"
class QSqlDatabase;
// 与工区绑定的CardInfo
class M_GUI_SYSMANAGER_EXPORT iCardInfo
{
public:
iCardInfo();
public:
// 当外围信息设置完毕后,读取数据库获取工区内部信息
void readInnerInfos();
// 当新建/删除井或者成果时,刷新
// 针对当前打开的工区
bool freshWellRstInfos(bool bWell, \
QStringList& listTags, \
bool bAddObj);
private:
// 读取数据库
void readFromDb();
void _queryInners(QSqlDatabase& db);
public:
////////////////////////////////////////////////
// 返回相关信息
QString getProjField(int nMaxLen = 64) const; //油田名称
QString getProjDesc(int nMaxLen = 64) const; //工区备注说明(描述)
QString getProjCreator() const; //创建者
QString getProjLastModified() const; //修改时间
QString getProjRstSketch(QString sCode = "") const; //缩略图
QString getSumWellNames(int nMaxLen = 64) const;//井列表(缩减模式)
QString getSumRstTags(int nMaxLen = 64) const; //成果列表(缩减模式)
int getProjWellCount() const; //井数
int getProjRstCount() const; //成果数
private:
/// @brief 一旦超过,变成...模式
/// @param s: 原
/// @param nMaxLen: 最大长度,如果-1则不进行处理
/// @param nMode: 模式,含义如下——
/// 0保留开头末尾开头插入...
/// 1保留开头+末尾,中间插入...
/// 2/其它:保留末尾,开头插入...
QString trimStrTo(QString s, int nMaxLen, int nMode = 1) const;
////////////////////////////////////////////////
public:
// 对应 E:/Run/mWTAI/Bin/TestOfWTAI
QString m_sDir;
// 对应 E:/Run/mWTAI/Bin/TestOfWTAI/TestDemo3
QString m_sDirExt;
// 对应 TestDemo3
QString m_sProjName;
// 对应 E:/Run/mWTAI/Bin/TestOfWTAI/TestDemo3/TestDemo3.db
QString m_sUrl;
private:
// 针对 油田名称
QString m_sProjField;
// 工区描述
QString m_sProjDesc;
// 井列表
QStringList m_listWellNames;
// 处理解释成果
QStringList m_listRstUtilTags;
// 创建者+时间
QString m_sCreator;
QString m_sTimeLastModified;
// 缩略图
QString m_sRstImgSketch;
};