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/iPlot/iPlotCurveT/Objects/ZxObjBand.h

74 lines
1.9 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 "ZxObjRect.h"
class I_PLOTCURVE_T_EXPORT ZxObjBand
: public ZxObjRect
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjBand();
ZxObjBand(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjBand();
virtual void init(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
// 方向模式
void setOriental(bool bVertial);
bool isVertical();
// 击中
virtual bool hitTest(const QPointF& pt);
// 具体击中实现的函数,单纯击中,不做选项的改变
// nOption用int是因为Rect类的击中选项不一致
// nOption为负值表示未击中此时返回false
virtual bool _runHitTest(const QPointF& pt, int& nOption, int& nSubIndex);
// 击中后ButtonUp后的处理
// pt1:鼠标Down点pt2鼠标Up点
virtual bool runMove(const QPointF& pt1, const QPointF& pt2);
public:
virtual bool moveToPos(const double& l, const double& r,
const double& t, const double& b);
virtual bool moveToPos(const QVector<QPointF>& vecPoss);
virtual void setValueByPos(const QPointF& ptTL, const QPointF& ptRB);
virtual void setValueByPos(const double& l, const double& r,
const double& t, const double& b);
// 封装
virtual void initTools();
protected:
// 设置图元对象的属性标志
virtual void initFlags();
public:
virtual void paintBack(QPainter* painter,
const ZxPaintParam& param);
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void onLoadTempl(ZxSerializer* ser);
virtual void onSaveTempl(ZxSerializer* ser);
virtual void fillPtyPano(IxPtyPano* sheet);
protected:
bool m_bVertival; //方向
};