Merge remote-tracking branch 'origin/feature/Interpolation-20260803' into develop
# Conflicts: # Bin/Config/Lang/cn/nmNum_cn.qm resolved by origin/feature/Interpolation-20260803(远端) version # Src/nmNum/nmSubWxs/nmWxParaPropertyPebi.cppfeature/PebiSolver-Integration-20260818
commit
a4366fb711
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
@ -0,0 +1,167 @@
|
||||
#ifndef NMWXPROPERTYINTERPOLATIONDLG_H
|
||||
#define NMWXPROPERTYINTERPOLATIONDLG_H
|
||||
|
||||
#include "iDlgBase.h"
|
||||
#include "nmDataAnalyzeManager.h"
|
||||
#include "nmSubWxs_global.h"
|
||||
|
||||
#include <QPointer>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
class QCheckBox;
|
||||
class QComboBox;
|
||||
class QDoubleSpinBox;
|
||||
class QEvent;
|
||||
class QLineEdit;
|
||||
class QPointF;
|
||||
class QPushButton;
|
||||
class QTableWidget;
|
||||
class QTableWidgetItem;
|
||||
class QTimer;
|
||||
class nmGuiPlot;
|
||||
class nmObjPoint;
|
||||
class nmWxPropertyInterpolationPreviewDlg;
|
||||
|
||||
class NM_SUB_WXS_EXPORT nmWxPropertyInterpolationDlg : public iDlgBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit nmWxPropertyInterpolationDlg(nmGuiPlot* plot,
|
||||
nmDataAnalyzeManager* dataManager,
|
||||
QWidget* parent = 0);
|
||||
~nmWxPropertyInterpolationDlg();
|
||||
|
||||
protected:
|
||||
bool eventFilter(QObject* watched, QEvent* event);
|
||||
|
||||
private slots:
|
||||
void onDataSetChanged(int index);
|
||||
void onAddDataSet();
|
||||
void onDeleteDataSet();
|
||||
void onDataSetNameChanged(const QString& name);
|
||||
// 当前数据组属性及显示单位变化.
|
||||
void onCurrentDataSetPropertyChanged();
|
||||
void onCurrentDataSetEdited();
|
||||
void onXDisplayUnitChanged(const QString& unit);
|
||||
void onYDisplayUnitChanged(const QString& unit);
|
||||
void onValueDisplayUnitChanged(const QString& unit);
|
||||
void onRangeDisplayUnitChanged(const QString& unit);
|
||||
// 正式求解使用的数据组变化.
|
||||
void onCalculationSelectionChanged();
|
||||
void onMapPickToggled(bool checked);
|
||||
void onMapClicked(const QPointF& position);
|
||||
void onPointSelectionChanged();
|
||||
void onPointItemChanged(QTableWidgetItem* item);
|
||||
void onDeleteSelectedPoint();
|
||||
void onClearPoints();
|
||||
void onShowPointsToggled(bool checked);
|
||||
void onShowLabelsToggled(bool checked);
|
||||
void onPreview();
|
||||
void refreshPreview();
|
||||
|
||||
private:
|
||||
// 初始化界面及持久化数据组.
|
||||
void initInterpolationUI();
|
||||
void initializeDataSets();
|
||||
nmPropertyInterpolationDataSet createDefaultDataSet();
|
||||
QString nextDataSetName();
|
||||
void loadDataSet(int index);
|
||||
void clearCurrentDataSet();
|
||||
void saveCurrentDataSet();
|
||||
// 单位控件只维护界面显示状态;插值数据始终按求解器基准单位保存.
|
||||
void updateUnitControls(nmPropertyInterpolationDataSet& dataSet);
|
||||
void updatePointDisplayValues();
|
||||
void clearPointRows();
|
||||
void updatePointRowNumbers();
|
||||
void syncDataSetsToManager(bool markModified);
|
||||
void updateDataSetButtons();
|
||||
// 管理正式求解时k、phi和h各自使用的插值数据组.
|
||||
void updateCalculationDataSetControls();
|
||||
void updateCalculationDataSetControl(const QString& property,
|
||||
QCheckBox* checkBox,
|
||||
QComboBox* comboBox);
|
||||
void saveCalculationSelection(const QString& property,
|
||||
QCheckBox* checkBox,
|
||||
QComboBox* comboBox);
|
||||
|
||||
// 管理测点表格和地图上的临时标记.
|
||||
void appendPoint(const QPointF& valuePoint);
|
||||
void appendPointRow(const nmPropertyInterpolationPointData& point,
|
||||
const QString& markerName);
|
||||
QString createMarker(const QPointF& valuePosition,
|
||||
double value,
|
||||
bool showPoints,
|
||||
bool showLabels);
|
||||
void createMarkersForAllDataSets();
|
||||
void removeDataSetMarkers(int dataSetIndex);
|
||||
void removeAllMarkers();
|
||||
QString markerNameAt(int row) const;
|
||||
nmObjPoint* markerByName(const QString& markerName) const;
|
||||
nmObjPoint* markerAt(int row) const;
|
||||
void removeMarkerByName(const QString& markerName);
|
||||
void clearTableSelection();
|
||||
void updatePointButtons();
|
||||
void updateCurrentMarkerVisibility();
|
||||
void schedulePreviewRefresh();
|
||||
void updatePreviewWindow(bool activateWindow);
|
||||
void showPreviewError(const QString& message, bool activateWindow);
|
||||
|
||||
private:
|
||||
QPointer<nmGuiPlot> m_pPlot;
|
||||
QPointer<nmDataAnalyzeManager> m_pDataManager;
|
||||
|
||||
// 多组插值数据.
|
||||
QComboBox* m_pDataSetCombo;
|
||||
QPushButton* m_pAddDataSetButton;
|
||||
QPushButton* m_pDeleteDataSetButton;
|
||||
QVector<nmPropertyInterpolationDataSet> m_vecDataSets;
|
||||
// 与数据组、测点下标一一对应,仅保存地图临时标记的对象名称.
|
||||
QVector<QStringList> m_vecMarkerNames;
|
||||
int m_nCurrentDataSetIndex;
|
||||
int m_nNextPointId;
|
||||
// 加载界面数据时阻止控件信号反向修改当前数据组.
|
||||
bool m_bUpdatingUi;
|
||||
|
||||
// 当前数据组的属性及名称.
|
||||
QComboBox* m_pPropertyCombo;
|
||||
QLineEdit* m_pNameEdit;
|
||||
|
||||
// 测点数据录入.
|
||||
QDoubleSpinBox* m_pNewValueSpin;
|
||||
// 新值单位与表格Value列单位保持同步.
|
||||
QComboBox* m_pNewValueUnitCombo;
|
||||
QPushButton* m_pMapPickButton;
|
||||
QTableWidget* m_pPointTable;
|
||||
// 表格第0行中的X、Y和Value显示单位.
|
||||
QComboBox* m_pXUnitCombo;
|
||||
QComboBox* m_pYUnitCombo;
|
||||
QComboBox* m_pValueUnitCombo;
|
||||
QPushButton* m_pDeletePointButton;
|
||||
QPushButton* m_pClearPointsButton;
|
||||
QCheckBox* m_pShowPointsCheck;
|
||||
QCheckBox* m_pShowLabelsCheck;
|
||||
|
||||
// Kriging插值参数.
|
||||
QDoubleSpinBox* m_pNuggetSpin;
|
||||
QDoubleSpinBox* m_pSillSpin;
|
||||
QDoubleSpinBox* m_pRangeSpin;
|
||||
QComboBox* m_pRangeUnitCombo;
|
||||
QComboBox* m_pModelCombo;
|
||||
|
||||
// 正式求解时各属性使用的数据组.
|
||||
QCheckBox* m_pUseKCheck;
|
||||
QComboBox* m_pKCalculationDataSetCombo;
|
||||
QCheckBox* m_pUsePhiCheck;
|
||||
QComboBox* m_pPhiCalculationDataSetCombo;
|
||||
QCheckBox* m_pUseHCheck;
|
||||
QComboBox* m_pHCalculationDataSetCombo;
|
||||
|
||||
// 插值结果预览.
|
||||
QPushButton* m_pPreviewButton;
|
||||
QPointer<nmWxPropertyInterpolationPreviewDlg> m_pPreviewDialog;
|
||||
QTimer* m_pPreviewRefreshTimer;
|
||||
};
|
||||
|
||||
#endif // NMWXPROPERTYINTERPOLATIONDLG_H
|
||||
@ -0,0 +1,71 @@
|
||||
#ifndef NMWXPROPERTYINTERPOLATIONPREVIEWDLG_H
|
||||
#define NMWXPROPERTYINTERPOLATIONPREVIEWDLG_H
|
||||
|
||||
#include "iDlgBase.h"
|
||||
#include "nmSubWxs_global.h"
|
||||
|
||||
#include <QPointF>
|
||||
#include <QRectF>
|
||||
#include <QSize>
|
||||
#include <QString>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
class QVTKWidget;
|
||||
|
||||
// 网格属性插值结果的独立VTK预览对话框.
|
||||
class NM_SUB_WXS_EXPORT nmWxPropertyInterpolationPreviewDlg : public iDlgBase
|
||||
{
|
||||
public:
|
||||
explicit nmWxPropertyInterpolationPreviewDlg(
|
||||
const QString& dataSetName,
|
||||
const QString& scalarTitle,
|
||||
const QRectF& bounds,
|
||||
int columnCount,
|
||||
int rowCount,
|
||||
const QVector<double>& interpolationValues,
|
||||
const QVector<QPointF>& measurementPoints,
|
||||
const QVector<double>& measurementValues,
|
||||
const QVector<QPointF>& outlinePoints,
|
||||
const QVector<QPointF>& wellPoints,
|
||||
const QStringList& wellNames,
|
||||
bool showMeasurementPoints,
|
||||
bool showMeasurementLabels,
|
||||
QWidget* parent = 0);
|
||||
|
||||
void updatePreview(const QString& dataSetName,
|
||||
const QString& scalarTitle,
|
||||
const QRectF& bounds,
|
||||
int columnCount,
|
||||
int rowCount,
|
||||
const QVector<double>& interpolationValues,
|
||||
const QVector<QPointF>& measurementPoints,
|
||||
const QVector<double>& measurementValues,
|
||||
const QVector<QPointF>& outlinePoints,
|
||||
const QVector<QPointF>& wellPoints,
|
||||
const QStringList& wellNames,
|
||||
bool showMeasurementPoints,
|
||||
bool showMeasurementLabels);
|
||||
void showMessage(const QString& dataSetName, const QString& message);
|
||||
|
||||
virtual QSize sizeHint() const;
|
||||
|
||||
private:
|
||||
void initializeRenderer(const QString& scalarTitle,
|
||||
const QRectF& bounds,
|
||||
int columnCount,
|
||||
int rowCount,
|
||||
const QVector<double>& interpolationValues,
|
||||
const QVector<QPointF>& measurementPoints,
|
||||
const QVector<double>& measurementValues,
|
||||
const QVector<QPointF>& outlinePoints,
|
||||
const QVector<QPointF>& wellPoints,
|
||||
const QStringList& wellNames,
|
||||
bool showMeasurementPoints,
|
||||
bool showMeasurementLabels);
|
||||
|
||||
private:
|
||||
QVTKWidget* m_pVtkWidget;
|
||||
};
|
||||
|
||||
#endif // NMWXPROPERTYINTERPOLATIONPREVIEWDLG_H
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue