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/WellBdy/ZxObjBdyCross.h

73 lines
1.8 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 "ZxObjLine.h"
#include "mGuiPlot_global.h"
#include "ZxObjBdyLine.h"
class iBdyInfo;
class ZxObjBdyPoint;
//交叉边界线
class M_GUI_PLOT_EXPORT ZxObjBdyCross : public ZxObjBdyBase
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjBdyCross();
ZxObjBdyCross(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjBdyCross();
public:
// 封装
virtual void initTools();
virtual void initObj();
// 具体击中实现的函数,单纯击中,不做选项的改变
// 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);
QPointF offsetPoint(QPointF& pt,
const QPointF& pt1, const QPointF& pt2);
//修改点改变长度
virtual bool calNewPos(QVector<QPointF>& vec, QPointF ptMouse);
//设置边界的距离水平边
void setBdyCrossHorDistance(double f);
double getBdyCrossHorDistance();
//斜边
void setBdyCrossSideDistance(double f);
double getBdyCrossSideDistance();
void setBdyCrossSideAngle(double f);
double getBdyCrossSideAngle();
//移动后设置线的位置
virtual void resetBdyParam();
//计算交点
QPointF getCrossPt(double fAngle, double fHorDis, double fSideDis);
protected:
iBdyInfo* getBdyParam(bool bHor = true);
protected:
double m_dAngle;
};