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.
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <QPen>
|
|
|
|
|
#include <QColor>
|
|
|
|
|
#include <QFont>
|
|
|
|
|
|
|
|
|
|
#include "Defines.h"
|
|
|
|
|
#include "ZxRenderItem.h"
|
|
|
|
|
#include "iPlotCurveT_global.h"
|
|
|
|
|
|
|
|
|
|
// 图例中的每一项
|
|
|
|
|
class ZxObjCurveBase;
|
|
|
|
|
class I_PLOTCURVE_T_EXPORT ZxSubLegendItem : public ZxRenderItem
|
|
|
|
|
{
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
ZX_DECLARE_DYNAMIC
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
ZxSubLegendItem();
|
|
|
|
|
ZxSubLegendItem(ZxObjCurveBase* pCurve);
|
|
|
|
|
~ZxSubLegendItem();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 关联曲线
|
|
|
|
|
void setCurve(ZxObjCurveBase* p); //用于序列化时,重新设定
|
|
|
|
|
ZxObjCurveBase* getCurve(void);
|
|
|
|
|
QString getCurveName();
|
|
|
|
|
|
|
|
|
|
// 根据当前字体和文字以及线获取其最小的宽+高
|
|
|
|
|
double getFixedWidth();
|
|
|
|
|
double getFixedHeight();
|
|
|
|
|
|
|
|
|
|
// 刷新
|
|
|
|
|
virtual void update();
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
|
|
// 序列化
|
|
|
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
|
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
virtual void onLoadTempl(ZxSerializer* ser);
|
|
|
|
|
virtual void onSaveTempl(ZxSerializer* ser);
|
|
|
|
|
|
|
|
|
|
virtual QString getTemplPath(bool bSelf);
|
|
|
|
|
|
|
|
|
|
// 属性页
|
|
|
|
|
virtual void fillPtyPano(IxPtyPano* sheet);
|
|
|
|
|
|
|
|
|
|
// 绘图
|
|
|
|
|
virtual void paintBack(QPainter* painter, const ZxPaintParam& param);
|
|
|
|
|
|
|
|
|
|
// 鼠标
|
|
|
|
|
virtual void onLeftDoubleClick(const QPointF& pt);
|
|
|
|
|
virtual void onLeftClick(const QPointF& pt);
|
|
|
|
|
|
|
|
|
|
// 获取线范围内的点
|
|
|
|
|
VecPointF getDotPtsWithin(QRectF rt);
|
|
|
|
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
|
|
|
|
|
|
|
void sigLeftDoubleClicked(const QPointF& pt);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
|
|
// 存入曲线最原始的名字,可能与显示的不一致
|
|
|
|
|
// 因为分组原因,显示的放在objectName中
|
|
|
|
|
QString m_sCurveName;
|
|
|
|
|
|
|
|
|
|
// 外界传入,本类不负责释放
|
|
|
|
|
ZxObjCurveBase* m_pCurve;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|