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/Src/nmNum/nmPlot/nmMapObjectState.h

33 lines
2.0 KiB
C

#pragma once
#include <QPen>
#include <QPointF>
#include <QSharedPointer>
#include <QString>
#include <QVector>
#include "nmDataBase.h"
#include "nmDataNumericalAnalysisCase.h"
#include "nmDefines.h"
// 保存可独立重建的地图对象状态。持有快照的实现文件需要看到完整定义,以便 Qt 4 正确析构。
struct nmMapObjectState
{
NM_Obj_Type type; ///< 重建时使用的图元类型。
QString id; ///< 会话内的编辑标识,恢复后供先前的移动记录定位。
QString name; ///< 图元原名,允许空名边界。
QVector<QPointF> points; ///< 模型坐标,恢复时与视图的缩放和平移无关。
QSharedPointer<nmDataBase> data; ///< 独立的业务数据副本,包含图元绑定的计算参数。
QPen pen; ///< 区域的完整画笔。边界画笔随业务数据保存。
nmCalculationWellRef includedWell; ///< 本井参与计算时的引用及角色。
int includedWellIndex; ///< 本井在参与计算列表中的原下标,-1 表示未参与。
int dataIndex; ///< 在同类业务数据列表中的原下标,负值表示未记录。
int objectIndex; ///< 在画布对象列表中的原下标,用于恢复命中顺序。
int childIndex; ///< 在画布绘制子项中的原下标,用于恢复遮挡顺序。
bool currentWell; ///< 记录该井删除前是否为当前井。
bool lockedPosition; ///< 图元能否移动的原锁定状态。
bool lockedSize; ///< 图元能否调整尺寸的原锁定状态。
bool readOnly; ///< 图元原有的只读状态。
bool visible; ///< 图元原有的显示状态。
};