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.
35 lines
559 B
C++
35 lines
559 B
C++
#pragma once
|
|
|
|
#include <ZxSimpleTool.h>
|
|
class IxGridAlign;
|
|
|
|
/// 移动工具
|
|
class I_PLOTBASE_EXPORT ZxMoveTool : public ZxSimpleTool
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
ZxMoveTool();
|
|
|
|
protected:
|
|
|
|
bool onLeftUp(const QPointF& pt);
|
|
bool onMouseMove(const QPointF& pt);
|
|
void onPaint(QPainter* painter, const ZxPaintParam& param);
|
|
|
|
QPointF caclSnapPos(QPointF pt, ZxRenderItem* item);
|
|
|
|
protected:
|
|
|
|
bool m_bMoving;
|
|
QPointF m_ptOutlinePos;
|
|
QPointF m_ptMouseItemOffset;
|
|
ZxSelectionOutline m_outline;
|
|
IxGridAlign* m_pSnapGrid;
|
|
};
|
|
|
|
|
|
|
|
|