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/mGui/mGuiPlot/WellMap/ZxObjWmLine.h

86 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 "ZxObjWmPoint.h"
#include "mGuiPlot_global.h"
class M_GUI_PLOT_EXPORT ZxObjWmLine : public ZxObjWmPoint
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjWmLine();
ZxObjWmLine(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjWmLine();
public:
// 封装
virtual void initTools();
// 击中
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);
virtual bool calNewPos(QVector<QPointF>& vec, QPointF ptMouse);
// 移动位置后,刷新相关的信息,如距离、角度、长度等
virtual bool reCalInfos();
// 0-180°90°120°等等
float getLineAngle();
// 在右侧手工改动数据,刷新数据点,m_pData已经改变不予考虑
virtual bool freshWmPosBy(QString sPara, float f);
protected:
virtual QPointF getCenterPos();
virtual void resetBounds();
// 绘制线
virtual bool drawLine(QPainter* painter, QLineF& oLine);
// 绘制垂线
virtual bool drawSubLines(QPainter* painter, QLineF& oLine);
// 绘制井点
virtual bool drawWellPos(QPainter* painter, QPointF pt);
// 绘制选择
virtual bool drawSelStates(QPainter* painter, QLineF& oLine);
public:
virtual void paintBack(QPainter* painter,
const ZxPaintParam& param);
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void onLoadTempl(ZxSerializer* ser);
virtual void onSaveTempl(ZxSerializer* ser);
virtual void fillPtyPano(IxPtyPano* sheet);
public:
// 得到/设置画笔
QPen getSubPen(void) const;
void setSubPen(QPen o);
protected:
//float m_fSlope; //这是针对特征线时后的斜率值
QPen m_oSubPen;
};