mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7716 Ensemble Well Logs: Add context menu for curve set.
This commit is contained in:
parent
4d780b4915
commit
d79dcafe5a
@ -27,6 +27,7 @@ ${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveDeleteFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurvePickEventHandler.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellBoreStabilityPlotFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.h
|
||||
)
|
||||
|
||||
set (SOURCE_GROUP_SOURCE_FILES
|
||||
@ -57,6 +58,7 @@ ${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurveDeleteFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Ric3dWellLogCurvePickEventHandler.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellBoreStabilityPlotFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewWellMeasurementCurveFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewEnsembleWellLogCurveSetFeature.cpp
|
||||
)
|
||||
|
||||
list(APPEND COMMAND_CODE_HEADER_FILES
|
||||
|
@ -0,0 +1,67 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2015- Statoil ASA
|
||||
// Copyright (C) 2015- 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 "RicNewEnsembleWellLogCurveSetFeature.h"
|
||||
|
||||
#include "RimEnsembleWellLogCurveSet.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
#include "RiuPlotMainWindow.h"
|
||||
#include "RiuPlotMainWindowTools.h"
|
||||
|
||||
#include "cafSelectionManager.h"
|
||||
|
||||
#include <QAction>
|
||||
|
||||
#include <vector>
|
||||
|
||||
CAF_CMD_SOURCE_INIT( RicNewEnsembleWellLogCurveSetFeature, "RicNewEnsembleWellLogCurveSetFeature" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewEnsembleWellLogCurveSetFeature::isCommandEnabled()
|
||||
{
|
||||
return caf::SelectionManager::instance()->selectedItemOfType<RimWellLogTrack>() != nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewEnsembleWellLogCurveSetFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
RimWellLogTrack* wellLogPlotTrack = caf::SelectionManager::instance()->selectedItemOfType<RimWellLogTrack>();
|
||||
if ( wellLogPlotTrack )
|
||||
{
|
||||
RimEnsembleWellLogCurveSet* curveSet = new RimEnsembleWellLogCurveSet();
|
||||
wellLogPlotTrack->setEnsembleWellLogCurveSet( curveSet );
|
||||
wellLogPlotTrack->updateEditors();
|
||||
RiuPlotMainWindowTools::selectAsCurrentItem( curveSet );
|
||||
}
|
||||
RiuPlotMainWindowTools::refreshToolbars();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewEnsembleWellLogCurveSetFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
actionToSetup->setText( "New Ensemble Well Log Curve Set" );
|
||||
actionToSetup->setIcon( QIcon( ":/EnsembleCurveSet16x16.png" ) );
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021- Eqinor 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 RicNewEnsembleWellLogCurveSetFeature : public caf::CmdFeature
|
||||
{
|
||||
CAF_CMD_HEADER_INIT;
|
||||
|
||||
private:
|
||||
bool isCommandEnabled() override;
|
||||
void onActionTriggered( bool isChecked ) override;
|
||||
void setupActionLook( QAction* actionToSetup ) override;
|
||||
};
|
@ -610,6 +610,7 @@ caf::CmdFeatureMenuBuilder RimContextCommandBuilder::commandsFromSelection()
|
||||
menuBuilder << "RicNewWellLogRftCurveFeature";
|
||||
menuBuilder << "RicNewWellLogFileCurveFeature";
|
||||
menuBuilder << "RicNewWellMeasurementCurveFeature";
|
||||
menuBuilder << "RicNewEnsembleWellLogCurveSetFeature";
|
||||
menuBuilder << "Separator";
|
||||
menuBuilder << "RicDeleteSubPlotFeature";
|
||||
}
|
||||
|
@ -276,7 +276,7 @@ RimWellLogTrack::RimWellLogTrack()
|
||||
"",
|
||||
"",
|
||||
"" );
|
||||
m_ensembleWellLogCurveSet = new RimEnsembleWellLogCurveSet;
|
||||
m_ensembleWellLogCurveSet.uiCapability()->setUiHidden( true );
|
||||
|
||||
m_formationsForCaseWithSimWellOnly = false;
|
||||
}
|
||||
@ -3099,3 +3099,11 @@ void RimWellLogTrack::setCurvesTreeVisibility( bool isVisible )
|
||||
{
|
||||
m_curves.uiCapability()->setUiTreeChildrenHidden( !isVisible );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellLogTrack::setEnsembleWellLogCurveSet( RimEnsembleWellLogCurveSet* curveSet )
|
||||
{
|
||||
m_ensembleWellLogCurveSet = curveSet;
|
||||
}
|
||||
|
@ -233,6 +233,8 @@ public:
|
||||
|
||||
void setCurvesTreeVisibility( bool isVisible );
|
||||
|
||||
void setEnsembleWellLogCurveSet( RimEnsembleWellLogCurveSet* curveSet );
|
||||
|
||||
protected:
|
||||
// RimViewWindow overrides
|
||||
void deleteViewWidget() override;
|
||||
|
Loading…
Reference in New Issue
Block a user