mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#266) Refactoring
Limit usage of RivGridBoxGenerator to only RiuViewer Update colors of grid box based on background color Use dark gray instead of pure black
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "RiaApplication.h"
|
||||
#include "RiaBaseDefs.h"
|
||||
|
||||
#include "RimCase.h"
|
||||
#include "RimProject.h"
|
||||
#include "RimView.h"
|
||||
#include "RimViewController.h"
|
||||
@@ -526,14 +527,6 @@ RimView* RiuViewer::ownerReservoirView()
|
||||
return m_rimView;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RivGridBoxGenerator* RiuViewer::gridBoxGenerator() const
|
||||
{
|
||||
return m_gridBoxGenerator;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -598,3 +591,38 @@ void RiuViewer::resizeGL(int width, int height)
|
||||
|
||||
m_overlayRendering->camera()->viewport()->set(0, 0, width, height);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuViewer::updateGridBoxData()
|
||||
{
|
||||
if (ownerReservoirView() && ownerReservoirView()->ownerCase())
|
||||
{
|
||||
RimView* rimView = ownerReservoirView();
|
||||
RimCase* rimCase = rimView->ownerCase();
|
||||
|
||||
m_gridBoxGenerator->setScaleZ(rimView->scaleZ);
|
||||
m_gridBoxGenerator->setDisplayModelOffset(rimCase->displayModelOffset());
|
||||
m_gridBoxGenerator->updateFromBackgroundColor(rimView->backgroundColor);
|
||||
|
||||
if (rimView->showActiveCellsOnly())
|
||||
{
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox(rimCase->activeCellsBoundingBox());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_gridBoxGenerator->setGridBoxDomainCoordBoundingBox(rimCase->allCellsBoundingBox());
|
||||
}
|
||||
|
||||
m_gridBoxGenerator->createGridBoxParts();
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
cvf::Model* RiuViewer::gridBoxModel() const
|
||||
{
|
||||
return m_gridBoxGenerator->model();
|
||||
}
|
||||
|
||||
@@ -39,8 +39,9 @@ class QProgressBar;
|
||||
|
||||
namespace cvf
|
||||
{
|
||||
class Part;
|
||||
class Model;
|
||||
class OverlayItem;
|
||||
class Part;
|
||||
}
|
||||
|
||||
//==================================================================================================
|
||||
@@ -71,7 +72,8 @@ public:
|
||||
void setHistogram(double min, double max, const std::vector<size_t>& histogram);
|
||||
void setHistogramPercentiles(double pmin, double pmax, double mean);
|
||||
|
||||
RivGridBoxGenerator* gridBoxGenerator() const;
|
||||
void updateGridBoxData();
|
||||
cvf::Model* gridBoxModel() const;
|
||||
|
||||
void showAnimationProgress(bool enable);
|
||||
|
||||
@@ -100,7 +102,6 @@ private:
|
||||
|
||||
void setupRenderingSequence();
|
||||
static void copyCameraView(cvf::Camera* srcCamera, cvf::Camera* dstCamera);
|
||||
|
||||
private:
|
||||
QLabel* m_InfoLabel;
|
||||
QLabel* m_versionInfoLabel;
|
||||
|
||||
Reference in New Issue
Block a user