mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Add rename case to summary and grid cases (#9204)
* #9203 Summary Case : Add rename to right-click menu * Janitor: Move ID and description to private fields * Eclipse Case: Add rename to right-click menu * Rename feature
This commit is contained in:
parent
597a3d1f97
commit
c8f642d83a
@ -888,7 +888,7 @@ bool RiaApplication::openOdbCaseFromFile( const QString& fileName, bool applyTim
|
|||||||
|
|
||||||
auto geoMechCase = std::make_unique<RimGeoMechCase>();
|
auto geoMechCase = std::make_unique<RimGeoMechCase>();
|
||||||
geoMechCase->setGridFileName( fileName );
|
geoMechCase->setGridFileName( fileName );
|
||||||
geoMechCase->caseUserDescription = caseName;
|
geoMechCase->setCaseUserDescription( caseName );
|
||||||
geoMechCase->setApplyTimeFilter( applyTimeStepFilter );
|
geoMechCase->setApplyTimeFilter( applyTimeStepFilter );
|
||||||
m_project->assignCaseIdToCase( geoMechCase.get() );
|
m_project->assignCaseIdToCase( geoMechCase.get() );
|
||||||
|
|
||||||
|
@ -216,12 +216,12 @@ void RiaProjectModifier::replaceCase( RimProject* project )
|
|||||||
if ( eclipseResultCase )
|
if ( eclipseResultCase )
|
||||||
{
|
{
|
||||||
eclipseResultCase->setGridFileName( replaceFileName );
|
eclipseResultCase->setGridFileName( replaceFileName );
|
||||||
eclipseResultCase->caseUserDescription = caseNameFromGridFileName( replaceFileName );
|
eclipseResultCase->setCaseUserDescription( caseNameFromGridFileName( replaceFileName ) );
|
||||||
}
|
}
|
||||||
else if ( geomechCase )
|
else if ( geomechCase )
|
||||||
{
|
{
|
||||||
geomechCase->setGridFileName( replaceFileName );
|
geomechCase->setGridFileName( replaceFileName );
|
||||||
geomechCase->caseUserDescription = caseNameFromGridFileName( replaceFileName );
|
geomechCase->setCaseUserDescription( caseNameFromGridFileName( replaceFileName ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ caf::PdmScriptResponse RicfComputeCaseGroupStatistics::execute()
|
|||||||
{
|
{
|
||||||
for ( RimEclipseCase* c : group->statisticsCaseCollection->reservoirs )
|
for ( RimEclipseCase* c : group->statisticsCaseCollection->reservoirs )
|
||||||
{
|
{
|
||||||
if ( c->caseId == caseId )
|
if ( c->caseId() == caseId )
|
||||||
{
|
{
|
||||||
RimEclipseStatisticsCase* statsCase = dynamic_cast<RimEclipseStatisticsCase*>( c );
|
RimEclipseStatisticsCase* statsCase = dynamic_cast<RimEclipseStatisticsCase*>( c );
|
||||||
if ( statsCase )
|
if ( statsCase )
|
||||||
|
@ -83,7 +83,7 @@ caf::PdmScriptResponse RicfCreateSaturationPressurePlots::execute()
|
|||||||
|
|
||||||
for ( auto caseId : caseIds )
|
for ( auto caseId : caseIds )
|
||||||
{
|
{
|
||||||
if ( c->caseId == caseId )
|
if ( c->caseId() == caseId )
|
||||||
{
|
{
|
||||||
int timeStep = 0;
|
int timeStep = 0;
|
||||||
RicCreateSaturationPressurePlotsFeature::createPlots( eclipseResultCase, timeStep );
|
RicCreateSaturationPressurePlotsFeature::createPlots( eclipseResultCase, timeStep );
|
||||||
|
@ -48,7 +48,7 @@ caf::PdmScriptResponse RicfCreateView::execute()
|
|||||||
|
|
||||||
for ( RimCase* rimCase : allCases )
|
for ( RimCase* rimCase : allCases )
|
||||||
{
|
{
|
||||||
if ( rimCase->caseId == m_caseId() )
|
if ( rimCase->caseId() == m_caseId() )
|
||||||
{
|
{
|
||||||
int viewId = -1;
|
int viewId = -1;
|
||||||
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( rimCase );
|
RimEclipseCase* eclipseCase = dynamic_cast<RimEclipseCase*>( rimCase );
|
||||||
|
@ -78,7 +78,7 @@ caf::PdmScriptResponse RicfSetTimeStep::execute()
|
|||||||
bool foundCase = false;
|
bool foundCase = false;
|
||||||
for ( RimCase* c : allCases )
|
for ( RimCase* c : allCases )
|
||||||
{
|
{
|
||||||
if ( c->caseId == m_caseId )
|
if ( c->caseId() == m_caseId )
|
||||||
{
|
{
|
||||||
rimCase = c;
|
rimCase = c;
|
||||||
foundCase = true;
|
foundCase = true;
|
||||||
|
@ -85,6 +85,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicUserDefinedCalculatorUi.h
|
${CMAKE_CURRENT_LIST_DIR}/RicUserDefinedCalculatorUi.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicShowDataSourcesForRealization.h
|
${CMAKE_CURRENT_LIST_DIR}/RicShowDataSourcesForRealization.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteUncheckedSubItemsFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicDeleteUncheckedSubItemsFeature.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicRenameSummaryCaseFeature.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_GROUP_SOURCE_FILES
|
set(SOURCE_GROUP_SOURCE_FILES
|
||||||
@ -173,6 +174,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicUserDefinedCalculatorUi.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicUserDefinedCalculatorUi.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicShowDataSourcesForRealization.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicShowDataSourcesForRealization.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteUncheckedSubItemsFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicDeleteUncheckedSubItemsFeature.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicRenameSummaryCaseFeature.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
if(RESINSIGHT_USE_QT_CHARTS)
|
if(RESINSIGHT_USE_QT_CHARTS)
|
||||||
|
@ -18,6 +18,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipsePropertyFilterNewInViewFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipsePropertyFilterNewInViewFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipseHideFaultFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipseHideFaultFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipseShowOnlyFaultFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipseShowOnlyFaultFeature.h
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicRenameCaseFeature.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_GROUP_SOURCE_FILES
|
set(SOURCE_GROUP_SOURCE_FILES
|
||||||
@ -40,6 +41,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipsePropertyFilterNewInViewFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipsePropertyFilterNewInViewFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipseHideFaultFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipseHideFaultFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicEclipseShowOnlyFaultFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicEclipseShowOnlyFaultFeature.cpp
|
||||||
|
${CMAKE_CURRENT_LIST_DIR}/RicRenameCaseFeature.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||||
|
@ -0,0 +1,66 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 Equinor ASA
|
||||||
|
//
|
||||||
|
// 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 "RicRenameCaseFeature.h"
|
||||||
|
|
||||||
|
#include "RimCase.h"
|
||||||
|
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT( RicRenameCaseFeature, "RicRenameCaseFeature" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicRenameCaseFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicRenameCaseFeature::onActionTriggered( bool isChecked )
|
||||||
|
{
|
||||||
|
auto rimCase = caf::SelectionManager::instance()->selectedItemOfType<RimCase>();
|
||||||
|
if ( !rimCase ) return;
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
QString userDefinedName = QInputDialog::getText( nullptr,
|
||||||
|
"Rename Case",
|
||||||
|
"Enter new name:",
|
||||||
|
QLineEdit::Normal,
|
||||||
|
rimCase->caseUserDescription(),
|
||||||
|
&ok );
|
||||||
|
|
||||||
|
if ( !ok ) return;
|
||||||
|
|
||||||
|
rimCase->setCustomCaseName( userDefinedName.trimmed() );
|
||||||
|
rimCase->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicRenameCaseFeature::setupActionLook( QAction* actionToSetup )
|
||||||
|
{
|
||||||
|
actionToSetup->setText( "Rename" );
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 Equinor ASA
|
||||||
|
//
|
||||||
|
// 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 "cafCmdFeature.h"
|
||||||
|
|
||||||
|
class RicRenameCaseFeature : public caf::CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool isCommandEnabled() override;
|
||||||
|
void onActionTriggered( bool isChecked ) override;
|
||||||
|
void setupActionLook( QAction* actionToSetup ) override;
|
||||||
|
};
|
@ -96,7 +96,7 @@ void RicExecuteScriptForCasesFeature::onActionTriggered( bool isChecked )
|
|||||||
|
|
||||||
for ( RimCase* rimCase : selection )
|
for ( RimCase* rimCase : selection )
|
||||||
{
|
{
|
||||||
caseIdsInSelection.push_back( rimCase->caseId );
|
caseIdsInSelection.push_back( rimCase->caseId() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
66
ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp
Normal file
66
ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.cpp
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 Equinor ASA
|
||||||
|
//
|
||||||
|
// 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 "RicRenameSummaryCaseFeature.h"
|
||||||
|
|
||||||
|
#include "RimSummaryCase.h"
|
||||||
|
|
||||||
|
#include "cafSelectionManager.h"
|
||||||
|
|
||||||
|
#include <QAction>
|
||||||
|
#include <QInputDialog>
|
||||||
|
|
||||||
|
CAF_CMD_SOURCE_INIT( RicRenameSummaryCaseFeature, "RicRenameSummaryCaseFeature" );
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
bool RicRenameSummaryCaseFeature::isCommandEnabled()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicRenameSummaryCaseFeature::onActionTriggered( bool isChecked )
|
||||||
|
{
|
||||||
|
auto summaryCase = caf::SelectionManager::instance()->selectedItemOfType<RimSummaryCase>();
|
||||||
|
if ( !summaryCase ) return;
|
||||||
|
|
||||||
|
bool ok;
|
||||||
|
QString userDefinedName = QInputDialog::getText( nullptr,
|
||||||
|
"Rename Case",
|
||||||
|
"Enter new name:",
|
||||||
|
QLineEdit::Normal,
|
||||||
|
summaryCase->displayCaseName(),
|
||||||
|
&ok );
|
||||||
|
|
||||||
|
if ( !ok ) return;
|
||||||
|
|
||||||
|
summaryCase->setCustomCaseName( userDefinedName.trimmed() );
|
||||||
|
summaryCase->updateConnectedEditors();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RicRenameSummaryCaseFeature::setupActionLook( QAction* actionToSetup )
|
||||||
|
{
|
||||||
|
actionToSetup->setText( "Rename" );
|
||||||
|
}
|
31
ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h
Normal file
31
ApplicationLibCode/Commands/RicRenameSummaryCaseFeature.h
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//
|
||||||
|
// Copyright (C) 2022 Equinor ASA
|
||||||
|
//
|
||||||
|
// 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 "cafCmdFeature.h"
|
||||||
|
|
||||||
|
class RicRenameSummaryCaseFeature : public caf::CmdFeature
|
||||||
|
{
|
||||||
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool isCommandEnabled() override;
|
||||||
|
void onActionTriggered( bool isChecked ) override;
|
||||||
|
void setupActionLook( QAction* actionToSetup ) override;
|
||||||
|
};
|
@ -96,7 +96,7 @@ void RicReplaceCaseFeature::onActionTriggered( bool isChecked )
|
|||||||
|
|
||||||
// Use the file base name as case user description
|
// Use the file base name as case user description
|
||||||
QFileInfo fi( fileName );
|
QFileInfo fi( fileName );
|
||||||
selectedCase->caseUserDescription = fi.baseName();
|
selectedCase->setCaseUserDescription( fi.baseName() );
|
||||||
|
|
||||||
// Find and update attached grid summary cases.
|
// Find and update attached grid summary cases.
|
||||||
RimSummaryCaseMainCollection* sumCaseColl = RiaSummaryTools::summaryCaseMainCollection();
|
RimSummaryCaseMainCollection* sumCaseColl = RiaSummaryTools::summaryCaseMainCollection();
|
||||||
|
@ -28,7 +28,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewRftWellLogCurveFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewRftWellLogCurveFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewRftSegmentWellLogCurveFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewRftSegmentWellLogPlotFeature.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCE_GROUP_SOURCE_FILES
|
set(SOURCE_GROUP_SOURCE_FILES
|
||||||
@ -61,7 +61,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewRftWellLogCurveFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewRftWellLogCurveFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewRftSegmentWellLogCurveFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewRftSegmentWellLogPlotFeature.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
list(APPEND COMMAND_CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "RicNewRftSegmentWellLogCurveFeature.h"
|
#include "RicNewRftSegmentWellLogPlotFeature.h"
|
||||||
|
|
||||||
#include "RicNewWellLogPlotFeatureImpl.h"
|
#include "RicNewWellLogPlotFeatureImpl.h"
|
||||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||||
@ -43,12 +43,12 @@
|
|||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
CAF_CMD_SOURCE_INIT( RicNewRftSegmentWellLogCurveFeature, "RicNewRftSegmentWellLogCurveFeature" );
|
CAF_CMD_SOURCE_INIT( RicNewRftSegmentWellLogPlotFeature, "RicNewRftSegmentWellLogCurveFeature" );
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
bool RicNewRftSegmentWellLogCurveFeature::isCommandEnabled()
|
bool RicNewRftSegmentWellLogPlotFeature::isCommandEnabled()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -56,7 +56,7 @@ bool RicNewRftSegmentWellLogCurveFeature::isCommandEnabled()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewRftSegmentWellLogCurveFeature::onActionTriggered( bool isChecked )
|
void RicNewRftSegmentWellLogPlotFeature::onActionTriggered( bool isChecked )
|
||||||
{
|
{
|
||||||
auto rftCase = caf::SelectionManager::instance()->selectedItemOfType<RimRftCase>();
|
auto rftCase = caf::SelectionManager::instance()->selectedItemOfType<RimRftCase>();
|
||||||
if ( !rftCase ) return;
|
if ( !rftCase ) return;
|
||||||
@ -91,10 +91,10 @@ void RicNewRftSegmentWellLogCurveFeature::onActionTriggered( bool isChecked )
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewRftSegmentWellLogCurveFeature::appendTrackAndCurveForBranchType( RimWellLogPlot* plot,
|
void RicNewRftSegmentWellLogPlotFeature::appendTrackAndCurveForBranchType( RimWellLogPlot* plot,
|
||||||
const QString& resultName,
|
const QString& resultName,
|
||||||
RiaDefines::RftBranchType branchType,
|
RiaDefines::RftBranchType branchType,
|
||||||
RimSummaryCase* summaryCase )
|
RimSummaryCase* summaryCase )
|
||||||
{
|
{
|
||||||
RimWellLogTrack* plotTrack = new RimWellLogTrack();
|
RimWellLogTrack* plotTrack = new RimWellLogTrack();
|
||||||
plot->addPlot( plotTrack );
|
plot->addPlot( plotTrack );
|
||||||
@ -112,8 +112,8 @@ void RicNewRftSegmentWellLogCurveFeature::appendTrackAndCurveForBranchType( RimW
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RicNewRftSegmentWellLogCurveFeature::setupActionLook( QAction* actionToSetup )
|
void RicNewRftSegmentWellLogPlotFeature::setupActionLook( QAction* actionToSetup )
|
||||||
{
|
{
|
||||||
actionToSetup->setText( "Append RFT Segment Curve" );
|
actionToSetup->setText( "Create RFT Segment Plot" );
|
||||||
actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
|
actionToSetup->setIcon( QIcon( ":/WellLogCurve16x16.png" ) );
|
||||||
}
|
}
|
@ -28,7 +28,7 @@ class RimSummaryCase;
|
|||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
///
|
///
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
class RicNewRftSegmentWellLogCurveFeature : public caf::CmdFeature
|
class RicNewRftSegmentWellLogPlotFeature : public caf::CmdFeature
|
||||||
{
|
{
|
||||||
CAF_CMD_HEADER_INIT;
|
CAF_CMD_HEADER_INIT;
|
||||||
|
|
@ -296,7 +296,7 @@ RimGeoMechCase* RimGeoMechCase::createCopy( const QString& newInputFileName )
|
|||||||
QFileInfo filenameInfo( newInputFileName );
|
QFileInfo filenameInfo( newInputFileName );
|
||||||
QString newCaseName = filenameInfo.completeBaseName();
|
QString newCaseName = filenameInfo.completeBaseName();
|
||||||
|
|
||||||
copycase->caseUserDescription.setValue( newCaseName + " (copy of " + caseUserDescription.value() + ")" );
|
copycase->setCaseUserDescription( newCaseName + " (copy of " + caseUserDescription() + ")" );
|
||||||
copycase->setGridFileName( newInputFileName );
|
copycase->setGridFileName( newInputFileName );
|
||||||
|
|
||||||
project->assignCaseIdToCase( copycase );
|
project->assignCaseIdToCase( copycase );
|
||||||
@ -1099,8 +1099,8 @@ void RimGeoMechCase::importElementPropertyFile()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimGeoMechCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimGeoMechCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
uiOrdering.add( &caseUserDescription );
|
uiOrdering.add( &m_caseUserDescription );
|
||||||
uiOrdering.add( &caseId );
|
uiOrdering.add( &m_caseId );
|
||||||
uiOrdering.add( &m_caseFileName );
|
uiOrdering.add( &m_caseFileName );
|
||||||
|
|
||||||
caf::PdmUiGroup* caseGroup = uiOrdering.addNewGroup( "Case Options" );
|
caf::PdmUiGroup* caseGroup = uiOrdering.addNewGroup( "Case Options" );
|
||||||
|
@ -49,14 +49,14 @@ RimCase::RimCase()
|
|||||||
{
|
{
|
||||||
CAF_PDM_InitScriptableObjectWithNameAndComment( "Case", ":/Case48x48.png", "", "", "Case", "The ResInsight base class for Cases" );
|
CAF_PDM_InitScriptableObjectWithNameAndComment( "Case", ":/Case48x48.png", "", "", "Case", "The ResInsight base class for Cases" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableField( &caseUserDescription, "Name", QString(), "Case Name" );
|
CAF_PDM_InitScriptableField( &m_caseUserDescription, "Name", QString(), "Case Name" );
|
||||||
caseUserDescription.registerKeywordAlias( "CaseUserDescription" );
|
m_caseUserDescription.registerKeywordAlias( "CaseUserDescription" );
|
||||||
CAF_PDM_InitScriptableFieldNoDefault( &m_displayNameOption, "NameSetting", "Name Setting" );
|
CAF_PDM_InitScriptableFieldNoDefault( &m_displayNameOption, "NameSetting", "Name Setting" );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableField( &caseId, "Id", -1, "Case ID" );
|
CAF_PDM_InitScriptableField( &m_caseId, "Id", -1, "Case ID" );
|
||||||
caseId.registerKeywordAlias( "CaseId" );
|
m_caseId.registerKeywordAlias( "CaseId" );
|
||||||
caseId.uiCapability()->setUiReadOnly( true );
|
m_caseId.uiCapability()->setUiReadOnly( true );
|
||||||
caseId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
m_caseId.capability<caf::PdmAbstractFieldScriptingCapability>()->setIOWriteable( false );
|
||||||
|
|
||||||
CAF_PDM_InitScriptableFieldNoDefault( &m_caseFileName, "FilePath", "Case File Name" );
|
CAF_PDM_InitScriptableFieldNoDefault( &m_caseFileName, "FilePath", "Case File Name" );
|
||||||
m_caseFileName.registerKeywordAlias( "CaseFileName" );
|
m_caseFileName.registerKeywordAlias( "CaseFileName" );
|
||||||
@ -87,6 +87,38 @@ RimCase::~RimCase()
|
|||||||
m_isInActiveDestruction = true; // Needed because destruction of m_intersectionViews results in call to views()
|
m_isInActiveDestruction = true; // Needed because destruction of m_intersectionViews results in call to views()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
int RimCase::caseId() const
|
||||||
|
{
|
||||||
|
return m_caseId();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimCase::setCaseId( int id )
|
||||||
|
{
|
||||||
|
m_caseId = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
QString RimCase::caseUserDescription() const
|
||||||
|
{
|
||||||
|
return m_caseUserDescription();
|
||||||
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimCase::setCaseUserDescription( const QString& description )
|
||||||
|
{
|
||||||
|
m_caseUserDescription = description;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -106,6 +138,15 @@ QString RimCase::gridFileName() const
|
|||||||
return m_caseFileName().path();
|
return m_caseFileName().path();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimCase::setCustomCaseName( const QString& caseName )
|
||||||
|
{
|
||||||
|
m_displayNameOption = RimCaseDisplayNameTools::DisplayName::CUSTOM;
|
||||||
|
m_caseUserDescription = caseName;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -195,7 +236,7 @@ void RimCase::fieldChangedByUi( const caf::PdmFieldHandle* changedField, const Q
|
|||||||
{
|
{
|
||||||
updateAutoShortName();
|
updateAutoShortName();
|
||||||
}
|
}
|
||||||
else if ( changedField == &caseUserDescription )
|
else if ( changedField == &m_caseUserDescription )
|
||||||
{
|
{
|
||||||
updateTreeItemName();
|
updateTreeItemName();
|
||||||
}
|
}
|
||||||
@ -235,7 +276,8 @@ QList<caf::PdmOptionItemInfo> RimCase::calculateValueOptions( const caf::PdmFiel
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCase::updateOptionSensitivity()
|
void RimCase::updateOptionSensitivity()
|
||||||
{
|
{
|
||||||
caseUserDescription.uiCapability()->setUiReadOnly( m_displayNameOption != RimCaseDisplayNameTools::DisplayName::CUSTOM );
|
m_caseUserDescription.uiCapability()->setUiReadOnly( m_displayNameOption !=
|
||||||
|
RimCaseDisplayNameTools::DisplayName::CUSTOM );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -243,7 +285,7 @@ void RimCase::updateOptionSensitivity()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCase::initAfterRead()
|
void RimCase::initAfterRead()
|
||||||
{
|
{
|
||||||
if ( caseId() == -1 )
|
if ( m_caseId() == -1 )
|
||||||
{
|
{
|
||||||
RimProject::current()->assignCaseIdToCase( this );
|
RimProject::current()->assignCaseIdToCase( this );
|
||||||
}
|
}
|
||||||
@ -262,7 +304,7 @@ void RimCase::initAfterRead()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
caf::PdmFieldHandle* RimCase::userDescriptionField()
|
caf::PdmFieldHandle* RimCase::userDescriptionField()
|
||||||
{
|
{
|
||||||
return &caseUserDescription;
|
return &m_caseUserDescription;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -272,11 +314,11 @@ void RimCase::updateAutoShortName()
|
|||||||
{
|
{
|
||||||
if ( m_displayNameOption == RimCaseDisplayNameTools::DisplayName::FULL_CASE_NAME )
|
if ( m_displayNameOption == RimCaseDisplayNameTools::DisplayName::FULL_CASE_NAME )
|
||||||
{
|
{
|
||||||
caseUserDescription = caseName();
|
m_caseUserDescription = caseName();
|
||||||
}
|
}
|
||||||
else if ( m_displayNameOption == RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME )
|
else if ( m_displayNameOption == RimCaseDisplayNameTools::DisplayName::SHORT_CASE_NAME )
|
||||||
{
|
{
|
||||||
caseUserDescription = RimCase::uniqueShortNameCase( this, RimCaseDisplayNameTools::CASE_SHORT_NAME_LENGTH );
|
m_caseUserDescription = RimCase::uniqueShortNameCase( this, RimCaseDisplayNameTools::CASE_SHORT_NAME_LENGTH );
|
||||||
}
|
}
|
||||||
updateTreeItemName();
|
updateTreeItemName();
|
||||||
}
|
}
|
||||||
@ -286,7 +328,7 @@ void RimCase::updateAutoShortName()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimCase::updateTreeItemName()
|
void RimCase::updateTreeItemName()
|
||||||
{
|
{
|
||||||
setUiName( caseUserDescription() );
|
setUiName( m_caseUserDescription() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -54,13 +54,16 @@ public:
|
|||||||
RimCase();
|
RimCase();
|
||||||
~RimCase() override;
|
~RimCase() override;
|
||||||
|
|
||||||
caf::PdmField<int> caseId;
|
int caseId() const;
|
||||||
caf::PdmField<QString> caseUserDescription;
|
void setCaseId( int id );
|
||||||
|
|
||||||
|
QString caseUserDescription() const;
|
||||||
|
void setCaseUserDescription( const QString& description );
|
||||||
|
|
||||||
void setGridFileName( const QString& fileName );
|
void setGridFileName( const QString& fileName );
|
||||||
QString gridFileName() const;
|
QString gridFileName() const;
|
||||||
|
|
||||||
void setDisplayNameOption( RimCaseDisplayNameTools::DisplayName displayNameOption );
|
void setCustomCaseName( const QString& caseName );
|
||||||
void updateAutoShortName();
|
void updateAutoShortName();
|
||||||
void updateOptionSensitivity();
|
void updateOptionSensitivity();
|
||||||
|
|
||||||
@ -105,6 +108,8 @@ private:
|
|||||||
caf::PdmFieldHandle* userDescriptionField() override;
|
caf::PdmFieldHandle* userDescriptionField() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
caf::PdmField<int> m_caseId;
|
||||||
|
caf::PdmField<QString> m_caseUserDescription;
|
||||||
caf::PdmField<caf::FilePath> m_caseFileName;
|
caf::PdmField<caf::FilePath> m_caseFileName;
|
||||||
caf::PdmField<DisplayNameEnum> m_displayNameOption;
|
caf::PdmField<DisplayNameEnum> m_displayNameOption;
|
||||||
caf::PdmChildField<RimTimeStepFilter*> m_timeStepFilter;
|
caf::PdmChildField<RimTimeStepFilter*> m_timeStepFilter;
|
||||||
|
@ -268,6 +268,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
}
|
}
|
||||||
else if ( dynamic_cast<RimEclipseCase*>( firstUiItem ) )
|
else if ( dynamic_cast<RimEclipseCase*>( firstUiItem ) )
|
||||||
{
|
{
|
||||||
|
menuBuilder << "RicRenameCaseFeature";
|
||||||
menuBuilder << "RicPasteEclipseCasesFeature";
|
menuBuilder << "RicPasteEclipseCasesFeature";
|
||||||
menuBuilder << "RicPasteEclipseViewsFeature";
|
menuBuilder << "RicPasteEclipseViewsFeature";
|
||||||
menuBuilder << "Separator";
|
menuBuilder << "Separator";
|
||||||
@ -1074,7 +1075,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
else if ( dynamic_cast<RimRftCase*>( firstUiItem ) )
|
else if ( dynamic_cast<RimRftCase*>( firstUiItem ) )
|
||||||
{
|
{
|
||||||
menuBuilder << "RicNewRftWellLogCurveFeature";
|
menuBuilder << "RicNewRftWellLogCurveFeature";
|
||||||
menuBuilder << "RicNewRftSegmentWellLogCurveFeature";
|
menuBuilder << "RicNewRftSegmentWellLogPlotFeature";
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( dynamic_cast<Rim3dView*>( firstUiItem ) )
|
if ( dynamic_cast<Rim3dView*>( firstUiItem ) )
|
||||||
@ -1124,6 +1125,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
|||||||
|
|
||||||
menuBuilder << "RicImportObservedDataFeature";
|
menuBuilder << "RicImportObservedDataFeature";
|
||||||
menuBuilder << "RicImportObservedFmuDataFeature";
|
menuBuilder << "RicImportObservedFmuDataFeature";
|
||||||
|
menuBuilder << "RicRenameSummaryCaseFeature";
|
||||||
menuBuilder << "RicReloadSummaryCaseFeature";
|
menuBuilder << "RicReloadSummaryCaseFeature";
|
||||||
menuBuilder << "RicReplaceSummaryCaseFeature";
|
menuBuilder << "RicReplaceSummaryCaseFeature";
|
||||||
menuBuilder << "RicCreateSummaryCaseCollectionFeature";
|
menuBuilder << "RicCreateSummaryCaseCollectionFeature";
|
||||||
|
@ -266,7 +266,7 @@ QString RimContourMapProjection::caseName() const
|
|||||||
return QString();
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
return rimCase->caseUserDescription.value();
|
return rimCase->caseUserDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -94,8 +94,8 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
|
|||||||
eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDerivedData();
|
eclipseCaseData()->activeCellInfo( RiaDefines::PorosityModelType::FRACTURE_MODEL )->computeDerivedData();
|
||||||
|
|
||||||
QFileInfo gridFileName( fileNames[0] );
|
QFileInfo gridFileName( fileNames[0] );
|
||||||
QString caseName = gridFileName.completeBaseName();
|
QString caseName = gridFileName.completeBaseName();
|
||||||
this->caseUserDescription = caseName;
|
this->setCaseUserDescription( caseName );
|
||||||
|
|
||||||
computeCachedData();
|
computeCachedData();
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ bool RimEclipseInputCase::openDataFileSet( const QStringList& fileNames )
|
|||||||
QFileInfo gridFileName( fileNames[i] );
|
QFileInfo gridFileName( fileNames[i] );
|
||||||
QString caseName = gridFileName.completeBaseName();
|
QString caseName = gridFileName.completeBaseName();
|
||||||
|
|
||||||
this->caseUserDescription = caseName;
|
this->setCaseUserDescription( caseName );
|
||||||
|
|
||||||
this->eclipseCaseData()->mainGrid()->setFlipAxis( m_flipXAxis, m_flipYAxis );
|
this->eclipseCaseData()->mainGrid()->setFlipAxis( m_flipXAxis, m_flipYAxis );
|
||||||
|
|
||||||
@ -299,9 +299,9 @@ cvf::ref<RifReaderInterface> RimEclipseInputCase::createMockModel( QString model
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseInputCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimEclipseInputCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
uiOrdering.add( &caseUserDescription );
|
uiOrdering.add( &m_caseUserDescription );
|
||||||
uiOrdering.add( &m_displayNameOption );
|
uiOrdering.add( &m_displayNameOption );
|
||||||
uiOrdering.add( &caseId );
|
uiOrdering.add( &m_caseId );
|
||||||
uiOrdering.add( &m_caseFileName );
|
uiOrdering.add( &m_caseFileName );
|
||||||
uiOrdering.add( &m_additionalFiles );
|
uiOrdering.add( &m_additionalFiles );
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ RifReaderRftInterface* RimEclipseResultCase::rftReader()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseResultCase::setCaseInfo( const QString& userDescription, const QString& fileName )
|
void RimEclipseResultCase::setCaseInfo( const QString& userDescription, const QString& fileName )
|
||||||
{
|
{
|
||||||
this->caseUserDescription = userDescription;
|
this->setCaseUserDescription( userDescription );
|
||||||
setGridFileName( fileName );
|
setGridFileName( fileName );
|
||||||
|
|
||||||
RimProject* proj = RimProject::current();
|
RimProject* proj = RimProject::current();
|
||||||
@ -590,9 +590,9 @@ bool RimEclipseResultCase::hasSourSimFile()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimEclipseResultCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimEclipseResultCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
uiOrdering.add( &caseUserDescription );
|
uiOrdering.add( &m_caseUserDescription );
|
||||||
uiOrdering.add( &m_displayNameOption );
|
uiOrdering.add( &m_displayNameOption );
|
||||||
uiOrdering.add( &caseId );
|
uiOrdering.add( &m_caseId );
|
||||||
uiOrdering.add( &m_caseFileName );
|
uiOrdering.add( &m_caseFileName );
|
||||||
uiOrdering.add( &m_unitSystem );
|
uiOrdering.add( &m_unitSystem );
|
||||||
|
|
||||||
|
@ -387,8 +387,8 @@ void RimEclipseStatisticsCase::defineUiOrdering( QString uiConfigName, caf::PdmU
|
|||||||
updateSelectionListVisibilities();
|
updateSelectionListVisibilities();
|
||||||
updatePercentileUiVisibility();
|
updatePercentileUiVisibility();
|
||||||
|
|
||||||
uiOrdering.add( &caseUserDescription );
|
uiOrdering.add( &m_caseUserDescription );
|
||||||
uiOrdering.add( &caseId );
|
uiOrdering.add( &m_caseId );
|
||||||
|
|
||||||
uiOrdering.add( &m_calculateEditCommand );
|
uiOrdering.add( &m_calculateEditCommand );
|
||||||
|
|
||||||
|
@ -358,8 +358,8 @@ RimEclipseStatisticsCase* RimIdenticalGridCaseGroup::createAndAppendStatisticsCa
|
|||||||
{
|
{
|
||||||
RimEclipseStatisticsCase* newStatisticsCase = new RimEclipseStatisticsCase;
|
RimEclipseStatisticsCase* newStatisticsCase = new RimEclipseStatisticsCase;
|
||||||
|
|
||||||
newStatisticsCase->caseUserDescription = QString( "Statistics " ) +
|
newStatisticsCase->setCaseUserDescription( QString( "Statistics " ) +
|
||||||
QString::number( statisticsCaseCollection()->reservoirs.size() + 1 );
|
QString::number( statisticsCaseCollection()->reservoirs.size() + 1 ) );
|
||||||
statisticsCaseCollection()->reservoirs.push_back( newStatisticsCase );
|
statisticsCaseCollection()->reservoirs.push_back( newStatisticsCase );
|
||||||
|
|
||||||
newStatisticsCase->populateResultSelectionAfterLoadingGrid();
|
newStatisticsCase->populateResultSelectionAfterLoadingGrid();
|
||||||
|
@ -549,7 +549,7 @@ void RimProject::assignCaseIdToCase( RimCase* reservoirCase )
|
|||||||
m_nextValidCaseId = std::max( m_nextValidCaseId, rimCase->caseId() + 1 );
|
m_nextValidCaseId = std::max( m_nextValidCaseId, rimCase->caseId() + 1 );
|
||||||
}
|
}
|
||||||
|
|
||||||
reservoirCase->caseId = m_nextValidCaseId++;
|
reservoirCase->setCaseId( m_nextValidCaseId++ );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -252,6 +252,8 @@ void RimSummaryCase::buildChildNodes()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
void RimSummaryCase::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
|
updateOptionSensitivity();
|
||||||
|
|
||||||
uiOrdering.add( &m_displayName );
|
uiOrdering.add( &m_displayName );
|
||||||
uiOrdering.add( &m_displayNameOption );
|
uiOrdering.add( &m_displayNameOption );
|
||||||
uiOrdering.add( &m_summaryHeaderFilename );
|
uiOrdering.add( &m_summaryHeaderFilename );
|
||||||
@ -380,6 +382,15 @@ int RimSummaryCase::caseId() const
|
|||||||
return m_caseId();
|
return m_caseId();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryCase::setCustomCaseName( const QString& caseName )
|
||||||
|
{
|
||||||
|
m_displayNameOption = RimCaseDisplayNameTools::DisplayName::CUSTOM;
|
||||||
|
m_displayName = caseName;
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -60,6 +60,8 @@ public:
|
|||||||
void setCaseId( int caseId );
|
void setCaseId( int caseId );
|
||||||
int caseId() const;
|
int caseId() const;
|
||||||
|
|
||||||
|
void setCustomCaseName( const QString& caseName );
|
||||||
|
|
||||||
caf::AppEnum<RiaDefines::EclipseUnitSystem> unitsSystem();
|
caf::AppEnum<RiaDefines::EclipseUnitSystem> unitsSystem();
|
||||||
|
|
||||||
void setDisplayNameOption( RimCaseDisplayNameTools::DisplayName displayNameOption );
|
void setDisplayNameOption( RimCaseDisplayNameTools::DisplayName displayNameOption );
|
||||||
|
@ -632,7 +632,7 @@ public:
|
|||||||
->ijkFromCellIndex( eclipseItem->m_gridLocalCellIndex, &i, &j, &k );
|
->ijkFromCellIndex( eclipseItem->m_gridLocalCellIndex, &i, &j, &k );
|
||||||
|
|
||||||
gridIndex = eclipseItem->m_gridIndex;
|
gridIndex = eclipseItem->m_gridIndex;
|
||||||
caseId = eclipseItem->m_resultDefinition->eclipseCase()->caseId;
|
caseId = eclipseItem->m_resultDefinition->eclipseCase()->caseId();
|
||||||
}
|
}
|
||||||
else if ( item->type() == RiuSelectionItem::GEOMECH_SELECTION_OBJECT )
|
else if ( item->type() == RiuSelectionItem::GEOMECH_SELECTION_OBJECT )
|
||||||
{
|
{
|
||||||
@ -647,14 +647,14 @@ public:
|
|||||||
CVF_ASSERT( validIndex );
|
CVF_ASSERT( validIndex );
|
||||||
|
|
||||||
gridIndex = geomechItem->m_gridIndex;
|
gridIndex = geomechItem->m_gridIndex;
|
||||||
caseId = geomechItem->m_resultDefinition->geoMechCase()->caseId;
|
caseId = geomechItem->m_resultDefinition->geoMechCase()->caseId();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( caseId == reservoirCase->caseId && validIndex )
|
if ( caseId == reservoirCase->caseId() && validIndex )
|
||||||
{
|
{
|
||||||
caseNumber.push_back( static_cast<int>( caseId ) );
|
caseNumber.push_back( static_cast<int>( caseId ) );
|
||||||
gridNumber.push_back( static_cast<int>( gridIndex ) );
|
gridNumber.push_back( static_cast<int>( gridIndex ) );
|
||||||
|
@ -62,8 +62,8 @@ void getCaseInfoFromCases( std::vector<RimCase*>& cases,
|
|||||||
qint64 caseGroupId = -1;
|
qint64 caseGroupId = -1;
|
||||||
RiaSocketTools::getCaseInfoFromCase( rimCase, caseId, caseName, caseType, caseGroupId );
|
RiaSocketTools::getCaseInfoFromCase( rimCase, caseId, caseName, caseType, caseGroupId );
|
||||||
|
|
||||||
caseIds.push_back( rimCase->caseId );
|
caseIds.push_back( rimCase->caseId() );
|
||||||
caseNames.push_back( rimCase->caseUserDescription );
|
caseNames.push_back( rimCase->caseUserDescription() );
|
||||||
caseTypes.push_back( caseType );
|
caseTypes.push_back( caseType );
|
||||||
caseGroupIds.push_back( caseGroupId );
|
caseGroupIds.push_back( caseGroupId );
|
||||||
}
|
}
|
||||||
|
@ -1343,7 +1343,7 @@ public:
|
|||||||
{
|
{
|
||||||
const RiuEclipseSelectionItem* eclipseItem = static_cast<const RiuEclipseSelectionItem*>( item );
|
const RiuEclipseSelectionItem* eclipseItem = static_cast<const RiuEclipseSelectionItem*>( item );
|
||||||
|
|
||||||
if ( eclipseItem->m_resultDefinition->eclipseCase()->caseId == reservoirCase->caseId )
|
if ( eclipseItem->m_resultDefinition->eclipseCase()->caseId() == reservoirCase->caseId() )
|
||||||
{
|
{
|
||||||
selectedCells.push_back( std::make_pair( eclipseItem->m_gridIndex, eclipseItem->m_gridLocalCellIndex ) );
|
selectedCells.push_back( std::make_pair( eclipseItem->m_gridIndex, eclipseItem->m_gridLocalCellIndex ) );
|
||||||
}
|
}
|
||||||
@ -1352,7 +1352,7 @@ public:
|
|||||||
{
|
{
|
||||||
const RiuGeoMechSelectionItem* geomechItem = static_cast<const RiuGeoMechSelectionItem*>( item );
|
const RiuGeoMechSelectionItem* geomechItem = static_cast<const RiuGeoMechSelectionItem*>( item );
|
||||||
|
|
||||||
if ( geomechItem->m_resultDefinition->geoMechCase()->caseId == reservoirCase->caseId )
|
if ( geomechItem->m_resultDefinition->geoMechCase()->caseId() == reservoirCase->caseId() )
|
||||||
{
|
{
|
||||||
selectedCells.push_back( std::make_pair( geomechItem->m_gridIndex, geomechItem->m_cellIndex ) );
|
selectedCells.push_back( std::make_pair( geomechItem->m_gridIndex, geomechItem->m_cellIndex ) );
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ RimEclipseCase* RiaSocketServer::findReservoir( int caseId )
|
|||||||
|
|
||||||
for ( size_t i = 0; i < cases.size(); i++ )
|
for ( size_t i = 0; i < cases.size(); i++ )
|
||||||
{
|
{
|
||||||
if ( cases[i]->caseId == currCaseId )
|
if ( cases[i]->caseId() == currCaseId )
|
||||||
{
|
{
|
||||||
return dynamic_cast<RimEclipseCase*>( cases[i] );
|
return dynamic_cast<RimEclipseCase*>( cases[i] );
|
||||||
}
|
}
|
||||||
|
@ -72,8 +72,8 @@ void RiaSocketTools::getCaseInfoFromCase( RimCase* rimCase, qint64& caseId, QStr
|
|||||||
{
|
{
|
||||||
CVF_ASSERT( rimCase );
|
CVF_ASSERT( rimCase );
|
||||||
|
|
||||||
caseId = rimCase->caseId;
|
caseId = rimCase->caseId();
|
||||||
caseName = rimCase->caseUserDescription;
|
caseName = rimCase->caseUserDescription();
|
||||||
|
|
||||||
RimEclipseCase* eclCase = dynamic_cast<RimEclipseCase*>( rimCase );
|
RimEclipseCase* eclCase = dynamic_cast<RimEclipseCase*>( rimCase );
|
||||||
RimCaseCollection* caseCollection = nullptr;
|
RimCaseCollection* caseCollection = nullptr;
|
||||||
|
@ -208,7 +208,7 @@ bool RiuRelativePermeabilityPlotUpdater::queryDataAndUpdatePlot( const RimEclips
|
|||||||
|
|
||||||
QString cellRefText =
|
QString cellRefText =
|
||||||
constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM );
|
constructCellReferenceText( eclipseCaseData, gridIndex, gridLocalCellIndex, "SATNUM", cellSATNUM );
|
||||||
QString caseName = eclipseResultCase->caseUserDescription;
|
QString caseName = eclipseResultCase->caseUserDescription();
|
||||||
|
|
||||||
plotPanel->setPlotData( eclipseCaseData->unitsType(), relPermCurveArr, cellSWAT, cellSGAS, caseName, cellRefText );
|
plotPanel->setPlotData( eclipseCaseData->unitsType(), relPermCurveArr, cellSWAT, cellSGAS, caseName, cellRefText );
|
||||||
|
|
||||||
|
@ -93,9 +93,9 @@ void RiuResultQwtPlot::addCurve( const RimCase* rimCase,
|
|||||||
|
|
||||||
this->replot();
|
this->replot();
|
||||||
|
|
||||||
int caseId = rimCase->caseId;
|
int caseId = rimCase->caseId();
|
||||||
|
|
||||||
m_caseNames[caseId] = rimCase->caseUserDescription;
|
m_caseNames[caseId] = rimCase->caseUserDescription();
|
||||||
m_curveNames[caseId].push_back( curveName );
|
m_curveNames[caseId].push_back( curveName );
|
||||||
m_curveData[caseId].push_back( timeHistoryValues );
|
m_curveData[caseId].push_back( timeHistoryValues );
|
||||||
m_timeSteps[caseId] = dateTimes;
|
m_timeSteps[caseId] = dateTimes;
|
||||||
|
@ -618,7 +618,7 @@ grpc::Status RiaSelectedCellsStateHandler::assignReply( rips::SelectedCells* rep
|
|||||||
for ( auto item : items )
|
for ( auto item : items )
|
||||||
{
|
{
|
||||||
RiuEclipseSelectionItem* eclipseItem = dynamic_cast<RiuEclipseSelectionItem*>( item );
|
RiuEclipseSelectionItem* eclipseItem = dynamic_cast<RiuEclipseSelectionItem*>( item );
|
||||||
if ( eclipseItem && eclipseItem->m_resultDefinition->eclipseCase()->caseId == m_request->id() )
|
if ( eclipseItem && eclipseItem->m_resultDefinition->eclipseCase()->caseId() == m_request->id() )
|
||||||
{
|
{
|
||||||
eclipseItems.push_back( eclipseItem );
|
eclipseItems.push_back( eclipseItem );
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ protected:
|
|||||||
for ( auto item : items )
|
for ( auto item : items )
|
||||||
{
|
{
|
||||||
RiuEclipseSelectionItem* eclipseItem = dynamic_cast<RiuEclipseSelectionItem*>( item );
|
RiuEclipseSelectionItem* eclipseItem = dynamic_cast<RiuEclipseSelectionItem*>( item );
|
||||||
if ( eclipseItem && eclipseItem->m_resultDefinition->eclipseCase()->caseId == caseData->ownerCase()->caseId )
|
if ( eclipseItem && eclipseItem->m_resultDefinition->eclipseCase()->caseId() == caseData->ownerCase()->caseId() )
|
||||||
{
|
{
|
||||||
eclipseItems.push_back( eclipseItem );
|
eclipseItems.push_back( eclipseItem );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user