|
|
#pragma once
|
|
|
|
|
|
#include "iGuiPlot.h"
|
|
|
#include "mAlgDefines.h"
|
|
|
class ZxDataWell;
|
|
|
class ZxObjBase;
|
|
|
class ZxObjWmPoint;
|
|
|
|
|
|
// WellMap
|
|
|
class M_GUI_PLOT_EXPORT iGuiPlotMap : public iGuiPlot
|
|
|
{
|
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit iGuiPlotMap(bool bUseBtn = true, QWidget *parent = 0);
|
|
|
~iGuiPlotMap();
|
|
|
|
|
|
// 初始化UI
|
|
|
virtual void initUI(QString sTitle, QSize szDefault = QSize(265, 203));
|
|
|
|
|
|
// 反序列化后,把数据重新加入m_mapCurveData与m_mapCurveType
|
|
|
virtual void resetAfterDeserialized();
|
|
|
|
|
|
// 刷新图形
|
|
|
virtual void runUpdate();
|
|
|
|
|
|
// 设置中心井
|
|
|
void setCentralWell(ZxDataWell* p);
|
|
|
|
|
|
// 返回井点信息
|
|
|
bool getWmInfos(QVector<ZxObjWmPoint*>& vecWms);
|
|
|
|
|
|
// 添加中心井
|
|
|
void appendWmPtCObj();
|
|
|
|
|
|
// 创建添加一个Obj
|
|
|
ZxObjWmPoint* appendOneWmObj(m_Wel_Type oType,
|
|
|
QString &sName,
|
|
|
QVector<QPointF>& vec,
|
|
|
bool bCentral = false);
|
|
|
ZxObjWmPoint* _createOneWmObj(m_Wel_Type oType,
|
|
|
QString &sName,
|
|
|
QVector<QPointF>& vec);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
// 调整UI
|
|
|
void adjustPlotUI();
|
|
|
|
|
|
// 刷新
|
|
|
virtual void updatePlots();
|
|
|
|
|
|
// 绘制Painter函数重载
|
|
|
virtual void paintEvent(QPaintEvent *);
|
|
|
virtual void resizeEvent(QResizeEvent * event);
|
|
|
|
|
|
public slots:
|
|
|
|
|
|
// Obj选择状态改变
|
|
|
void slotWmObjSelChanged(bool);
|
|
|
// Obj数据发生了改变
|
|
|
void slotWmObjPtsChanged();
|
|
|
|
|
|
// 这是从 tPlotCurveView传递过来的拖拽处理
|
|
|
void slotCheckDragAccepted(QDragEnterEvent* event, bool&b);
|
|
|
void slotDealwithDrop(QDropEvent* event);
|
|
|
|
|
|
// 确保方格
|
|
|
virtual void slotChangeSizeWithChangedXY();
|
|
|
|
|
|
signals:
|
|
|
// Obj选择状态改变
|
|
|
void sigWmObjSelChanged(ZxObjBase*, bool);
|
|
|
// Obj数据发生了改变
|
|
|
void sigWmObjPtsChanged(ZxObjBase*);
|
|
|
// 获取当前中心井的压力和流量
|
|
|
void sigGetCentralDataPF(QVector<QPointF>& vecP,
|
|
|
QVector<QPointF>& vecF);
|
|
|
|
|
|
protected:
|
|
|
|
|
|
ZxDataWell* m_pCenterWell;
|
|
|
ZxObjWmPoint* m_pWmPtC;
|
|
|
};
|