fix(Nm): 统一成果颜色设置界面并优化伸缩布局

- 统一窗口主题、框架图标及底部按钮布局
- 调整数值与单位控件伸缩比例,移除多余宽度限制
- 优化无单位属性布局及错误提示位置
- 拆分界面初始化代码并补充中文注释
feature/Dialog-Unification-20261106
lh 3 days ago
parent 1f32ff65c9
commit 4008862cb1

@ -1,15 +1,17 @@
#ifndef NMWXPEBIRESULTCOLORSCALESETTINGSDLG_H
#define NMWXPEBIRESULTCOLORSCALESETTINGSDLG_H
#include "iDlgBase.h"
#include "nmSubWxs_global.h"
#include "nmPebiResultDisplaySettings.h"
#include <QDialog>
#include <QString>
#include <QtGlobal>
class QCheckBox;
class QComboBox;
class QGridLayout;
class QGroupBox;
class QLabel;
class QLineEdit;
class QPushButton;
@ -26,7 +28,7 @@ class nmVolumeSceneController;
* 不回滚已经提交的状态。
*/
class NM_SUB_WXS_EXPORT nmWxPebiResultColorScaleSettingsDlg
: public QDialog
: public iDlgBase
{
Q_OBJECT
@ -78,8 +80,16 @@ private slots:
private:
Q_DISABLE_COPY(nmWxPebiResultColorScaleSettingsDlg)
/** @brief 创建全部编辑控件和 Apply/OK/Cancel 按钮。 */
/** @brief 创建统一主题下的分组、状态提示及底栏,控件只横向伸展。 */
void createUi();
/** @brief 创建色带、范围及公共单位区域,数值列与单位列按 8:5 分配宽度。 */
QGroupBox* createMappingGroup();
/** @brief 创建上下限越界颜色区域,色块尺寸跟随主题推荐高度。 */
QGroupBox* createRangeColorGroup();
/** @brief 创建靠右的应用、确定、取消按钮并设置键盘导航顺序。 */
QWidget* createFooter();
/** @brief 在全部控件就绪后连接原有编辑信号,不改变换算和提交流程。 */
void connectUiSignals();
/** @brief 两种构造入口共用初始化流程,保证控件布局与按钮行为一致。 */
void initializeDialog();
/** @brief 从 Scene 读取初值并记录不可变的预期身份。 */
@ -139,6 +149,7 @@ private:
QString m_sRangeDisplayTexts[2]; ///< 最近回填文字,配合字段修改标记保护未编辑原值。
bool m_bInitialized; ///< Scene 初值是否完整读取成功。
QGridLayout* m_pMappingLayout; ///< 颜色映射字段布局,无单位时由数值列使用剩余宽度。
QComboBox* m_pColorMapCombo; ///< 带渐变预览和稳定 ID 的色带框。
QLineEdit* m_pMinimumEdit; ///< 支持科学计数法的最小值文字框。
QLineEdit* m_pMaximumEdit; ///< 支持科学计数法的最大值文字框。

@ -2,6 +2,7 @@
#include "iUnitGroup.h"
#include "iUnitHelper.h"
#include "ZxBaseUtil.h"
#include "nmPebiResultPropertyCatalog.h"
#include "nmPebiResultSceneController.h"
#include "nmVolumeSceneController.h"
@ -12,17 +13,18 @@
#include <QColorDialog>
#include <QComboBox>
#include <QCoreApplication>
#include <QFontMetrics>
#include <QGridLayout>
#include <QGroupBox>
#include <QHBoxLayout>
#include <QIcon>
#include <QLabel>
#include <QLayout>
#include <QLineEdit>
#include <QLocale>
#include <QPushButton>
#include <QSize>
#include <QSizePolicy>
#include <QStyle>
#include <QToolButton>
#include <QVariant>
#include <QVBoxLayout>
@ -36,6 +38,10 @@
namespace {
// 与比例尺、测量工具及储层参数的常规字段保持相同的横向伸展比例。
const int s_nValueStretch = 8;
const int s_nUnitStretch = 5;
/* Qt 4.8 lupdate 无法追踪按稳定 ID 选择的运行时色带名称,固定登记源文字。 */
static const char* const s_pColorDialogTranslationMarkers[] =
{
@ -70,26 +76,20 @@ QString colorMapDisplayName(const QString& sColorMapId)
"nmWxPebiResultColorScaleSettingsDlg", pSourceText);
}
QString resultColorIconPath(const QString& sFileName)
{
const QString sApplicationDir = QCoreApplication::applicationDirPath();
return sApplicationDir.section('/', 0, -2) +
"/Res/Icon/" + sFileName;
}
}
nmWxPebiResultColorScaleSettingsDlg::
nmWxPebiResultColorScaleSettingsDlg(
nmPebiResultSceneController* pSceneController,
QWidget* pParent)
: QDialog(pParent),
: iDlgBase(pParent),
m_pSceneController(pSceneController),
m_pVolumeController(nullptr),
m_nExpectedBindingRevision(0),
m_pUnitGroup(nullptr),
m_bManualRangeEdited(false),
m_bInitialized(false),
m_pMappingLayout(nullptr),
m_pColorMapCombo(nullptr),
m_pMinimumEdit(nullptr),
m_pMaximumEdit(nullptr),
@ -113,13 +113,14 @@ nmWxPebiResultColorScaleSettingsDlg::
nmWxPebiResultColorScaleSettingsDlg(
nmVolumeSceneController* pVolumeController,
QWidget* pParent)
: QDialog(pParent),
: iDlgBase(pParent),
m_pSceneController(nullptr),
m_pVolumeController(pVolumeController),
m_nExpectedBindingRevision(0),
m_pUnitGroup(nullptr),
m_bManualRangeEdited(false),
m_bInitialized(false),
m_pMappingLayout(nullptr),
m_pColorMapCombo(nullptr),
m_pMinimumEdit(nullptr),
m_pMaximumEdit(nullptr),
@ -151,6 +152,11 @@ void nmWxPebiResultColorScaleSettingsDlg::initializeDialog()
if(!m_bInitialized && m_pErrorLabel->text().isEmpty()) {
setErrorText(tr("The result color settings are unavailable."));
}
// 属性在本窗口内不切换;初值填充后一次性确定是否需要单位列。
// 无单位属性和外部三维数据让输入框使用全部可用宽度,不保留空单位区。
m_pMappingLayout->setColumnStretch(2,
m_pUnitCombo->isHidden() ? 0 : s_nUnitStretch);
adjustSize();
}
nmWxPebiResultColorScaleSettingsDlg::
@ -315,171 +321,188 @@ void nmWxPebiResultColorScaleSettingsDlg::createUi()
setWindowTitle(tr("Color settings for current property"));
setModal(true);
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
// 复用框架主题,同时保留原 QDialog 的 Esc 取消行为。
setIgnoreEsc(false);
m_pColorMapCombo = new QComboBox(this);
QVBoxLayout* pMainLayout = new QVBoxLayout(this);
pMainLayout->setContentsMargins(12, 10, 12, 0);
pMainLayout->setSpacing(10);
pMainLayout->addWidget(createMappingGroup());
pMainLayout->addWidget(createRangeColorGroup());
// 分组和编辑器保持主题推荐高度,拉高窗口时余量留在内容与底栏之间。
pMainLayout->addStretch(1);
m_pErrorLabel = new QLabel(this);
m_pErrorLabel->setObjectName(QLatin1String("colorSettingsErrorLabel"));
m_pErrorLabel->setWordWrap(true);
m_pErrorLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
m_pErrorLabel->setStyleSheet(QString::fromLatin1("color: #b42318;"));
m_pErrorLabel->hide();
// 原有错误信息独立成行,避免长提示压缩底部按钮或推动按钮位置。
pMainLayout->addWidget(m_pErrorLabel);
pMainLayout->addWidget(createFooter());
connectUiSignals();
}
QGroupBox* nmWxPebiResultColorScaleSettingsDlg::createMappingGroup()
{
QGroupBox* pGroup = new QGroupBox(tr("Color mapping"), this);
pGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pMappingLayout = new QGridLayout(pGroup);
m_pMappingLayout->setContentsMargins(8, 15, 8, 10);
m_pMappingLayout->setHorizontalSpacing(6);
m_pMappingLayout->setVerticalSpacing(6);
m_pMappingLayout->setColumnStretch(1, s_nValueStretch);
m_pMappingLayout->setColumnStretch(2, s_nUnitStretch);
m_pColorMapCombo = new QComboBox(pGroup);
m_pColorMapCombo->setObjectName(QLatin1String("colorMapCombo"));
m_pColorMapCombo->setIconSize(QSize(128, 16));
m_pColorMapCombo->setMinimumWidth(280);
const QStringList listColorMapIds =
nmVTKColorMapCatalog::getColorMapIds();
m_pColorMapCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pColorMapCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
// 渐变预览按字体和主题图标高度生成,保留色带的横向比例。
const int nPreviewHeight = qMax(m_pColorMapCombo->fontMetrics().height(),
style()->pixelMetric(QStyle::PM_SmallIconSize, nullptr, m_pColorMapCombo));
const QSize oPreviewSize(nPreviewHeight * 8, nPreviewHeight);
m_pColorMapCombo->setIconSize(oPreviewSize);
const QStringList listColorMapIds = nmVTKColorMapCatalog::getColorMapIds();
for(int nIndex = 0; nIndex < listColorMapIds.size(); ++nIndex) {
const QString& sId = listColorMapIds[nIndex];
m_pColorMapCombo->addItem(
QIcon(nmVTKColorMapCatalog::createPreviewPixmap(
sId, QSize(128, 16))),
colorMapDisplayName(sId), sId);
QIcon(nmVTKColorMapCatalog::createPreviewPixmap(sId, oPreviewSize)),
colorMapDisplayName(sId), sId);
}
m_pMinimumEdit = new QLineEdit(this);
m_pMaximumEdit = new QLineEdit(this);
m_pMinimumEdit = new QLineEdit(pGroup);
m_pMaximumEdit = new QLineEdit(pGroup);
m_pMinimumEdit->setObjectName(QLatin1String("colorMinimumEdit"));
m_pMaximumEdit->setObjectName(QLatin1String("colorMaximumEdit"));
m_pMinimumEdit->setMinimumWidth(220);
m_pMinimumEdit->setMaximumWidth(250);
m_pMaximumEdit->setMinimumWidth(220);
m_pMaximumEdit->setMaximumWidth(250);
m_pUnitCombo = new QComboBox(this);
m_pUnitCombo->setObjectName(QLatin1String("colorUnitCombo"));
m_pUnitCombo->setMinimumWidth(80);
m_pUnitCombo->setMaximumWidth(140);
m_pUnitCombo->hide();
m_pMinimumEdit->setAlignment(Qt::AlignRight);
m_pMaximumEdit->setAlignment(Qt::AlignRight);
m_pRestoreRangeButton = new QToolButton(this);
// 移除原来的最大宽度限制,两行共享同一输入列并随窗口横向伸展。
m_pMinimumEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pMaximumEdit->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pUnitCombo = new QComboBox(pGroup);
m_pUnitCombo->setObjectName(QLatin1String("colorUnitCombo"));
m_pUnitCombo->setSizeAdjustPolicy(QComboBox::AdjustToContents);
m_pUnitCombo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
m_pUnitCombo->hide();
m_pRestoreRangeButton = new QToolButton(pGroup);
m_pRestoreRangeButton->setObjectName(QLatin1String("colorRestoreRangeButton"));
m_pRestoreRangeButton->setAutoRaise(true);
m_pRestoreRangeButton->setFixedSize(36, 36);
m_pRestoreRangeButton->setIconSize(QSize(32, 32));
m_pRestoreRangeButton->setIcon(QIcon(resultColorIconPath(
QString::fromLatin1("NmRestorePropertyRange.png"))));
m_pRestoreRangeButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
m_pRestoreRangeButton->setIcon(zxLoadIcon("NmRestorePropertyRange"));
m_pRestoreRangeButton->setToolTip(tr("Restore property range"));
m_pLogarithmicCheck = new QCheckBox(tr("Logarithmic scale"), this);
m_pLogarithmicCheck = new QCheckBox(tr("Logarithmic scale"), pGroup);
m_pLogarithmicCheck->setObjectName(QLatin1String("colorLogarithmicCheck"));
m_pLogReasonLabel = new QLabel(this);
m_pLogReasonLabel = new QLabel(pGroup);
m_pLogReasonLabel->setWordWrap(true);
m_pLogReasonLabel->setStyleSheet(
QString::fromLatin1("color: #666666;"));
m_pLogReasonLabel->hide();
m_pBelowRangeCheck = new QCheckBox(tr("Below min"), this);
m_pBelowRangeCheck->setObjectName(QLatin1String("colorBelowRangeCheck"));
m_pBelowColorButton = new QPushButton(this);
m_pBelowColorButton->setFixedSize(44, 22);
m_pBelowColorButton->setEnabled(false);
m_pBelowColorButton->setToolTip(tr("Below minimum color"));
m_pAboveRangeCheck = new QCheckBox(tr("Above max"), this);
m_pAboveRangeCheck->setObjectName(QLatin1String("colorAboveRangeCheck"));
m_pAboveColorButton = new QPushButton(this);
m_pAboveColorButton->setFixedSize(44, 22);
m_pAboveColorButton->setEnabled(false);
m_pAboveColorButton->setToolTip(tr("Above maximum color"));
QGroupBox* pMappingGroup = new QGroupBox(tr("Color mapping"), this);
QGridLayout* pMappingLayout = new QGridLayout(pMappingGroup);
pMappingLayout->setContentsMargins(10, 16, 10, 10);
pMappingLayout->setHorizontalSpacing(8);
pMappingLayout->setVerticalSpacing(6);
QLabel* pColorMapLabel = new QLabel(tr("Color map"), pMappingGroup);
QLabel* pMinimumLabel = new QLabel(tr("Minimum"), pMappingGroup);
QLabel* pMaximumLabel = new QLabel(tr("Maximum"), pMappingGroup);
QLabel* pColorMapLabel = new QLabel(tr("Color map"), pGroup);
QLabel* pMinimumLabel = new QLabel(tr("Minimum"), pGroup);
QLabel* pMaximumLabel = new QLabel(tr("Maximum"), pGroup);
pColorMapLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
pMinimumLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
pMaximumLabel->setAlignment(Qt::AlignRight | Qt::AlignVCenter);
const int nFieldLabelWidth = qMax(
pColorMapLabel->sizeHint().width(),
qMax(pMinimumLabel->sizeHint().width(),
pMaximumLabel->sizeHint().width()));
pMappingLayout->setColumnMinimumWidth(0, nFieldLabelWidth);
pMappingLayout->setColumnMinimumWidth(1, 220);
pMappingLayout->addWidget(pColorMapLabel, 0, 0);
pMappingLayout->addWidget(m_pColorMapCombo, 0, 1, 1, 4);
pMappingLayout->addWidget(pMinimumLabel, 1, 0);
pMappingLayout->addWidget(m_pMinimumEdit, 1, 1);
pMappingLayout->addWidget(m_pUnitCombo, 1, 2, 2, 1,
Qt::AlignVCenter);
pMappingLayout->addWidget(m_pRestoreRangeButton, 1, 4, 2, 1,
Qt::AlignCenter);
pMappingLayout->addWidget(pMaximumLabel, 2, 0);
pMappingLayout->addWidget(m_pMaximumEdit, 2, 1);
pMappingLayout->addWidget(m_pLogarithmicCheck, 3, 1, 1, 4);
pMappingLayout->addWidget(m_pLogReasonLabel, 4, 1, 1, 4);
pMappingLayout->setColumnStretch(0, 0);
pMappingLayout->setColumnStretch(1, 0);
pMappingLayout->setColumnStretch(2, 0);
pMappingLayout->setColumnStretch(3, 1);
pMappingLayout->setColumnStretch(4, 0);
QGroupBox* pRangeColorGroup = new QGroupBox(
tr("Out-of-range colors"), this);
QGridLayout* pRangeColorLayout = new QGridLayout(pRangeColorGroup);
pRangeColorLayout->setContentsMargins(10, 16, 10, 10);
pRangeColorLayout->setHorizontalSpacing(12);
pRangeColorLayout->setVerticalSpacing(6);
pRangeColorLayout->addWidget(m_pBelowRangeCheck, 0, 1);
pRangeColorLayout->addWidget(m_pBelowColorButton, 0, 2, Qt::AlignLeft);
pRangeColorLayout->addWidget(m_pAboveRangeCheck, 1, 1);
pRangeColorLayout->addWidget(m_pAboveColorButton, 1, 2, Qt::AlignLeft);
pRangeColorLayout->setColumnStretch(0, 1);
pRangeColorLayout->setColumnStretch(1, 0);
pRangeColorLayout->setColumnStretch(2, 0);
pRangeColorLayout->setColumnStretch(3, 1);
m_pErrorLabel = new QLabel(this);
m_pErrorLabel->setObjectName(QLatin1String("colorSettingsErrorLabel"));
m_pErrorLabel->setWordWrap(true);
m_pErrorLabel->setStyleSheet(QString::fromLatin1("color: #b42318;"));
m_pErrorLabel->hide();
m_pMappingLayout->addWidget(pColorMapLabel, 0, 0);
m_pMappingLayout->addWidget(m_pColorMapCombo, 0, 1, 1, 3);
m_pMappingLayout->addWidget(pMinimumLabel, 1, 0);
m_pMappingLayout->addWidget(m_pMinimumEdit, 1, 1);
m_pMappingLayout->addWidget(pMaximumLabel, 2, 0);
m_pMappingLayout->addWidget(m_pMaximumEdit, 2, 1);
// 上下限共用一个单位框和恢复按钮,两者在两行之间垂直居中。
m_pMappingLayout->addWidget(m_pUnitCombo, 1, 2, 2, 1);
m_pMappingLayout->addWidget(m_pRestoreRangeButton, 1, 3, 2, 1);
m_pMappingLayout->addWidget(m_pLogarithmicCheck, 3, 1, 1, 3);
m_pMappingLayout->addWidget(m_pLogReasonLabel, 4, 1, 1, 3);
return pGroup;
}
QGroupBox* nmWxPebiResultColorScaleSettingsDlg::createRangeColorGroup()
{
QGroupBox* pGroup = new QGroupBox(tr("Out-of-range colors"), this);
pGroup->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
QGridLayout* pLayout = new QGridLayout(pGroup);
pLayout->setContentsMargins(8, 15, 8, 10);
pLayout->setHorizontalSpacing(6);
pLayout->setVerticalSpacing(6);
pLayout->setColumnStretch(2, 1);
m_pBelowRangeCheck = new QCheckBox(tr("Below min"), pGroup);
m_pBelowRangeCheck->setObjectName(QLatin1String("colorBelowRangeCheck"));
m_pAboveRangeCheck = new QCheckBox(tr("Above max"), pGroup);
m_pAboveRangeCheck->setObjectName(QLatin1String("colorAboveRangeCheck"));
m_pBelowColorButton = new QPushButton(pGroup);
m_pAboveColorButton = new QPushButton(pGroup);
m_pBelowColorButton->setToolTip(tr("Below minimum color"));
m_pAboveColorButton->setToolTip(tr("Above maximum color"));
QHBoxLayout* pButtonLayout = new QHBoxLayout();
pButtonLayout->setContentsMargins(0, 0, 0, 0);
pButtonLayout->setSpacing(6);
// 与数据过滤窗口一致,左侧留出弹性空间,错误提示隐藏时按钮也保持靠右。
pButtonLayout->addStretch();
m_pApplyButton = new QPushButton(tr("Apply"), this);
m_pOkButton = new QPushButton(tr("OK"), this);
QPushButton* pCancelButton = new QPushButton(tr("Cancel"), this);
// 色块保持紧凑,尺寸由同一主题下输入控件的推荐高度决定。
const int nSwatchHeight = qMax(m_pMinimumEdit->sizeHint().height(),
m_pUnitCombo->sizeHint().height());
QPushButton* pColorButtons[2] = { m_pBelowColorButton, m_pAboveColorButton };
for(int nIndex = 0; nIndex < 2; ++nIndex) {
QPushButton* pButton = pColorButtons[nIndex];
pButton->setAutoDefault(false);
pButton->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
pButton->setMinimumSize(nSwatchHeight * 2, nSwatchHeight);
pButton->setEnabled(false);
}
pLayout->addWidget(m_pBelowRangeCheck, 0, 0);
pLayout->addWidget(m_pBelowColorButton, 0, 1);
pLayout->addWidget(m_pAboveRangeCheck, 1, 0);
pLayout->addWidget(m_pAboveColorButton, 1, 1);
return pGroup;
}
QWidget* nmWxPebiResultColorScaleSettingsDlg::createFooter()
{
QWidget* pFooter = new QWidget(this);
pFooter->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
QHBoxLayout* pLayout = new QHBoxLayout(pFooter);
pLayout->setContentsMargins(4, 5, 4, 5);
pLayout->setSpacing(8);
pLayout->addStretch();
m_pApplyButton = new QPushButton(tr("Apply"), pFooter);
m_pOkButton = new QPushButton(tr("OK"), pFooter);
QPushButton* pCancelButton = new QPushButton(tr("Cancel"), pFooter);
m_pApplyButton->setObjectName(QLatin1String("colorApplyButton"));
m_pOkButton->setObjectName(QLatin1String("colorOkButton"));
pCancelButton->setObjectName(QLatin1String("colorCancelButton"));
const QSize oFooterIconSize(16, 16);
m_pOkButton->setIcon(QIcon(resultColorIconPath(
QString::fromLatin1("OK.png"))));
pCancelButton->setIcon(QIcon(resultColorIconPath(
QString::fromLatin1("Cancel.png"))));
m_pOkButton->setMinimumWidth(72);
pCancelButton->setMinimumWidth(72);
m_pApplyButton->setMinimumWidth(72);
m_pOkButton->setIconSize(oFooterIconSize);
pCancelButton->setIconSize(oFooterIconSize);
m_pOkButton->setIcon(zxLoadIcon("OK"));
pCancelButton->setIcon(zxLoadIcon("Cancel"));
m_pApplyButton->setAutoDefault(false);
m_pOkButton->setDefault(true);
pCancelButton->setAutoDefault(false);
pButtonLayout->addWidget(m_pApplyButton);
pButtonLayout->addWidget(m_pOkButton);
pButtonLayout->addWidget(pCancelButton);
connect(m_pApplyButton, SIGNAL(clicked()),
this, SLOT(onApplyClicked()));
connect(m_pOkButton, SIGNAL(clicked()),
this, SLOT(onOkClicked()));
// 保持既有的应用、确定、取消顺序,应用始终紧邻确定的左侧。
pLayout->addWidget(m_pApplyButton);
pLayout->addWidget(m_pOkButton);
pLayout->addWidget(pCancelButton);
connect(m_pApplyButton, SIGNAL(clicked()), this, SLOT(onApplyClicked()));
connect(m_pOkButton, SIGNAL(clicked()), this, SLOT(onOkClicked()));
connect(pCancelButton, SIGNAL(clicked()), this, SLOT(reject()));
QVBoxLayout* pMainLayout = new QVBoxLayout(this);
pMainLayout->setContentsMargins(12, 10, 12, 0);
pMainLayout->setSpacing(8);
pMainLayout->addWidget(pMappingGroup);
pMainLayout->addWidget(pRangeColorGroup);
QHBoxLayout* pFooterLayout = new QHBoxLayout();
pFooterLayout->setContentsMargins(4, 2, 4, 5);
pFooterLayout->setSpacing(8);
m_pErrorLabel->setSizePolicy(
QSizePolicy::Expanding, QSizePolicy::Preferred);
pFooterLayout->addWidget(m_pErrorLabel, 1);
pFooterLayout->addLayout(pButtonLayout);
pMainLayout->addLayout(pFooterLayout);
setMinimumWidth(470);
// 按可见字段顺序导航,先编辑完整范围,再操作公共单位和恢复按钮。
setTabOrder(m_pColorMapCombo, m_pMinimumEdit);
setTabOrder(m_pMinimumEdit, m_pMaximumEdit);
setTabOrder(m_pMaximumEdit, m_pUnitCombo);
setTabOrder(m_pUnitCombo, m_pRestoreRangeButton);
setTabOrder(m_pRestoreRangeButton, m_pLogarithmicCheck);
setTabOrder(m_pLogarithmicCheck, m_pBelowRangeCheck);
setTabOrder(m_pBelowRangeCheck, m_pBelowColorButton);
setTabOrder(m_pBelowColorButton, m_pAboveRangeCheck);
setTabOrder(m_pAboveRangeCheck, m_pAboveColorButton);
setTabOrder(m_pAboveColorButton, m_pApplyButton);
setTabOrder(m_pApplyButton, m_pOkButton);
setTabOrder(m_pOkButton, pCancelButton);
return pFooter;
}
void nmWxPebiResultColorScaleSettingsDlg::connectUiSignals()
{
connect(m_pRestoreRangeButton, SIGNAL(clicked()),
this, SLOT(onRestorePropertyRangeClicked()));
connect(m_pMinimumEdit, SIGNAL(textEdited(QString)),

Loading…
Cancel
Save