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/ZxObjSegLine.h

93 lines
2.5 KiB
C

#pragma once
#include "ZxObjLine.h"
#include "mGuiPlot_global.h"
//井段
class ZxObjWmLinePlus;
class ZxObjSegData;
class M_GUI_PLOT_EXPORT ZxObjSegLine : public ZxObjLine
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjSegLine();
ZxObjSegLine(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjSegLine();
//得到产液段数据体
ZxObjSegData* getObjSegData();
//得到深度点对应的点Pos
QPointF getSegLineDepthPos();
//获得对应数据(长度,位置)
bool getSegParamVal(QString sParam, double& dVal);
void setSegParamVal(QString sParam, double& dVal);
//位置长度
void setSegLineLenght(double dVal);
double getSegLineLenght();
//位置
void setSegLineDepth(double dDepth);
double getSegLineDepth();
//得到角度
void setSegLineAngle(double dAngle);
double getSegLineAngle();
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);
// pt1:鼠标Down点pt2鼠标Up点
virtual bool runMove(const QPointF& pt1, const QPointF& pt2);
//计算偏移后位置
QPointF offsetPoint(QPointF& pt,
const QPointF& pt1, const QPointF& pt2);
//移动点改变长度
bool calNewPosChangeLenght(QVector<QPointF>& vec, QPointF ptMouse);
//移动点改变角度
bool calNewPosChangeAngle(QVector<QPointF>& vec, QPointF ptMouse);
virtual bool calNewPos(QVector<QPointF>& vec, QPointF ptMouse);
//属性
virtual void fillPtyPano(IxPtyPano* sheet);
//得到线的中点Pos
QPointF getCenterPosPt();
//得到线中点Val
QPointF getCenterValPt();
//改变位置
void calChangedDepth(double dVal, QPointF& ptStart, QPointF& ptEnd);
//改变长度
void calChangedLenght(double dVal, QPointF& p1);
//改变角度
void calChangedAngle(double dVal, QPointF& p1, QPointF& p2);
protected:
//得到前一个
ZxObjSegLine* getPreSegLineObj();
//得到后一个
ZxObjSegLine* getNextSegLineObj();
//得到井段的起始深度点
ZxObjWmLinePlus* getWnLineObj();
protected:
//产液线对象
ZxObjSegData* m_pData;
};