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

72 lines
1.6 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 <QTextEdit>
#include "ZxObjRect.h"
class I_PLOTCURVE_T_EXPORT ZxObjImage
: public ZxObjRect
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
ZxObjImage();
ZxObjImage(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
~ZxObjImage();
virtual void init(const QString& sName,
ZxSubAxisX* pAxisX,
ZxSubAxisY* pAxisY);
// 击中
virtual bool hitTest(const QPointF& pt);
// 击中后ButtonUp后的处理
// pt1:鼠标Down点pt2鼠标Up点
virtual bool runMove(const QPointF& pt1, const QPointF& pt2);
// 封装
virtual void initTools();
protected:
// 设置图元对象的属性标志
virtual void initFlags();
protected:
public:
virtual void paintBack(QPainter* painter,
const ZxPaintParam& param);
virtual void drawImage(QPainter* painter,
QRectF rt,
QString sPath,
int nAlpha = 255);
virtual void _drawImage(QPainter* painter,
QRectF rt,
QImage& img,
int nAlpha);
virtual void onSerialize(ZxSerializer* ser);
virtual void onDeserialize(ZxSerializer* ser);
virtual void fillPtyPano(IxPtyPano* sheet);
virtual void onLeftDoubleClick(const QPointF& pt);
public:
// 图片
QString getImgPath();
virtual void setImgPath(QString s);
protected:
QString m_sImgPath; //图片
};