fix(ui): 调整 PEBI 网格预览工具栏分组和图标

feature/nmNum-postprocessing-view-20260910
lh 5 hours ago
parent 369d67aa77
commit 3eef7f3c82

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 979 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 400 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

@ -34,14 +34,14 @@ nmVTKViewCommandController::nmVTKViewCommandController(
} }
// QAction 只在构造阶段创建一次,后续所有菜单和工具栏复用这些实例。 // QAction 只在构造阶段创建一次,后续所有菜单和工具栏复用这些实例。
createAction(ViewCommand_ZoomIn, tr("Zoom In"), "ZoomIn.png", createAction(ViewCommand_ZoomIn, tr("Zoom In"), "NmZoomIn.png",
SLOT(zoomIn())); SLOT(zoomIn()));
createAction(ViewCommand_ZoomOut, tr("Zoom Out"), "ZoomOut.png", createAction(ViewCommand_ZoomOut, tr("Zoom Out"), "NmZoomOut.png",
SLOT(zoomOut())); SLOT(zoomOut()));
createAction(ViewCommand_Fit, tr("Fit to Window"), createAction(ViewCommand_Fit, tr("Fit to Window"),
"ZoomSelfAdaptation.png", SLOT(fitView())); "NmZoomReset.png", SLOT(fitView()));
createAction(ViewCommand_Top, tr("Top View"), "Map2D.png", createAction(ViewCommand_Top, tr("Top View"), "NmTopView.png",
SLOT(setTopView())); SLOT(setTopView()));
createAction(ViewCommand_Front, tr("Front View"), QString(), createAction(ViewCommand_Front, tr("Front View"), QString(),
SLOT(setFrontView())); SLOT(setFrontView()));
createAction(ViewCommand_Right, tr("Right View"), QString(), createAction(ViewCommand_Right, tr("Right View"), QString(),
@ -53,8 +53,9 @@ nmVTKViewCommandController::nmVTKViewCommandController(
SLOT(resetRotationCenter())); SLOT(resetRotationCenter()));
createAction(ViewCommand_SaveImage, tr("Save as Image"), "SaveImg.png", createAction(ViewCommand_SaveImage, tr("Save as Image"), "SaveImg.png",
SLOT(saveImage())); SLOT(saveImage()));
createAction(ViewCommand_CopyImage, tr("Copy Image"), "Copy.png", createAction(ViewCommand_CopyImage, tr("Copy Image"),
SLOT(copyImage())); "NmCopyGraphic.png",
SLOT(copyImage()));
createAction(ViewCommand_Print, tr("Print"), "Print.png", createAction(ViewCommand_Print, tr("Print"), "Print.png",
SLOT(printImage())); SLOT(printImage()));
createAction(ViewCommand_PrintPreview, tr("Print Preview"), createAction(ViewCommand_PrintPreview, tr("Print Preview"),

@ -87,7 +87,7 @@ void nmWxPebiGridViewWidget::createUi()
m_pToolBar->setOrientation(Qt::Vertical); m_pToolBar->setOrientation(Qt::Vertical);
m_pToolBar->setMovable(false); m_pToolBar->setMovable(false);
m_pToolBar->setFloatable(false); m_pToolBar->setFloatable(false);
m_pToolBar->setIconSize(QSize(20, 20)); m_pToolBar->setIconSize(QSize(24, 24));
m_pToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly); m_pToolBar->setToolButtonStyle(Qt::ToolButtonIconOnly);
m_pToolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); m_pToolBar->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding);
@ -101,12 +101,12 @@ void nmWxPebiGridViewWidget::createUi()
m_pGridLinesAction->setToolTip(tr("Show Grid Lines")); m_pGridLinesAction->setToolTip(tr("Show Grid Lines"));
m_pGridLinesAction->setCheckable(true); m_pGridLinesAction->setCheckable(true);
m_pScalarBarAction = new QAction( m_pScalarBarAction = new QAction(
QIcon(gridViewIconPath("Eyes.png")), QIcon(gridViewIconPath("NmColorScale.png")),
tr("Show Scalar Bar"), this); tr("Show Scalar Bar"), this);
m_pScalarBarAction->setToolTip(tr("Show Scalar Bar")); m_pScalarBarAction->setToolTip(tr("Show Scalar Bar"));
m_pScalarBarAction->setCheckable(true); m_pScalarBarAction->setCheckable(true);
m_pBoundsGridAction = new QAction( m_pBoundsGridAction = new QAction(
QIcon(gridViewIconPath("CalGrid.png")), QIcon(gridViewIconPath("NmScaleGrid.png")),
tr("Scale Grid"), this); tr("Scale Grid"), this);
m_pBoundsGridAction->setToolTip(tr("Scale Grid")); m_pBoundsGridAction->setToolTip(tr("Scale Grid"));
m_pBoundsGridAction->setCheckable(true); m_pBoundsGridAction->setCheckable(true);
@ -123,24 +123,34 @@ void nmWxPebiGridViewWidget::createUi()
nmVTKViewCommandController::ViewCommand_Top); nmVTKViewCommandController::ViewCommand_Top);
QAction* pCopyAction = pCommandController->getAction( QAction* pCopyAction = pCommandController->getAction(
nmVTKViewCommandController::ViewCommand_CopyImage); nmVTKViewCommandController::ViewCommand_CopyImage);
bool bHasPreviousGroup = false;
if(pZoomOutAction != nullptr) { if(pZoomOutAction != nullptr) {
m_pToolBar->addAction(pZoomOutAction); m_pToolBar->addAction(pZoomOutAction);
bHasPreviousGroup = true;
} }
if(pFitAction != nullptr) { if(pFitAction != nullptr) {
m_pToolBar->addAction(pFitAction); m_pToolBar->addAction(pFitAction);
bHasPreviousGroup = true;
} }
if(pZoomInAction != nullptr) { if(pZoomInAction != nullptr) {
m_pToolBar->addAction(pZoomInAction); m_pToolBar->addAction(pZoomInAction);
bHasPreviousGroup = true;
} }
if(pTopAction != nullptr) { if(pTopAction != nullptr) {
if(bHasPreviousGroup) {
m_pToolBar->addSeparator();
}
m_pToolBar->addAction(pTopAction); m_pToolBar->addAction(pTopAction);
bHasPreviousGroup = true;
}
if(bHasPreviousGroup) {
m_pToolBar->addSeparator();
} }
m_pToolBar->addSeparator();
m_pToolBar->addAction(m_pGridLinesAction); m_pToolBar->addAction(m_pGridLinesAction);
m_pToolBar->addAction(m_pScalarBarAction); m_pToolBar->addAction(m_pScalarBarAction);
m_pToolBar->addAction(m_pBoundsGridAction); m_pToolBar->addAction(m_pBoundsGridAction);
m_pToolBar->addSeparator();
if(pCopyAction != nullptr) { if(pCopyAction != nullptr) {
m_pToolBar->addSeparator();
m_pToolBar->addAction(pCopyAction); m_pToolBar->addAction(pCopyAction);
} }
} else { } else {

Loading…
Cancel
Save