|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "nmObjPoint.h"
|
|
|
|
|
|
|
|
|
|
// 数值试井绘图对象(线)
|
|
|
|
|
class NM_PLOT_EXPORT nmObjLine : public nmObjPoint
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
ZX_DECLARE_DYNAMIC
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
nmObjLine();
|
|
|
|
|
nmObjLine(const QString& sName, \
|
|
|
|
|
ZxSubAxisX* pAxisX, \
|
|
|
|
|
ZxSubAxisY* pAxisY);
|
|
|
|
|
~nmObjLine();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 封装
|
|
|
|
|
virtual void initTools();
|
|
|
|
|
|
|
|
|
|
// 辅助信息
|
|
|
|
|
virtual void initSubObjs();
|
|
|
|
|
|
|
|
|
|
// 击中
|
|
|
|
|
virtual bool hitTest(const QPointF& pt);
|
|
|
|
|
|
|
|
|
|
// 具体击中实现的函数,单纯击中,不做选项的改变
|
|
|
|
|
// nOption用int是因为Rect类的击中选项不一致
|
|
|
|
|
// nOption为负值,表示未击中,此时返回false
|
|
|
|
|
virtual bool _runHitTest(const QPointF& pt, \
|
|
|
|
|
int& nOption, int& nSubIndex);
|
|
|
|
|
|
|
|
|
|
// 击中后,ButtonUp后的处理
|
|
|
|
|
// pt1:鼠标Down点,pt2:鼠标Up点
|
|
|
|
|
virtual bool runMove(const QPointF& pt1, const QPointF& pt2);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 属性填充内容
|
|
|
|
|
virtual void fillPtyPano(IxPtyPano* sheet);
|
|
|
|
|
|
|
|
|
|
// 成果序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
// 模版处理(从道理上讲,模版处理与成果序列化机制完全一致)
|
|
|
|
|
// 但此处放开是为了调用方更灵活的控制
|
|
|
|
|
virtual void onLoadTempl(ZxSerializer* ser);
|
|
|
|
|
virtual void onSaveTempl(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
virtual void paintBack(QPainter* painter, \
|
|
|
|
|
const ZxPaintParam& param);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 绘制线
|
|
|
|
|
virtual bool drawLine(QPainter* painter, QLineF& oLine);
|
|
|
|
|
// 绘制选择
|
|
|
|
|
virtual bool drawSelStates(QPainter* painter, QLineF& oLine);
|
|
|
|
|
// 绘制井点
|
|
|
|
|
virtual bool drawWellPos(QPainter* painter, QPointF pt);
|
|
|
|
|
|
|
|
|
|
// 获取线的中点
|
|
|
|
|
virtual QPointF getCenterPos();
|
|
|
|
|
|
|
|
|
|
// 重新绑定范围
|
|
|
|
|
virtual void resetBounds();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|