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

80 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 "ZxObjCurveBase.h"
class I_PLOTCURVE_T_EXPORT ZxObjCurve : public ZxObjCurveBase
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjCurve();
ZxObjCurve(const QString& sName,
ZxSubAxisX* pAxisX, ZxSubAxisY* pAxisY);
~ZxObjCurve(void);
virtual void init(const QString& sName,
ZxSubAxisX* pAxisX, ZxSubAxisY* pAxisY);
// 封装
virtual void initTools();
// 选择from to
virtual bool selectRowRanges(int nFrom, int nTo);
// 根据鼠标位置xPos获取在线上的位置点
virtual bool getPointByX(double& xPos, QPointF& ptPos);
public:
// 一点选中边界是的移动策略
enum CurveMoveMode
{
MM_Free = 0, //单条移动
MM_Point_Free, //线模式
MM_Line_Free, //线模式
MM_Self_WithP, //与压力计同步
MM_Whole_Hori, //整体水平移动(竖直不动)
MM_Whole_Vert, //整体竖直移动(水平不动,暂时不用)
MM_Whole_Free //整体移动
};
protected:
// 设置图元对象的属性标志
virtual void initFlags();
// // 击中
// virtual bool hitTest(const QPointF& pt);
// // 击中后ButtonUp后的处理
// // pt1:鼠标Down点pt2鼠标Up点
// virtual bool runMove(const QPointF& pt1,
// const QPointF& pt2);
public:
virtual void paintBack(QPainter* painter, const ZxPaintParam& param);
virtual void drawPoint(QPainter* painter, QPointF arrPoints[], int nCount, ZxDot& dot);
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void fillPtyPano(IxPtyPano* sheet);
public:
void setMoveMode(int nMoveMode);
int getMoveMode() const;
protected:
// 移动模式,仅仅对于竖线而言
CurveMoveMode m_oMoveMode;
};