diff --git a/Bin/Res/Icon/NmAnimationSettings.png b/Bin/Res/Icon/NmAnimationSettings.png new file mode 100644 index 00000000..17a182ec Binary files /dev/null and b/Bin/Res/Icon/NmAnimationSettings.png differ diff --git a/Bin/Res/Icon/NmColorScaleSettings.png b/Bin/Res/Icon/NmColorScaleSettings.png new file mode 100644 index 00000000..b5547701 Binary files /dev/null and b/Bin/Res/Icon/NmColorScaleSettings.png differ diff --git a/Bin/Res/Icon/NmFirstStep.png b/Bin/Res/Icon/NmFirstStep.png new file mode 100644 index 00000000..928c7465 Binary files /dev/null and b/Bin/Res/Icon/NmFirstStep.png differ diff --git a/Bin/Res/Icon/NmLastStep.png b/Bin/Res/Icon/NmLastStep.png new file mode 100644 index 00000000..2ca97b74 Binary files /dev/null and b/Bin/Res/Icon/NmLastStep.png differ diff --git a/Bin/Res/Icon/NmNextStep.png b/Bin/Res/Icon/NmNextStep.png new file mode 100644 index 00000000..c85fd19a Binary files /dev/null and b/Bin/Res/Icon/NmNextStep.png differ diff --git a/Bin/Res/Icon/NmPreviousStep.png b/Bin/Res/Icon/NmPreviousStep.png new file mode 100644 index 00000000..dfb836ea Binary files /dev/null and b/Bin/Res/Icon/NmPreviousStep.png differ diff --git a/Bin/Res/Icon/NmStartAnimation.png b/Bin/Res/Icon/NmStartAnimation.png new file mode 100644 index 00000000..7af520be Binary files /dev/null and b/Bin/Res/Icon/NmStartAnimation.png differ diff --git a/Bin/Res/Icon/NmStopAnimation.png b/Bin/Res/Icon/NmStopAnimation.png new file mode 100644 index 00000000..fc646d90 Binary files /dev/null and b/Bin/Res/Icon/NmStopAnimation.png differ diff --git a/Include/nmNum/nmSubWxs/nmWxPebiResultControlBar.h b/Include/nmNum/nmSubWxs/nmWxPebiResultControlBar.h index a519df4e..ea4e43d1 100644 --- a/Include/nmNum/nmSubWxs/nmWxPebiResultControlBar.h +++ b/Include/nmNum/nmSubWxs/nmWxPebiResultControlBar.h @@ -71,8 +71,6 @@ private slots: void refreshFromController(); /** @brief 将控制器错误转发给后续组合窗口。 */ void forwardOperationFailure(const QString& sError); - /** @brief 从 Scene 当前设置刷新颜色按钮的色带预览。 */ - void refreshColorPreview(); private: Q_DISABLE_COPY(nmWxPebiResultControlBar) @@ -95,7 +93,7 @@ private: nmPebiResultSceneController* m_pSceneController; /** @brief 属性选择框,条目数据保存稳定英文属性 ID。 */ QComboBox* m_pPropertyCombo; - /** @brief 显示当前色带预览并打开颜色设置对话框。 */ + /** @brief 使用固定色带图标打开颜色设置对话框。 */ QToolButton* m_pColorSettingsButton; /** @brief 跳到第 0 帧的图标按钮。 */ QToolButton* m_pFirstButton; @@ -107,7 +105,7 @@ private: QToolButton* m_pNextButton; /** @brief 跳到末帧的图标按钮。 */ QToolButton* m_pLastButton; - /** @brief 根据回放状态切换播放和暂停图标。 */ + /** @brief 根据回放状态切换开始和停止图形。 */ QToolButton* m_pPlayPauseButton; /** @brief 打开速度与循环设置对话框。 */ QToolButton* m_pSettingsButton; diff --git a/Src/nmNum/nmSubWxs/nmWxPebiResultControlBar.cpp b/Src/nmNum/nmSubWxs/nmWxPebiResultControlBar.cpp index c4888478..78883f90 100644 --- a/Src/nmNum/nmSubWxs/nmWxPebiResultControlBar.cpp +++ b/Src/nmNum/nmSubWxs/nmWxPebiResultControlBar.cpp @@ -5,7 +5,6 @@ #include "nmPebiResultSceneController.h" #include "nmWxPebiResultAnimationSettingsDlg.h" #include "nmWxPebiResultColorScaleSettingsDlg.h" -#include "nmVTKColorMapCatalog.h" #include #include @@ -131,14 +130,11 @@ void nmWxPebiResultControlBar::onColorSettingsClicked() m_pPlaybackController->pause(); nmWxPebiResultColorScaleSettingsDlg oDialog( m_pSceneController, this); - connect(&oDialog, SIGNAL(displaySettingsApplied()), - this, SLOT(refreshColorPreview())); connect(&oDialog, SIGNAL(displaySettingsApplied()), this, SIGNAL(operationSucceeded())); connect(&oDialog, SIGNAL(operationFailed(QString)), this, SLOT(forwardOperationFailure(QString))); oDialog.exec(); - refreshColorPreview(); } void nmWxPebiResultControlBar::onFirstFrameClicked() @@ -207,7 +203,6 @@ void nmWxPebiResultControlBar::refreshFromController() m_listDisplayedPropertyIds.clear(); m_pPropertyCombo->setEnabled(false); m_pColorSettingsButton->setEnabled(false); - m_pColorSettingsButton->setIcon(QIcon()); m_pFirstButton->setEnabled(false); m_pPreviousButton->setEnabled(false); m_pNextButton->setEnabled(false); @@ -215,7 +210,7 @@ void nmWxPebiResultControlBar::refreshFromController() m_pPlayPauseButton->setEnabled(false); m_pSettingsButton->setEnabled(false); m_pPlayPauseButton->setIcon(QIcon(resultControlIconPath( - QString::fromLatin1("Continue.png")))); + QString::fromLatin1("NmStartAnimation.png")))); m_pPlayPauseButton->setToolTip(tr("Play")); return; } @@ -252,7 +247,6 @@ void nmWxPebiResultControlBar::refreshFromController() m_pPropertyCombo->blockSignals(bPropertyBlocked); m_pPropertyCombo->setEnabled(true); m_pColorSettingsButton->setEnabled(true); - refreshColorPreview(); const bool bTimeDependent = m_pPlaybackController->isPropertyTimeDependent(sPropertyId); @@ -294,8 +288,8 @@ void nmWxPebiResultControlBar::refreshFromController() const bool bPlaying = m_pPlaybackController->isPlaying(); m_pPlayPauseButton->setIcon(QIcon(resultControlIconPath( - bPlaying ? QString::fromLatin1("Pause.png") - : QString::fromLatin1("Continue.png")))); + bPlaying ? QString::fromLatin1("NmStopAnimation.png") + : QString::fromLatin1("NmStartAnimation.png")))); m_pPlayPauseButton->setToolTip( bPlaying ? tr("Pause") : tr("Play")); } @@ -306,19 +300,6 @@ void nmWxPebiResultControlBar::forwardOperationFailure( emit operationFailed(sError); } -void nmWxPebiResultControlBar::refreshColorPreview() -{ - nmPebiResultDisplaySettings oSettings; - if(m_pSceneController == nullptr || - !m_pSceneController->getCurrentDisplaySettings(oSettings)) { - m_pColorSettingsButton->setIcon(QIcon()); - return; - } - m_pColorSettingsButton->setIcon(QIcon( - nmVTKColorMapCatalog::createPreviewPixmap( - oSettings.m_sColorMapId, QSize(44, 14)))); -} - void nmWxPebiResultControlBar::createUi() { QHBoxLayout* pLayout = new QHBoxLayout(this); @@ -333,14 +314,15 @@ void nmWxPebiResultControlBar::createUi() m_pPropertyCombo->setToolTip(tr("Display property")); m_pColorSettingsButton = createControlButton( - this, QString(), tr("Color settings")); - m_pColorSettingsButton->setFixedSize(52, 24); - m_pColorSettingsButton->setIconSize(QSize(44, 14)); + this, QString::fromLatin1("NmColorScaleSettings.png"), + tr("Color settings")); m_pFirstButton = createControlButton( - this, QString::fromLatin1("First.png"), tr("First frame")); + this, QString::fromLatin1("NmFirstStep.png"), + tr("First frame")); m_pPreviousButton = createControlButton( - this, QString::fromLatin1("Prev.png"), tr("Previous frame")); + this, QString::fromLatin1("NmPreviousStep.png"), + tr("Previous frame")); m_pTimeCombo = new QComboBox(this); m_pTimeCombo->setMinimumWidth(150); m_pTimeCombo->setFixedHeight(24); @@ -348,13 +330,16 @@ void nmWxPebiResultControlBar::createUi() QSizePolicy::Expanding, QSizePolicy::Fixed); m_pTimeCombo->setToolTip(tr("Result time")); m_pNextButton = createControlButton( - this, QString::fromLatin1("Next.png"), tr("Next frame")); + this, QString::fromLatin1("NmNextStep.png"), + tr("Next frame")); m_pLastButton = createControlButton( - this, QString::fromLatin1("Last.png"), tr("Last frame")); + this, QString::fromLatin1("NmLastStep.png"), + tr("Last frame")); m_pPlayPauseButton = createControlButton( - this, QString::fromLatin1("Continue.png"), tr("Play")); + this, QString::fromLatin1("NmStartAnimation.png"), + tr("Play")); m_pSettingsButton = createControlButton( - this, QString::fromLatin1("SysTools.png"), + this, QString::fromLatin1("NmAnimationSettings.png"), tr("Animation settings")); pLayout->addWidget(m_pPropertyCombo);