mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#4085 3D view: Add check box for version info text
This commit is contained in:
@@ -203,6 +203,7 @@ void Rim2dIntersectionView::update3dInfo()
|
||||
m_viewer->showInfoText(false);
|
||||
m_viewer->showHistogram(false);
|
||||
m_viewer->showAnimationProgress(false);
|
||||
m_viewer->showVersionInfo(false);
|
||||
|
||||
m_viewer->update();
|
||||
return;
|
||||
@@ -702,6 +703,7 @@ void Rim2dIntersectionView::resetLegendsInViewer()
|
||||
m_viewer->showAnimationProgress(true);
|
||||
m_viewer->showHistogram(false);
|
||||
m_viewer->showInfoText(false);
|
||||
m_viewer->showVersionInfo(false);
|
||||
m_viewer->showEdgeTickMarksXZ(true, m_showAxisLines());
|
||||
|
||||
m_viewer->setMainScene(new cvf::Scene());
|
||||
|
||||
@@ -109,6 +109,7 @@ Rim3dOverlayInfoConfig::Rim3dOverlayInfoConfig()
|
||||
CAF_PDM_InitField(&m_showResultInfo, "ShowResultInfo", true, "Result Info", "", "", "");
|
||||
CAF_PDM_InitField(&m_showHistogram, "ShowHistogram", true, "Histogram", "", "", "");
|
||||
CAF_PDM_InitField(&m_showVolumeWeightedMean, "ShowVolumeWeightedMean", true, "Mobile Volume Weighted Mean", "", "", "");
|
||||
CAF_PDM_InitField(&m_showVersionInfo, "ShowVersionInfo", true, "Version Info", "", "", "");
|
||||
|
||||
CAF_PDM_InitFieldNoDefault(&m_statisticsTimeRange, "StatisticsTimeRange", "Statistics Time Range", "", "", "");
|
||||
CAF_PDM_InitFieldNoDefault(&m_statisticsCellRange, "StatisticsCellRange", "Statistics Cell Range", "", "", "");
|
||||
@@ -279,6 +280,14 @@ void Rim3dOverlayInfoConfig::setIsActive(bool active)
|
||||
m_active = active;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool Rim3dOverlayInfoConfig::showVersionInfo() const
|
||||
{
|
||||
return m_showVersionInfo();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -830,6 +839,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
m_viewDef->viewer()->showInfoText(false);
|
||||
m_viewDef->viewer()->showHistogram(false);
|
||||
m_viewDef->viewer()->showAnimationProgress(false);
|
||||
m_viewDef->viewer()->showVersionInfo(false);
|
||||
|
||||
update3DInfoIn2dViews();
|
||||
return;
|
||||
@@ -838,6 +848,7 @@ void Rim3dOverlayInfoConfig::update3DInfo()
|
||||
m_viewDef->viewer()->showInfoText(m_showCaseInfo() || m_showResultInfo());
|
||||
m_viewDef->viewer()->showHistogram(false);
|
||||
m_viewDef->viewer()->showAnimationProgress(m_showAnimProgress());
|
||||
m_viewDef->viewer()->showVersionInfo(m_showVersionInfo());
|
||||
|
||||
m_isVisCellStatUpToDate = false;
|
||||
|
||||
@@ -902,6 +913,8 @@ void Rim3dOverlayInfoConfig::defineUiOrdering(QString uiConfigName, caf::PdmUiOr
|
||||
{
|
||||
visGroup->add(&m_showHistogram);
|
||||
}
|
||||
|
||||
visGroup->add(&m_showVersionInfo);
|
||||
|
||||
if (contourMap)
|
||||
{
|
||||
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
bool isActive() const;
|
||||
void setIsActive(bool active);
|
||||
|
||||
bool showVersionInfo() const;
|
||||
|
||||
enum StatisticsTimeRangeType
|
||||
{
|
||||
ALL_TIMESTEPS,
|
||||
@@ -129,6 +131,7 @@ private:
|
||||
caf::PdmField<bool> m_showResultInfo;
|
||||
caf::PdmField<bool> m_showVolumeWeightedMean;
|
||||
caf::PdmField<bool> m_showHistogram;
|
||||
caf::PdmField<bool> m_showVersionInfo;
|
||||
|
||||
caf::PdmField<caf::AppEnum<StatisticsTimeRangeType> > m_statisticsTimeRange;
|
||||
caf::PdmField<caf::AppEnum<StatisticsCellRangeType> > m_statisticsCellRange;
|
||||
|
||||
@@ -115,6 +115,7 @@ RiuViewer::RiuViewer(const QGLFormat& format, QWidget* parent)
|
||||
m_versionInfoLabel->setFrameShape(QFrame::NoFrame);
|
||||
m_versionInfoLabel->setAlignment(Qt::AlignRight);
|
||||
m_versionInfoLabel->setText(QString("%1 v%2").arg(RI_APPLICATION_NAME, RiaApplication::getVersionStringApp(false)));
|
||||
m_showVersionInfo = true;
|
||||
|
||||
// Z scale label
|
||||
m_zScaleLabel = new QLabel();
|
||||
@@ -395,7 +396,7 @@ void RiuViewer::paintOverlayItems(QPainter* painter)
|
||||
// yPos += m_histogramWidget->height() + margin;
|
||||
}
|
||||
|
||||
if (m_showInfoText) // Version Label
|
||||
if (m_showVersionInfo) // Version Label
|
||||
{
|
||||
QSize size(m_versionInfoLabel->sizeHint().width(), m_versionInfoLabel->sizeHint().height());
|
||||
QPoint pos(this->width() - size.width() - margin - edgeAxisFrameBorderWidth,
|
||||
@@ -478,6 +479,14 @@ void RiuViewer::showInfoText(bool enable)
|
||||
m_showInfoText = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::showVersionInfo(bool enable)
|
||||
{
|
||||
m_showVersionInfo = enable;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -81,6 +81,7 @@ public:
|
||||
void setEnableMask(unsigned int mask);
|
||||
|
||||
void showInfoText(bool enable);
|
||||
void showVersionInfo(bool enable);
|
||||
void setInfoText(QString text);
|
||||
|
||||
void hideZScaleCheckbox(bool hide);
|
||||
@@ -156,7 +157,8 @@ private:
|
||||
QRect m_infoLabelOverlayArea;
|
||||
|
||||
QLabel* m_versionInfoLabel;
|
||||
bool m_showInfoText;
|
||||
bool m_showInfoText;
|
||||
bool m_showVersionInfo;
|
||||
|
||||
QLabel* m_zScaleLabel;
|
||||
bool m_showZScaleLabel;
|
||||
|
||||
Reference in New Issue
Block a user