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

82 lines
2.0 KiB
C

#pragma once
#include "ZxObjLine.h"
#include "mGuiPlot_global.h"
#include "ZxObjBdyRect.h"
class ZxObjBdyPoint;
//平行边界类型(垂直或者水平)
enum eParalType
{
ParalT_None = 0,
ParalT_Hor, //水平
ParalT_Ver //垂直
};
//平形边界线
class M_GUI_PLOT_EXPORT ZxObjBdyParal : public ZxObjBdyRect
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjBdyParal();
ZxObjBdyParal(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjBdyParal();
public:
//设置类型
void setParalType(int eType);
int getParalType();
// 封装
virtual void initTools();
void initObj();
virtual bool _runHitTest(const QPointF& pt, int& nOption, int& nSubIndex);
// pt1:鼠标Down点pt2鼠标Up点
virtual bool runMove(const QPointF& pt1, const QPointF& pt2);
//
void calBdyParalParam(eParalType eType, QVector<QPointF>& vecVals);
void setBdyParalParam(eParalType eType);
//属性
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);
//设置边界的距离(One代表左边界和上边界)
void setBdyLineOneDistance(double f);
double getBdyLineOneDistance();
//设置边界的距离
void setBdyLineTwoDistance(double f);
double getBdyLineTwoDistance();
virtual void resetBdyParam();
//设置参数后数据改变
void calBdyParalParam(eBdyPosType ePosType, double fDis);
//得到第一条边界
iBdyInfo* getBdyLineOneParam();
//得到第二条边界
iBdyInfo* getBdyLineTwoParam();
//根据一个点计算出两个点(取坐标轴的最大值一半)
bool getLinePts(QPointF pt,QVector<QPointF>& vecPts);
protected:
//平行类型
eParalType m_eType;
};