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

47 lines
785 B
C++

#pragma once
#include <ZxSimpleTool.h>
#include <ZxHandleRef.h>
class QPointF;
class ZxRenderItem;
/// 控制点编辑工具
class I_PLOTBASE_EXPORT ZxHandleTool : public ZxSimpleTool
{
Q_OBJECT
public:
ZxHandleTool();
protected:
bool onLeftDown(const QPointF& pt);
bool onLeftUp(const QPointF& pt);
bool onMouseMove(const QPointF& pt);
bool onLeftDoubleClick(const QPointF& pt);
virtual void onSelectionChanged(ZxSelection& selection);
virtual void onActivated();
virtual void onDeactivated();
ZxHandleRef findHandle(ZxSceneItem* pScene, const QPointF& pt, double fHandleSize);
protected slots:
void onItemDetached(ZxRenderItem* p);
private:
bool m_bMoving;
ZxHandleRef m_handleMove;
ZxHandleRef m_handleHover;
};