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

98 lines
2.5 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 "ZxObjBdyRect.h"
class ZxObjBdyPoint;
//平行边界类型(垂直或者水平)
enum eTriType
{
TriT_Left = 0, //左开口
TriT_Right, //右开口
TriT_Top, //上开口
TriT_Bottom, //下开口
TriT_None
};
//三条垂直边界线
class M_GUI_PLOT_EXPORT ZxObjBdyTri : public ZxObjBdyRect
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjBdyTri();
ZxObjBdyTri(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjBdyTri();
public:
//设置类型
void setTriType(int eType);
int getTriType();
// 封装
virtual void initTools();
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);
//
void calBdyTriParam(eTriType eType, QVector<QPointF>& vecVals);
//属性
virtual void fillPtyPano(IxPtyPano* sheet);
virtual void paintBack(QPainter* painter,
const ZxPaintParam& param);
//移动后参数改变
virtual void resetBdyParam();
//设置参数后数据改变
virtual void calBdyRectParam();
void resetBdyTriParam();
//得到单边的参数指针
iBdyInfo* getSingleBdy();
//得到双边的上或者左指针
iBdyInfo* getBdyLineOneParam();
iBdyInfo* getBdyLineTwoParam();
//不同类型获得上左点
QPointF getLeftTopPos();
QPointF getRightTopPos();
QPointF getRightBottomPos();
QPointF getLeftBottomPos();
//数据点归位
void setLeftTopPt(QPointF pt, QVector<QPointF>& vec);
void setRightTopPt(QPointF pt, QVector<QPointF>& vec);
void setRightBottomPt(QPointF pt, QVector<QPointF>& vec);
void setLeftBottomPt(QPointF pt, QVector<QPointF>& vec);
//设置独立边界的距离
void setBdySingleDistance(double f);
double getBdySingleDistance();
//设置边界的距离(One代表左边界和上边界)
void setBdyLineOneDistance(double f);
double getBdyLineOneDistance();
//设置边界的距离
void setBdyLineTwoDistance(double f);
double getBdyLineTwoDistance();
protected:
//平行类型
eTriType m_eType;
};