mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#3790 Z scale label. Display in upper left corner
This commit is contained in:
@@ -123,6 +123,8 @@ Rim3dView::Rim3dView(void)
|
||||
|
||||
CAF_PDM_InitField(&m_disableLighting, "DisableLighting", false, "Disable Results Lighting", "", "Disable light model for scalar result colors", "");
|
||||
|
||||
CAF_PDM_InitField(&m_showZScaleLabel, "ShowZScale", true, "Show Z Scale Label", "", "", "");
|
||||
|
||||
m_crossSectionVizModel = new cvf::ModelBasicList;
|
||||
m_crossSectionVizModel->setName("CrossSectionModel");
|
||||
|
||||
@@ -194,6 +196,7 @@ QWidget* Rim3dView::createViewWidget(QWidget* mainWindowParent)
|
||||
this->axisLabels(&xLabel, &yLabel, &zLabel);
|
||||
m_viewer->setAxisLabels(xLabel, yLabel, zLabel);
|
||||
|
||||
updateZScaleLabel();
|
||||
return m_viewer->layoutWidget();
|
||||
}
|
||||
|
||||
@@ -265,6 +268,7 @@ void Rim3dView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering& uiOrd
|
||||
|
||||
viewGroup->add(&m_name);
|
||||
viewGroup->add(&m_backgroundColor);
|
||||
viewGroup->add(&m_showZScaleLabel);
|
||||
viewGroup->add(&m_showGridBox);
|
||||
viewGroup->add(&isPerspectiveView);
|
||||
viewGroup->add(&m_disableLighting);
|
||||
@@ -574,7 +578,7 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
|
||||
|
||||
m_viewer->update();
|
||||
|
||||
|
||||
updateZScaleLabel();
|
||||
}
|
||||
|
||||
RiuMainWindow::instance()->updateScaleValue();
|
||||
@@ -636,6 +640,11 @@ void Rim3dView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const
|
||||
m_viewer->animationControl()->setTimeout(maximumFrameRate != 0 ? 1000/maximumFrameRate : std::numeric_limits<int>::max());
|
||||
}
|
||||
}
|
||||
else if (changedField == &m_showZScaleLabel)
|
||||
{
|
||||
m_viewer->showZScaleLabel(m_showZScaleLabel());
|
||||
m_viewer->update();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -752,6 +761,16 @@ void Rim3dView::updateAnnotationItems()
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void Rim3dView::updateZScaleLabel()
|
||||
{
|
||||
// Update Z scale label
|
||||
int scale = static_cast<int>(scaleZ());
|
||||
m_viewer->setZScale(scale);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -140,6 +140,7 @@ public:
|
||||
void createHighlightAndGridBoxDisplayModelWithRedraw();
|
||||
void updateGridBoxData();
|
||||
void updateAnnotationItems();
|
||||
void updateZScaleLabel();
|
||||
|
||||
bool isMasterView() const;
|
||||
|
||||
@@ -243,5 +244,5 @@ private:
|
||||
caf::PdmField<cvf::Vec3d> m_cameraPointOfInterest;
|
||||
caf::PdmField< cvf::Color3f > m_backgroundColor;
|
||||
caf::PdmField<bool> m_showGridBox;
|
||||
|
||||
caf::PdmField<bool> m_showZScaleLabel;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user