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/iPlotBase/Tools/ZxSimpleTool.h

54 lines
1.0 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 "ZxTool.h"
class ZxCompoundTool;
/// 简单图形工具
class I_PLOTBASE_EXPORT ZxSimpleTool : public ZxTool
{
Q_OBJECT
public:
ZxSimpleTool();
public:
/// 获取所属的复合工具
ZxCompoundTool* getCompoundTool();
//virtual ZxSimpleTool* clone() const = 0;
/// 从所属的复合工具中移除
virtual void detach();
/// 根据上下管件关联时选上面的bottom问题而处理
virtual bool rehitTest(const QPointF& pt);
protected:
virtual bool onLeftDown(const QPointF& pt);
virtual bool onLeftUp(const QPointF& pt);
virtual bool onRightDown(const QPointF& pt);
virtual bool onRightUp(const QPointF& pt);
virtual bool onMouseWheel(const QPointF& pt, int delta);
virtual bool onMouseMove(const QPointF& pt);
virtual bool onLeftDoubleClick(const QPointF& pt);
private:
void _callOnActivated();
void _callOnDeactivated();
public:
// 目前暂无好的方法,处理光标
bool m_bHitTestMoving;
friend class ZxCompoundTool;
};