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.
nmWTAI-Platform/Include/nmNum/nmPlot/nmPlotView.h

57 lines
1.2 KiB
C++

#pragma once
#include <QPointer>
#include "tCurvePlotView.h"
#include "nmPlot_global.h"
class nmPlotScene;
class nmObjToolBase;
// 数值试井绘图 View
class NM_PLOT_EXPORT nmPlotView : public tCurvePlotView
{
Q_OBJECT
ZX_DECLARE_DYNAMIC
public:
nmPlotView();
// 工具仅登记本次松手后的光标刷新,由视图在框架收尾后统一执行。
void requestHoverCursorRefresh(nmObjToolBase* tool);
public:
// 准备右键菜单
virtual void onPrepareContextMenu(QMenu* pMenu,
const QPointF& pos) override;
public slots:
signals:
// 鼠标在绘图区内的位置,使用模型坐标。
void sigPointerPos(double x, double y);
protected:
// 拖拽支持
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent* event);
void mouseMoveEvent(QMouseEvent* e);
// 框架完成松手收尾后,恢复本次编辑工具在当前位置的悬停光标。
void mouseReleaseEvent(QMouseEvent* e) override;
void focusOutEvent(QFocusEvent *);
void leaveEvent(QEvent *);
private:
QPointer<nmObjToolBase> m_pendingCursorTool; // 本次松手请求刷新的工具;销毁后自动置空。
};