|
|
#pragma once
|
|
|
|
|
|
#include "ZxObjLine.h"
|
|
|
#include "mGuiPlot_global.h"
|
|
|
#include "ZxObjBdyLine.h"
|
|
|
class ZxObjBdyPoint;
|
|
|
|
|
|
//矩形边界线
|
|
|
class M_GUI_PLOT_EXPORT ZxObjBdyRect : public ZxObjBdyBase
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
ZX_DECLARE_DYNAMIC
|
|
|
|
|
|
public:
|
|
|
ZxObjBdyRect();
|
|
|
ZxObjBdyRect(const QString& sName,
|
|
|
ZxSubAxisX* pAxisX,
|
|
|
ZxSubAxisY* pAxisY);
|
|
|
~ZxObjBdyRect();
|
|
|
|
|
|
public:
|
|
|
// 封装
|
|
|
virtual void initTools();
|
|
|
|
|
|
void initObj();
|
|
|
// 击中
|
|
|
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);
|
|
|
|
|
|
//属性
|
|
|
virtual void fillPtyPano(IxPtyPano* sheet);
|
|
|
|
|
|
virtual void paintBack(QPainter* painter,
|
|
|
const ZxPaintParam& param);
|
|
|
|
|
|
// 根据pt1--->pt2的偏移,获取pt的偏移后的点
|
|
|
// pt1:鼠标Down点,pt2:鼠标Up点
|
|
|
QPointF offsetPoint(QPointF& pt,
|
|
|
const QPointF& pt1, const QPointF& pt2);
|
|
|
|
|
|
//修改点改变长度
|
|
|
virtual bool calNewPos(QVector<QPointF>& vec, QPointF ptMouse);
|
|
|
|
|
|
//设置边界的距离
|
|
|
void setBdyLineTopDistance(double f);
|
|
|
double getBdyLineTopDistance();
|
|
|
|
|
|
//设置边界的距离
|
|
|
void setBdyLineBottomDistance(double f);
|
|
|
double getBdyLineBottomDistance();
|
|
|
|
|
|
//设置边界的距离
|
|
|
void setBdyLineLeftDistance(double f);
|
|
|
double getBdyLineLeftDistance();
|
|
|
|
|
|
//设置边界的距离
|
|
|
void setBdyLineRightDistance(double f);
|
|
|
double getBdyLineRightDistance();
|
|
|
//移动后参数改变
|
|
|
virtual void resetBdyParam();
|
|
|
//设置参数后数据改变
|
|
|
virtual void calBdyRectParam(eBdyPosType ePosType, double fDis);
|
|
|
|
|
|
protected:
|
|
|
iBdyInfo* getBdyParam(eBdyPosType ePosType);
|
|
|
//得到井段的起始深度点
|
|
|
ZxObjBdyPoint* getBdyPtObj();
|
|
|
|
|
|
protected:
|
|
|
//选中的
|
|
|
int m_nSubIndex;
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|