From ed2b90de038ea175cb78791e6674a43214f21a09 Mon Sep 17 00:00:00 2001 From: lh <2334563547@qq.com> Date: Fri, 21 Aug 2026 17:17:30 +0800 Subject: [PATCH] =?UTF-8?q?feat(nmSubWxs):=20=E4=BC=98=E5=8C=96=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E4=BA=95=E5=AF=B9=E8=AF=9D=E6=A1=86=E4=BA=95=E4=BF=A1?= =?UTF-8?q?=E6=81=AF=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将时间变表皮开关及详情入口移至井信息分组末行 - 调整井信息为三列布局,井号、井名和井型控件仅占第二列 - 在底部增加与储层特性对话框一致的帮助按钮 - 补充帮助按钮中文翻译并更新翻译资源 --- Bin/Config/Lang/cn/nmNum_cn.qm | Bin 109383 -> 109434 bytes Bin/Config/Lang/cn/nmNum_cn.ts | 1 + Include/nmNum/nmSubWxs/nmWxWellEditor.h | 8 ++- Src/nmNum/nmSubWxs/nmWxWellEditor.cpp | 76 +++++++++++++++++------- 4 files changed, 62 insertions(+), 23 deletions(-) diff --git a/Bin/Config/Lang/cn/nmNum_cn.qm b/Bin/Config/Lang/cn/nmNum_cn.qm index fb48122b6417ef9a6f0f890d539f946cd18fb6d6..88f230a1bfb28339a02e9886a1c6f8be375cd7ae 100644 GIT binary patch delta 565 zcmXBRPe_w-9LMqR=V{yHvt?_}Z8_Rz(5x*&DO5=GAtKBUNrhntm58-E%$3d_lgS({ ztb>2zTdn_gkq%K%zv6+=K}to3r4e}uRu@T#I)w_^GHIvR@eQBP+d0$kIn!t%{^CqtpvkQ-W4AOvC^b|#5`$L)W2EqZArfXXWv4gy*sQAv+=4IOl zba=lI{R$$qbe}Mg<9bUYrudRYgUWe}3sb_eeg;ZZTF8$Rx(E4Z@gOR>XTu2Q*=SXf z6#K0@@SO7-J5a@Kw&gP2aI(V73P(!9sOL{5X(TveKP1J$llHIJA?}r` zKo{p6jX2GIr;6hoa<)rJw|MQ;VQZ1yC+$R`J^zK4@7K$K}dLrAt>bO&{J5JS;) RT?($W<1R||hqv&+_74E=w`l+X delta 559 zcmXBOPe_w-90u_3^Y+d)=Nxl$bJqMv(>5>zXGS%LVJyLtAU%~sYMBR_;>NTzjb(qJ zvFuB|5@cN#or?TXBPu;ab|}e+txMTKmQjZeT0%5zw9E71IX%yxRNm`U-Zc|wvN(*X zN6~7O29}6adkLXWIfr67M@o1B3MPeLx&zG{qCq2JWQ}#Q7dN>>cJM{{37)ZArJ!FV zRduM`M|JZNqVf;4Q~RB0`7OB`Ttv!Ual8!Q2BvpGDH`UL*RuEES&4 z_5nrM3f@7}BCTZN*|lT*OLqw}j~2%8ly!O!I>jM<0=U8|gAXe98`iB?<*C-^+3nt( zL#;W_EOMx*2Sxn3NWoDK84pWmQ~b*K1tj7o58&l=u@`QxHG8mw`^;U^_)oE5PQc() zm!2>Z`S<)6;ZD9$5{8y_RtxHd-KuOt4ZqmhqdB6H7cUTor@7YFh&cOgV^DM2mcVs! zyKELxaE*^wSP?R7=A@xWO@oHh%0V$9+yZc3I9X={HVw6M6FV8<(4iX4`uS=W8QX&P0_H(SXu6 Mf#$@PTkskF0p!cEw*UYD diff --git a/Bin/Config/Lang/cn/nmNum_cn.ts b/Bin/Config/Lang/cn/nmNum_cn.ts index da78834..157e551 100644 --- a/Bin/Config/Lang/cn/nmNum_cn.ts +++ b/Bin/Config/Lang/cn/nmNum_cn.ts @@ -6567,6 +6567,7 @@ Average pressure in contour: %2 MPa Multistage fractured horizontal well多段压裂水平井 Time-dependent skin时间变表皮 Edit time-dependent skin编辑时间变表皮 + Help帮助 OK确定 Cancel取消 Well name cannot be empty.井名不能为空。 diff --git a/Include/nmNum/nmSubWxs/nmWxWellEditor.h b/Include/nmNum/nmSubWxs/nmWxWellEditor.h index 55af736..b0a1463 100644 --- a/Include/nmNum/nmSubWxs/nmWxWellEditor.h +++ b/Include/nmNum/nmSubWxs/nmWxWellEditor.h @@ -88,6 +88,9 @@ private slots: /** @brief 以当前工作副本打开旧时间变表皮编辑窗口。 */ void slotEditTimeDependentSkin(); + /** @brief 打开系统帮助文档。 */ + void slotHelp(); + /** @brief 根据参数面板有效状态刷新确定按钮。 */ void slotPanelValidityChanged(bool bValid); @@ -98,10 +101,10 @@ private: /** @brief 创建左侧参数区、右侧轨迹区和底部命令区。 */ void createUi(); - /** @brief 创建固定显示的井号、井名和井型信息区。 */ + /** @brief 创建固定显示的井号、井名、井型和时间变表皮信息区。 */ QWidget* createWellInformationWidget(QWidget* pParent); - /** @brief 创建时间变表皮入口、校验提示和确认按钮区。 */ + /** @brief 创建帮助入口、校验提示和确认按钮区。 */ QWidget* createFooter(); /** @brief 从当前工作副本回填时间变表皮控件。 */ @@ -132,6 +135,7 @@ private: QComboBox* m_pWellTypeComboBox; ///< 井型选择器。 QCheckBox* m_pTimeDependentCheckBox; ///< 时间变表皮开关。 QToolButton* m_pTimeDependentButton; ///< 时间变表皮详情入口。 + QToolButton* m_pFooterHelpButton; ///< 底部帮助命令。 QDialogButtonBox* m_pButtonBox; ///< 确定和取消按钮区。 QLabel* m_pStatusLabel; ///< 当前校验错误。 QSplitter* m_pMainSplitter; ///< 参数与轨迹分割器。 diff --git a/Src/nmNum/nmSubWxs/nmWxWellEditor.cpp b/Src/nmNum/nmSubWxs/nmWxWellEditor.cpp index fc6f069..6bfbfdc 100644 --- a/Src/nmNum/nmSubWxs/nmWxWellEditor.cpp +++ b/Src/nmNum/nmSubWxs/nmWxWellEditor.cpp @@ -47,6 +47,7 @@ nmWxWellEditor::nmWxWellEditor(const nmWellEditContext& oContext, m_pWellTypeComboBox(nullptr), m_pTimeDependentCheckBox(nullptr), m_pTimeDependentButton(nullptr), + m_pFooterHelpButton(nullptr), m_pButtonBox(nullptr), m_pStatusLabel(nullptr), m_pMainSplitter(nullptr), @@ -445,14 +446,23 @@ QWidget* nmWxWellEditor::createWellInformationWidget(QWidget* pParent) pInformationLayout->setHorizontalSpacing(6); pInformationLayout->setVerticalSpacing(6); pInformationLayout->setColumnStretch(0, 0); - pInformationLayout->setColumnStretch(1, 1); + pInformationLayout->setColumnStretch(1, 8); + pInformationLayout->setColumnStretch(2, 5); + pInformationLayout->setColumnMinimumWidth( + 1, nmParameterField::editorMinimumWidth()); + pInformationLayout->setColumnMinimumWidth( + 2, nmParameterField::unitMinimumWidth()); QLabel* pCodeLabel = new QLabel(tr("Well number"), pInformationGroup); QLabel* pNameLabel = new QLabel(tr("Well name"), pInformationGroup); QLabel* pTypeLabel = new QLabel(tr("Well type"), pInformationGroup); + QLabel* pTimeDependentLabel = new QLabel( + tr("Time-dependent skin"), pInformationGroup); pCodeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); pNameLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); pTypeLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter); + pTimeDependentLabel->setAlignment( + Qt::AlignRight | Qt::AlignVCenter); m_pWellCodeLineEdit = new QLineEdit(pInformationGroup); m_pWellNameLineEdit = new QLineEdit(pInformationGroup); @@ -475,12 +485,41 @@ QWidget* nmWxWellEditor::createWellInformationWidget(QWidget* pParent) QSizePolicy::Expanding, QSizePolicy::Fixed); } + // 时间变表皮属于井级配置,开关和详情入口共同放在值列。 + QWidget* pTimeDependentEditor = new QWidget(pInformationGroup); + QHBoxLayout* pTimeDependentLayout = new QHBoxLayout( + pTimeDependentEditor); + pTimeDependentLayout->setContentsMargins(0, 0, 0, 0); + pTimeDependentLayout->setSpacing(4); + m_pTimeDependentCheckBox = new QCheckBox(pTimeDependentEditor); + m_pTimeDependentButton = new QToolButton(pTimeDependentEditor); + QString sIconDir = QCoreApplication::applicationDirPath() + .section('/', 0, -2) + "/Res/Icon/"; + m_pTimeDependentButton->setIcon( + QIcon(sIconDir + "NmAnalDesign3.png")); + m_pTimeDependentButton->setIconSize(QSize(20, 20)); + m_pTimeDependentButton->setFixedSize(26, 26); + m_pTimeDependentButton->setAutoRaise(true); + m_pTimeDependentButton->setToolTip( + tr("Edit time-dependent skin")); + m_pTimeDependentButton->setEnabled(false); + pTimeDependentLayout->addWidget(m_pTimeDependentCheckBox); + pTimeDependentLayout->addWidget(m_pTimeDependentButton); + pTimeDependentLayout->addStretch(1); + pInformationLayout->addWidget(pCodeLabel, 0, 0); pInformationLayout->addWidget(m_pWellCodeLineEdit, 0, 1); pInformationLayout->addWidget(pNameLabel, 1, 0); pInformationLayout->addWidget(m_pWellNameLineEdit, 1, 1); pInformationLayout->addWidget(pTypeLabel, 2, 0); pInformationLayout->addWidget(m_pWellTypeComboBox, 2, 1); + pInformationLayout->addWidget(pTimeDependentLabel, 3, 0); + pInformationLayout->addWidget(pTimeDependentEditor, 3, 1); + + connect(m_pTimeDependentCheckBox, SIGNAL(toggled(bool)), + this, SLOT(slotTimeDependentToggled(bool))); + connect(m_pTimeDependentButton, SIGNAL(clicked()), + this, SLOT(slotEditTimeDependentSkin())); return pInformationGroup; } @@ -491,20 +530,13 @@ QWidget* nmWxWellEditor::createFooter() pFooterLayout->setContentsMargins(4, 5, 4, 5); pFooterLayout->setSpacing(8); - // 左侧保留时间变表皮开关和详情入口。 - m_pTimeDependentCheckBox = new QCheckBox( - tr("Time-dependent skin"), pFooter); - m_pTimeDependentButton = new QToolButton(pFooter); - QString sIconDir = QCoreApplication::applicationDirPath() - .section('/', 0, -2) + "/Res/Icon/"; - m_pTimeDependentButton->setIcon( - QIcon(sIconDir + "NmAnalDesign3.png")); - m_pTimeDependentButton->setIconSize(QSize(20, 20)); - m_pTimeDependentButton->setFixedSize(26, 26); - m_pTimeDependentButton->setAutoRaise(true); - m_pTimeDependentButton->setToolTip( - tr("Edit time-dependent skin")); - m_pTimeDependentButton->setEnabled(false); + // 左侧帮助命令与储层特性对话框保持相同样式和行为。 + m_pFooterHelpButton = new QToolButton(pFooter); + m_pFooterHelpButton->setText(tr("Help")); + m_pFooterHelpButton->setIcon(zxLoadIcon("Help")); + m_pFooterHelpButton->setToolButtonStyle( + Qt::ToolButtonTextBesideIcon); + m_pFooterHelpButton->setAutoRaise(true); // 中间状态区使用主题调色板,仅将错误文字标红。 m_pStatusLabel = new QLabel(pFooter); @@ -533,20 +565,22 @@ QWidget* nmWxWellEditor::createFooter() pCancelButton->setText(tr("Cancel")); } - pFooterLayout->addWidget(m_pTimeDependentCheckBox); - pFooterLayout->addWidget(m_pTimeDependentButton); + pFooterLayout->addWidget(m_pFooterHelpButton); pFooterLayout->addWidget(m_pStatusLabel, 1); pFooterLayout->addWidget(m_pButtonBox); - connect(m_pTimeDependentCheckBox, SIGNAL(toggled(bool)), - this, SLOT(slotTimeDependentToggled(bool))); - connect(m_pTimeDependentButton, SIGNAL(clicked()), - this, SLOT(slotEditTimeDependentSkin())); + connect(m_pFooterHelpButton, SIGNAL(clicked()), + this, SLOT(slotHelp())); connect(m_pButtonBox, SIGNAL(accepted()), this, SLOT(accept())); connect(m_pButtonBox, SIGNAL(rejected()), this, SLOT(reject())); return pFooter; } +void nmWxWellEditor::slotHelp() +{ + ZxBaseUtil::startHelp(); +} + void nmWxWellEditor::createController() { // 控制器持有当前工作副本指针,井型切换后必须销毁并重新绑定。