#3698 Scale bar. Take 1. Only vertical variant implemented so far

This commit is contained in:
Bjørn Erik Jensen
2018-11-15 11:24:09 +01:00
parent 76abf0fe01
commit d8a466a9ef
10 changed files with 1728 additions and 4 deletions

View File

@@ -32,7 +32,7 @@
#include "RimFaultInViewCollection.h"
#include "RimGridCollection.h"
#include "RimSimWellInViewCollection.h"
#include "RimScaleLegendConfig.h"
#include "cafPdmUiTreeOrdering.h"
#include "cvfCamera.h"
@@ -54,7 +54,8 @@ RimContourMapView::RimContourMapView()
CAF_PDM_InitFieldNoDefault(&m_contourMapProjection, "ContourMapProjection", "Contour Map Projection", "", "", "");
m_contourMapProjection = new RimContourMapProjection();
CAF_PDM_InitField(&m_showAxisLines, "ShowAxisLines", true, "Show Axis Lines", "", "", "");
CAF_PDM_InitField(&m_showAxisLines, "ShowAxisLines", true, "Show Axis Lines", "", "", "");
CAF_PDM_InitField(&m_showScaleLegend, "ShowScaleLegend", true, "Show Scale Legend", "", "", "");
m_gridCollection->setActive(false); // This is also not added to the tree view, so cannot be enabled.
setFaultVisParameters();
@@ -63,9 +64,11 @@ RimContourMapView::RimContourMapView()
m_nameConfig = new RimContourMapNameConfig(this);
m_contourMapProjectionPartMgr = new RivContourMapProjectionPartMgr(contourMapProjection(), this);
((RiuViewerToViewInterface*)this)->setCameraPosition(defaultViewMatrix);
//CAF_PDM_InitFieldNoDefault(&m_scaleLegendConfig, "ScaleLegendConfig", "Scale Legend Config", "", "", "");
//m_scaleLegendConfig = new RimScaleLegendConfig();
}
//--------------------------------------------------------------------------------------------------
@@ -168,6 +171,7 @@ void RimContourMapView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrderin
viewGroup->add(this->userDescriptionField());
viewGroup->add(this->backgroundColorField());
viewGroup->add(&m_showAxisLines);
viewGroup->add(&m_showScaleLegend);
caf::PdmUiGroup* nameGroup = uiOrdering.addNewGroup("Contour Map Name");
m_nameConfig->uiOrdering(uiConfigName, *nameGroup);
@@ -278,6 +282,9 @@ void RimContourMapView::updateLegends()
}
}
}
//m_viewer->addColorLegendToBottomLeftCorner(m_scaleLegendConfig->titledOverlayFrame());
m_viewer->showScaleLegend(true);
}
}