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.
63 lines
1.8 KiB
C++
63 lines
1.8 KiB
C++
#pragma once
|
|
|
|
#include "iGuiPlotCmdHelper.h"
|
|
#include "nmPlot_global.h"
|
|
|
|
#include <QMap>
|
|
#include "nmDefines.h"
|
|
#include "nmObjToolBase.h"
|
|
|
|
class nmGuiPlot;
|
|
|
|
// 该类是数值试井绘图载体的样例nmGuiPlot的Cmd命令分发处理
|
|
class NM_PLOT_EXPORT nmGuiPlotCmdHelper
|
|
: public iGuiPlotCmdHelper
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit nmGuiPlotCmdHelper(iGuiPlot* p);
|
|
~nmGuiPlotCmdHelper();
|
|
|
|
// 分发地图命令。撤销和恢复使用本地图视图的历史栈。
|
|
virtual bool runAction(QString sAction) override;
|
|
|
|
// 允许重复点击选择按钮,以退出当前地图工具。
|
|
virtual void fuzzyCheckStates(QAction* pAction, bool& bRepeatedHit) override;
|
|
|
|
// 取消当前地图绘图操作,并恢复默认操作状态.
|
|
void cancelActiveTools();
|
|
|
|
// 插入背景
|
|
void insertBkImg();
|
|
|
|
// 插入井点
|
|
void insertOneWell();
|
|
|
|
signals:
|
|
void sigMeasureCommitted();
|
|
|
|
public slots:
|
|
|
|
void slotObjPtsFinished(QVector<QPointF>& vec);
|
|
// 只移除发出取消信号的创建工具,复位按钮;不经过对象创建和数据绑定流程。
|
|
void slotObjCreationCancelled();
|
|
// 接收本地图当前删除工具命中的图元,退出工具后交给地图确认删除。
|
|
void slotDeleteRequested(ZxObjBase* object);
|
|
void finishMeasure();
|
|
// void slotObjFinished();
|
|
|
|
protected:
|
|
|
|
friend class nmGuiPlot;
|
|
|
|
private:
|
|
// 移除测量工具并恢复图元编辑状态,测量结果由面板关闭流程清理。
|
|
void stopMeasureTool(nmGuiPlot* plot);
|
|
|
|
// 校验模型坐标,成功创建新线后再替换旧测量。
|
|
void commitMeasure(nmGuiPlot* plot, QVector<QPointF>& points);
|
|
|
|
QMap<NM_Obj_Type,nmObjToolBase*> m_activeTools; // 按类型跟踪已挂到画布上的临时工具,由画布管理其生命周期。
|
|
};
|