mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
(#667) Added Grids to project tree below Info Box
Fixed update issue related to missing time step texts in animation toolbar
This commit is contained in:
@@ -75,6 +75,7 @@ ${CEE_CURRENT_LIST_DIR}RimWellLogFileCurve.h
|
|||||||
${CEE_CURRENT_LIST_DIR}RimCrossSection.h
|
${CEE_CURRENT_LIST_DIR}RimCrossSection.h
|
||||||
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.h
|
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.h
|
||||||
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.h
|
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.h
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimGridCollection.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set (SOURCE_GROUP_SOURCE_FILES
|
set (SOURCE_GROUP_SOURCE_FILES
|
||||||
@@ -148,6 +149,7 @@ ${CEE_CURRENT_LIST_DIR}RimWellLogFileCurve.cpp
|
|||||||
${CEE_CURRENT_LIST_DIR}RimCrossSection.cpp
|
${CEE_CURRENT_LIST_DIR}RimCrossSection.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.cpp
|
${CEE_CURRENT_LIST_DIR}RimCrossSectionCollection.cpp
|
||||||
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.cpp
|
${CEE_CURRENT_LIST_DIR}RimContextCommandBuilder.cpp
|
||||||
|
${CEE_CURRENT_LIST_DIR}RimGridCollection.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND CODE_HEADER_FILES
|
list(APPEND CODE_HEADER_FILES
|
||||||
|
|||||||
@@ -1299,6 +1299,7 @@ void RimEclipseView::defineUiOrdering(QString uiConfigName, caf::PdmUiOrdering&
|
|||||||
void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
void RimEclipseView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||||
{
|
{
|
||||||
uiTreeOrdering.add(m_overlayInfoConfig());
|
uiTreeOrdering.add(m_overlayInfoConfig());
|
||||||
|
uiTreeOrdering.add(m_gridCollection());
|
||||||
|
|
||||||
uiTreeOrdering.add(cellResult());
|
uiTreeOrdering.add(cellResult());
|
||||||
uiTreeOrdering.add(cellEdgeResult());
|
uiTreeOrdering.add(cellEdgeResult());
|
||||||
|
|||||||
@@ -650,6 +650,7 @@ void RimGeoMechView::axisLabels(cvf::String* xLabel, cvf::String* yLabel, cvf::S
|
|||||||
void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
void RimGeoMechView::defineUiTreeOrdering(caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/)
|
||||||
{
|
{
|
||||||
uiTreeOrdering.add(m_overlayInfoConfig());
|
uiTreeOrdering.add(m_overlayInfoConfig());
|
||||||
|
uiTreeOrdering.add(m_gridCollection());
|
||||||
|
|
||||||
uiTreeOrdering.add(cellResult());
|
uiTreeOrdering.add(cellResult());
|
||||||
|
|
||||||
|
|||||||
76
ApplicationCode/ProjectDataModel/RimGridCollection.cpp
Normal file
76
ApplicationCode/ProjectDataModel/RimGridCollection.cpp
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) Statoil ASA
|
||||||
|
// Copyright (C) Ceetron Solutions AS
|
||||||
|
//
|
||||||
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
|
// for more details.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#include "RimGridCollection.h"
|
||||||
|
#include "RimView.h"
|
||||||
|
|
||||||
|
|
||||||
|
CAF_PDM_SOURCE_INIT(RimGridCollection, "GridCollection");
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimGridCollection::RimGridCollection()
|
||||||
|
{
|
||||||
|
CAF_PDM_InitObject("Grids", ":/draw_style_faults_24x24.png", "", "");
|
||||||
|
|
||||||
|
CAF_PDM_InitField(&m_isActive, "IsActive", true, "Show grid cells", "", "", "");
|
||||||
|
m_isActive.uiCapability()->setUiHidden(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
RimGridCollection::~RimGridCollection()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
caf::PdmFieldHandle* RimGridCollection::objectToggleField()
|
||||||
|
{
|
||||||
|
return &m_isActive;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimGridCollection::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue)
|
||||||
|
{
|
||||||
|
if (changedField == &m_isActive)
|
||||||
|
{
|
||||||
|
RimView* rimView = NULL;
|
||||||
|
this->firstAnchestorOrThisOfType(rimView);
|
||||||
|
CVF_ASSERT(rimView);
|
||||||
|
|
||||||
|
rimView->setShowFaultsOnly(!m_isActive);
|
||||||
|
|
||||||
|
updateUiIconFromState(m_isActive);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimGridCollection::initAfterRead()
|
||||||
|
{
|
||||||
|
updateUiIconFromState(m_isActive);
|
||||||
|
}
|
||||||
45
ApplicationCode/ProjectDataModel/RimGridCollection.h
Normal file
45
ApplicationCode/ProjectDataModel/RimGridCollection.h
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) Statoil ASA
|
||||||
|
// Copyright (C) Ceetron Solutions AS
|
||||||
|
//
|
||||||
|
// ResInsight is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// (at your option) any later version.
|
||||||
|
//
|
||||||
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||||
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
//
|
||||||
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
||||||
|
// for more details.
|
||||||
|
//
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "cafPdmField.h"
|
||||||
|
#include "cafPdmObject.h"
|
||||||
|
|
||||||
|
|
||||||
|
//==================================================================================================
|
||||||
|
///
|
||||||
|
///
|
||||||
|
//==================================================================================================
|
||||||
|
class RimGridCollection : public caf::PdmObject
|
||||||
|
{
|
||||||
|
CAF_PDM_HEADER_INIT;
|
||||||
|
public:
|
||||||
|
RimGridCollection();
|
||||||
|
virtual ~RimGridCollection();
|
||||||
|
|
||||||
|
virtual caf::PdmFieldHandle* objectToggleField();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue);
|
||||||
|
virtual void initAfterRead();
|
||||||
|
|
||||||
|
private:
|
||||||
|
caf::PdmField<bool> m_isActive;
|
||||||
|
};
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
#include "RimCrossSectionCollection.h"
|
#include "RimCrossSectionCollection.h"
|
||||||
#include "RimEclipseCase.h"
|
#include "RimEclipseCase.h"
|
||||||
#include "RimEclipseView.h"
|
#include "RimEclipseView.h"
|
||||||
|
#include "RimGridCollection.h"
|
||||||
#include "RimOilField.h"
|
#include "RimOilField.h"
|
||||||
#include "RimProject.h"
|
#include "RimProject.h"
|
||||||
#include "RimPropertyFilterCollection.h"
|
#include "RimPropertyFilterCollection.h"
|
||||||
@@ -121,6 +122,10 @@ RimView::RimView(void)
|
|||||||
crossSectionCollection.uiCapability()->setUiHidden(true);
|
crossSectionCollection.uiCapability()->setUiHidden(true);
|
||||||
crossSectionCollection = new RimCrossSectionCollection();
|
crossSectionCollection = new RimCrossSectionCollection();
|
||||||
|
|
||||||
|
CAF_PDM_InitFieldNoDefault(&m_gridCollection, "GridCollection", "GridCollection", "", "", "");
|
||||||
|
m_gridCollection.uiCapability()->setUiHidden(true);
|
||||||
|
m_gridCollection = new RimGridCollection();
|
||||||
|
|
||||||
m_previousGridModeMeshLinesWasFaults = false;
|
m_previousGridModeMeshLinesWasFaults = false;
|
||||||
|
|
||||||
m_crossSectionVizModel = new cvf::ModelBasicList;
|
m_crossSectionVizModel = new cvf::ModelBasicList;
|
||||||
@@ -478,6 +483,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
createDisplayModel();
|
createDisplayModel();
|
||||||
updateDisplayModelVisibility();
|
updateDisplayModelVisibility();
|
||||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||||
|
RiuMainWindow::instance()->refreshAnimationActions();
|
||||||
}
|
}
|
||||||
else if (changedField == &scaleZ)
|
else if (changedField == &scaleZ)
|
||||||
{
|
{
|
||||||
@@ -524,6 +530,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
createDisplayModel();
|
createDisplayModel();
|
||||||
updateDisplayModelVisibility();
|
updateDisplayModelVisibility();
|
||||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||||
|
RiuMainWindow::instance()->refreshAnimationActions();
|
||||||
}
|
}
|
||||||
else if (changedField == &showGridBox)
|
else if (changedField == &showGridBox)
|
||||||
{
|
{
|
||||||
@@ -533,6 +540,7 @@ void RimView::fieldChangedByUi(const caf::PdmFieldHandle* changedField, const QV
|
|||||||
{
|
{
|
||||||
createDisplayModel();
|
createDisplayModel();
|
||||||
RiuMainWindow::instance()->refreshDrawStyleActions();
|
RiuMainWindow::instance()->refreshDrawStyleActions();
|
||||||
|
RiuMainWindow::instance()->refreshAnimationActions();
|
||||||
}
|
}
|
||||||
else if (changedField == &name)
|
else if (changedField == &name)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ class Rim3dOverlayInfoConfig;
|
|||||||
class RimCase;
|
class RimCase;
|
||||||
class RimCellRangeFilter;
|
class RimCellRangeFilter;
|
||||||
class RimCellRangeFilterCollection;
|
class RimCellRangeFilterCollection;
|
||||||
class RiuViewer;
|
|
||||||
class RimViewLinker;
|
|
||||||
class RimViewController;
|
|
||||||
class RimPropertyFilterCollection;
|
|
||||||
class RimCrossSectionCollection;
|
class RimCrossSectionCollection;
|
||||||
|
class RimPropertyFilterCollection;
|
||||||
|
class RimViewController;
|
||||||
|
class RimViewLinker;
|
||||||
|
class RiuViewer;
|
||||||
|
|
||||||
namespace cvf
|
namespace cvf
|
||||||
{
|
{
|
||||||
@@ -194,6 +194,8 @@ protected:
|
|||||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_rangeFilterCollection;
|
caf::PdmChildField<RimCellRangeFilterCollection*> m_rangeFilterCollection;
|
||||||
caf::PdmChildField<RimCellRangeFilterCollection*> m_overrideRangeFilterCollection;
|
caf::PdmChildField<RimCellRangeFilterCollection*> m_overrideRangeFilterCollection;
|
||||||
|
|
||||||
|
caf::PdmChildField<caf::PdmObjectHandle*> m_gridCollection;
|
||||||
|
|
||||||
// Overridden PDM methods:
|
// Overridden PDM methods:
|
||||||
virtual void setupBeforeSave();
|
virtual void setupBeforeSave();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user