mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Rename GridPlot to MultiPlot throughout
This commit is contained in:
@@ -85,7 +85,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicCreateTemporaryLgrFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteTemporaryLgrsFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportContourMapToTextFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportContourMapToTextUi.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewGridPlotWindowFeature.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewMultiPlotFeature.h
|
||||
)
|
||||
|
||||
|
||||
@@ -169,7 +169,7 @@ ${CMAKE_CURRENT_LIST_DIR}/RicCreateTemporaryLgrFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicDeleteTemporaryLgrsFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportContourMapToTextFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicExportContourMapToTextUi.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewGridPlotWindowFeature.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RicNewMultiPlotFeature.cpp
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -39,11 +39,11 @@
|
||||
#include "RimGeoMechView.h"
|
||||
#include "RimGridCrossPlot.h"
|
||||
#include "RimGridCrossPlotDataSet.h"
|
||||
#include "RimGridPlotWindow.h"
|
||||
#include "RimGridTimeHistoryCurve.h"
|
||||
#include "RimIdenticalGridCaseGroup.h"
|
||||
#include "RimIntersection.h"
|
||||
#include "RimIntersectionBox.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimPerforationInterval.h"
|
||||
#include "RimPolylinesAnnotation.h"
|
||||
#include "RimReachCircleAnnotation.h"
|
||||
@@ -110,7 +110,7 @@ bool isDeletable( caf::PdmUiItem* uiItem )
|
||||
if ( dynamic_cast<RimWellLogCurve*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimSummaryPlot*>( uiItem ) )
|
||||
{
|
||||
RimGridPlotWindow* plotWindow = nullptr;
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
static_cast<RimSummaryPlot*>( uiItem )->firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ bool isDeletable( caf::PdmUiItem* uiItem )
|
||||
if ( dynamic_cast<RimPolylinesAnnotation*>( uiItem ) ) return true;
|
||||
if ( dynamic_cast<RimGridCrossPlot*>( uiItem ) )
|
||||
{
|
||||
RimGridPlotWindow* plotWindow = nullptr;
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
static_cast<RimGridCrossPlot*>( uiItem )->firstAncestorOrThisOfType( plotWindow );
|
||||
return plotWindow == nullptr;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RicNewGridPlotWindowFeature.h"
|
||||
#include "RicNewMultiPlotFeature.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimGridPlotWindow.h"
|
||||
#include "RimGridPlotWindowCollection.h"
|
||||
#include "RimMainPlotCollection.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimMultiPlotCollection.h"
|
||||
#include "RimPlotInterface.h"
|
||||
#include "RimProject.h"
|
||||
|
||||
@@ -34,12 +34,12 @@
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
RICF_SOURCE_INIT( RicNewGridPlotWindowFeature, "RicNewGridPlotWindowFeature", "createMultiPlot" );
|
||||
RICF_SOURCE_INIT( RicNewMultiPlotFeature, "RicNewMultiPlotFeature", "createMultiPlot" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicNewGridPlotWindowFeature::RicNewGridPlotWindowFeature()
|
||||
RicNewMultiPlotFeature::RicNewMultiPlotFeature()
|
||||
{
|
||||
CAF_PDM_InitObject( "Create Multi Plot", "", "", "" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_plots, "plots", "Plots", "", "", "" );
|
||||
@@ -48,15 +48,15 @@ RicNewGridPlotWindowFeature::RicNewGridPlotWindowFeature()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RicfCommandResponse RicNewGridPlotWindowFeature::execute()
|
||||
RicfCommandResponse RicNewMultiPlotFeature::execute()
|
||||
{
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimGridPlotWindowCollection* plotCollection = project->mainPlotCollection()->multiPlotCollection();
|
||||
RimProject* project = RiaApplication::instance()->project();
|
||||
RimMultiPlotCollection* plotCollection = project->mainPlotCollection()->multiPlotCollection();
|
||||
|
||||
RimGridPlotWindow* plotWindow = new RimGridPlotWindow;
|
||||
plotWindow->setMultiPlotTitle( QString( "Multi Plot %1" ).arg( plotCollection->gridPlotWindows().size() + 1 ) );
|
||||
RimMultiPlot* plotWindow = new RimMultiPlot;
|
||||
plotWindow->setMultiPlotTitle( QString( "Multi Plot %1" ).arg( plotCollection->multiPlots().size() + 1 ) );
|
||||
plotWindow->setAsPlotMdiWindow();
|
||||
plotCollection->addGridPlotWindow( plotWindow );
|
||||
plotCollection->addMultiPlot( plotWindow );
|
||||
|
||||
if ( !m_plots().empty() )
|
||||
{
|
||||
@@ -80,11 +80,11 @@ RicfCommandResponse RicNewGridPlotWindowFeature::execute()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RicNewGridPlotWindowFeature::isCommandEnabled()
|
||||
bool RicNewMultiPlotFeature::isCommandEnabled()
|
||||
{
|
||||
RimGridPlotWindowCollection* gridPlotCollection =
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimGridPlotWindowCollection>();
|
||||
if ( gridPlotCollection )
|
||||
RimMultiPlotCollection* multiPlotCollection =
|
||||
caf::SelectionManager::instance()->selectedItemOfType<RimMultiPlotCollection>();
|
||||
if ( multiPlotCollection )
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ bool RicNewGridPlotWindowFeature::isCommandEnabled()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewGridPlotWindowFeature::onActionTriggered( bool isChecked )
|
||||
void RicNewMultiPlotFeature::onActionTriggered( bool isChecked )
|
||||
{
|
||||
m_plots.v().clear();
|
||||
auto selectedPlots = selectedPlotInterfaces();
|
||||
@@ -114,7 +114,7 @@ void RicNewGridPlotWindowFeature::onActionTriggered( bool isChecked )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RicNewGridPlotWindowFeature::setupActionLook( QAction* actionToSetup )
|
||||
void RicNewMultiPlotFeature::setupActionLook( QAction* actionToSetup )
|
||||
{
|
||||
if ( selectedPlotInterfaces().empty() )
|
||||
{
|
||||
@@ -131,7 +131,7 @@ void RicNewGridPlotWindowFeature::setupActionLook( QAction* actionToSetup )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::vector<RimPlotInterface*> RicNewGridPlotWindowFeature::selectedPlotInterfaces()
|
||||
std::vector<RimPlotInterface*> RicNewMultiPlotFeature::selectedPlotInterfaces()
|
||||
{
|
||||
std::vector<caf::PdmUiItem*> uiItems;
|
||||
caf::SelectionManager::instance()->selectedItems( uiItems );
|
||||
@@ -30,12 +30,12 @@ class RimPlotInterface;
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RicNewGridPlotWindowFeature : public caf::CmdFeature, public RicfCommandObject
|
||||
class RicNewMultiPlotFeature : public caf::CmdFeature, public RicfCommandObject
|
||||
{
|
||||
RICF_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RicNewGridPlotWindowFeature();
|
||||
RicNewMultiPlotFeature();
|
||||
|
||||
virtual RicfCommandResponse execute() override;
|
||||
|
||||
@@ -21,11 +21,11 @@
|
||||
#include "RicWellLogPlotCurveFeatureImpl.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiuGridPlotWindow.h"
|
||||
#include "RiuMultiPlotWindow.h"
|
||||
#include "RiuPlotMainWindow.h"
|
||||
#include "RiuQwtPlotWidget.h"
|
||||
|
||||
#include "RimGridPlotWindow.h"
|
||||
#include "RimMultiPlot.h"
|
||||
#include "RimPlotInterface.h"
|
||||
#include "RimWellLogTrack.h"
|
||||
|
||||
@@ -50,9 +50,9 @@ bool RicDeleteSubPlotFeature::isCommandEnabled()
|
||||
size_t plotsSelected = 0;
|
||||
for ( caf::PdmObject* object : selection )
|
||||
{
|
||||
RimGridPlotWindow* gridPlotWindow = nullptr;
|
||||
object->firstAncestorOrThisOfType( gridPlotWindow );
|
||||
if ( dynamic_cast<RimPlotInterface*>( object ) && gridPlotWindow )
|
||||
RimMultiPlot* multiPlot = nullptr;
|
||||
object->firstAncestorOrThisOfType( multiPlot );
|
||||
if ( dynamic_cast<RimPlotInterface*>( object ) && multiPlot )
|
||||
{
|
||||
plotsSelected++;
|
||||
}
|
||||
@@ -72,13 +72,13 @@ void RicDeleteSubPlotFeature::onActionTriggered( bool isChecked )
|
||||
|
||||
std::vector<caf::PdmObject*> selection;
|
||||
caf::SelectionManager::instance()->objectsByType( &selection );
|
||||
std::set<RimGridPlotWindow*> alteredPlotWindows;
|
||||
std::set<RimMultiPlot*> alteredPlotWindows;
|
||||
|
||||
for ( size_t i = 0; i < selection.size(); i++ )
|
||||
{
|
||||
RimPlotInterface* plot = dynamic_cast<RimPlotInterface*>( selection[i] );
|
||||
|
||||
RimGridPlotWindow* plotWindow = nullptr;
|
||||
RimMultiPlot* plotWindow = nullptr;
|
||||
selection[i]->firstAncestorOrThisOfType( plotWindow );
|
||||
if ( plot && plotWindow )
|
||||
{
|
||||
@@ -91,7 +91,7 @@ void RicDeleteSubPlotFeature::onActionTriggered( bool isChecked )
|
||||
}
|
||||
}
|
||||
|
||||
for ( RimGridPlotWindow* plotWindow : alteredPlotWindows )
|
||||
for ( RimMultiPlot* plotWindow : alteredPlotWindows )
|
||||
{
|
||||
plotWindow->uiCapability()->updateConnectedEditors();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user