Well Log Plot and Well Distribution Plots no longer inherit Multiplot

* Also cleaned up RiuQwtPlotWidget
This commit is contained in:
Gaute Lindkvist
2020-01-16 12:32:40 +01:00
parent 2044b99818
commit edc276db4d
70 changed files with 1568 additions and 1215 deletions

View File

@@ -65,7 +65,7 @@ void RicAsciiExportWellLogPlotFeature::onActionTriggered( bool isChecked )
{
RimWellLogPlot* wellLogPlot = selectedWellLogPlots.at( 0 );
QString defaultFileName = defaultDir + "/" +
caf::Utils::makeValidFileBasename( ( wellLogPlot->multiPlotTitle() ) ) + ".ascii";
caf::Utils::makeValidFileBasename( ( wellLogPlot->description() ) ) + ".ascii";
QString fileName = QFileDialog::getSaveFileName( nullptr,
"Select File for Plot Data Export",
defaultFileName,
@@ -81,7 +81,7 @@ void RicAsciiExportWellLogPlotFeature::onActionTriggered( bool isChecked )
std::vector<QString> fileNames;
for ( RimWellLogPlot* wellLogPlot : selectedWellLogPlots )
{
QString fileName = caf::Utils::makeValidFileBasename( wellLogPlot->multiPlotTitle() ) + ".ascii";
QString fileName = caf::Utils::makeValidFileBasename( wellLogPlot->description() ) + ".ascii";
fileNames.push_back( fileName );
}
@@ -92,8 +92,7 @@ void RicAsciiExportWellLogPlotFeature::onActionTriggered( bool isChecked )
RiaLogging::info( QString( "Writing to directory %!" ).arg( saveDir ) );
for ( RimWellLogPlot* wellLogPlot : selectedWellLogPlots )
{
QString fileName = saveDir + "/" + caf::Utils::makeValidFileBasename( wellLogPlot->multiPlotTitle() ) +
".ascii";
QString fileName = saveDir + "/" + caf::Utils::makeValidFileBasename( wellLogPlot->description() ) + ".ascii";
RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( fileName, wellLogPlot );
progress++;
@@ -119,8 +118,7 @@ QString RicAsciiExportWellLogPlotFeature::makeValidExportFileName( const RimWell
const QString& prefix,
bool capitalizeFileName )
{
QString fileName = folder + "/" + prefix + caf::Utils::makeValidFileBasename( wellLogPlot->multiPlotTitle() ) +
".ascii";
QString fileName = folder + "/" + prefix + caf::Utils::makeValidFileBasename( wellLogPlot->description() ) + ".ascii";
if ( capitalizeFileName ) fileName = fileName.toUpper();
QDir dir( folder );
@@ -143,7 +141,7 @@ bool RicAsciiExportWellLogPlotFeature::exportAsciiForWellLogPlot( const QString&
QTextStream out( &file );
out << wellLogPlot->multiPlotTitle();
out << wellLogPlot->description();
out << "\n";
out << wellLogPlot->asciiDataForPlotExport();
out << "\n\n";

View File

@@ -25,7 +25,7 @@
#include "RiuPlotMainWindow.h"
#include "RiuQwtPlotWidget.h"
#include "RimMultiPlotWindow.h"
#include "RimMultiPlot.h"
#include "RimPlotWindow.h"
#include "RimWellLogTrack.h"
@@ -50,7 +50,7 @@ bool RicDeleteSubPlotFeature::isCommandEnabled()
size_t plotsSelected = 0;
for ( caf::PdmObject* object : selection )
{
RimMultiPlotWindow* multiPlot = nullptr;
RimMultiPlot* multiPlot = nullptr;
object->firstAncestorOrThisOfType( multiPlot );
if ( dynamic_cast<RimPlotWindow*>( object ) && multiPlot )
{
@@ -72,11 +72,11 @@ void RicDeleteSubPlotFeature::onActionTriggered( bool isChecked )
std::vector<RimPlot*> selection;
caf::SelectionManager::instance()->objectsByType( &selection );
std::set<RimMultiPlotWindow*> alteredPlotWindows;
std::set<RimMultiPlot*> alteredPlotWindows;
for ( RimPlot* plot : selection )
{
RimMultiPlotWindow* plotWindow = nullptr;
RimMultiPlot* plotWindow = nullptr;
plot->firstAncestorOrThisOfType( plotWindow );
if ( plot && plotWindow )
{
@@ -89,7 +89,7 @@ void RicDeleteSubPlotFeature::onActionTriggered( bool isChecked )
}
}
for ( RimMultiPlotWindow* plotWindow : alteredPlotWindows )
for ( RimMultiPlot* plotWindow : alteredPlotWindows )
{
plotWindow->uiCapability()->updateConnectedEditors();
}

View File

@@ -116,7 +116,7 @@ void RicNewPltPlotFeature::onActionTriggered( bool isChecked )
plotTrack->setDescription( QString( "Track %1" ).arg( pltPlot->plotCount() ) );
pltPlotColl->addPlot( pltPlot );
pltPlot->setMultiPlotTitle( plotName );
pltPlot->nameConfig()->setCustomName( plotName );
// pltPlot->applyInitialSelections();
pltPlot->loadDataAndUpdate();

View File

@@ -81,7 +81,7 @@ void RicNewRftPlotFeature::onActionTriggered( bool isChecked )
wellName = rftPlot->simWellOrWellPathName(); // We may have been given a default well name
QString plotName = QString( RimWellRftPlot::plotNameFormatString() ).arg( wellName );
rftPlot->setMultiPlotTitle( plotName );
rftPlot->nameConfig()->setCustomName( plotName );
rftPlot->loadDataAndUpdate();
rftPlotColl->updateConnectedEditors();

View File

@@ -102,11 +102,11 @@ RimWellBoreStabilityPlot*
auto task = progInfo.task( "Updating all tracks", 5 );
plot->nameConfig()->setAutoNameTags( true, true, true, false, true );
plot->setMultiPlotTitleVisible( true );
plot->setPlotTitleVisible( true );
plot->setLegendsVisible( true );
plot->setLegendsHorizontal( true );
plot->setDepthType( RiaDefines::TRUE_VERTICAL_DEPTH );
plot->setAutoScaleYEnabled( true );
plot->setAutoScaleDepthEnabled( true );
RicNewWellLogPlotFeatureImpl::updateAfterCreation( plot );
}

View File

@@ -58,11 +58,11 @@ RimWellBoreStabilityPlot*
if ( !plotDescription.isEmpty() )
{
plot->setMultiPlotTitle( plotDescription );
plot->nameConfig()->setCustomName( plotDescription );
}
else
{
plot->setMultiPlotTitle(
plot->nameConfig()->setCustomName(
QString( "Well Bore Stability Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots.size() ) );
}
@@ -92,11 +92,12 @@ RimWellLogPlot* RicNewWellLogPlotFeatureImpl::createWellLogPlot( bool showAfterC
if ( !plotDescription.isEmpty() )
{
plot->setMultiPlotTitle( plotDescription );
plot->nameConfig()->setCustomName( plotDescription );
}
else
{
plot->setMultiPlotTitle( QString( "Well Log Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots.size() ) );
plot->nameConfig()->setCustomName(
QString( "Well Log Plot %1" ).arg( wellLogPlotCollection()->wellLogPlots.size() ) );
}
if ( showAfterCreation )

View File

@@ -85,8 +85,8 @@ void RicPasteWellLogPlotFeature::onActionTriggered( bool isChecked )
newObject->resolveReferencesRecursively();
newObject->initAfterReadRecursively();
QString description = "Copy of " + newObject->multiPlotTitle();
newObject->setMultiPlotTitle( description );
QString customName = "Copy of " + newObject->nameConfig()->customName();
newObject->nameConfig()->setCustomName( customName );
newObject->loadDataAndUpdate();