mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Summary Multiplot: sync plot selection in tree with view (#8788)
* Make sure the subplot selected in the tree is shown in the multiplot viewer. * Clean up multiplot toolbar handling a bit * Remove old summary plot toolbar.
This commit is contained in:
parent
3590c52cdc
commit
d156160daf
@ -75,7 +75,7 @@ void RicCloseSummaryCaseFeature::deleteSummaryCases( std::vector<RimSummaryCase*
|
|||||||
summaryCaseMainCollection->updateAllRequiredEditors();
|
summaryCaseMainCollection->updateAllRequiredEditors();
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
|
|
||||||
caf::AsyncPdmObjectVectorDeleter<RimSummaryCase> summaryCaseDeleter( cases );
|
caf::AsyncPdmObjectVectorDeleter<RimSummaryCase> summaryCaseDeleter( cases );
|
||||||
CAF_ASSERT( cases.empty() ); // vector should be empty immediately.
|
CAF_ASSERT( cases.empty() ); // vector should be empty immediately.
|
||||||
|
@ -96,5 +96,5 @@ void RicCloseSummaryCaseInCollectionFeature::onActionTriggered( bool isChecked )
|
|||||||
}
|
}
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
@ -98,7 +98,7 @@ void RicImportSummaryCasesFeature::onActionTriggered( bool isChecked )
|
|||||||
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
||||||
if ( mainPlotWindow && !cases.empty() )
|
if ( mainPlotWindow && !cases.empty() )
|
||||||
{
|
{
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RimCase*> allCases;
|
std::vector<RimCase*> allCases;
|
||||||
@ -147,7 +147,7 @@ bool RicImportSummaryCasesFeature::createAndAddSummaryCasesFromFiles( const QStr
|
|||||||
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = app->getOrCreateAndShowMainPlotWindow();
|
||||||
if ( mainPlotWindow && !cases->empty() )
|
if ( mainPlotWindow && !cases->empty() )
|
||||||
{
|
{
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
|
|
||||||
// Close main window if there are no eclipse cases imported
|
// Close main window if there are no eclipse cases imported
|
||||||
std::vector<RimCase*> allCases;
|
std::vector<RimCase*> allCases;
|
||||||
|
@ -71,8 +71,7 @@ void RicImportSummaryGroupFeature::onActionTriggered( bool isChecked )
|
|||||||
if ( mainPlotWindow && !cases.empty() )
|
if ( mainPlotWindow && !cases.empty() )
|
||||||
{
|
{
|
||||||
mainPlotWindow->selectAsCurrentItem( cases.back() );
|
mainPlotWindow->selectAsCurrentItem( cases.back() );
|
||||||
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<RimCase*> allCases;
|
std::vector<RimCase*> allCases;
|
||||||
|
@ -41,7 +41,6 @@ set(SOURCE_GROUP_HEADER_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicActivateCurveFilterInToolbarFeature.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.h
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.h
|
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.h
|
||||||
@ -90,7 +89,6 @@ set(SOURCE_GROUP_SOURCE_FILES
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingSummaryCurveFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicClearSourceSteppingEnsembleCurveSetFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicSetSourceSteppingEnsembleCurveSetFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicActivateCurveFilterInToolbarFeature.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewDerivedSummaryFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicNewPlotAxisPropertiesFeature.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.cpp
|
${CMAKE_CURRENT_LIST_DIR}/RicShowSummaryPlotManagerFeature.cpp
|
||||||
|
@ -1,59 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright (C) 2019- 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 "RicActivateCurveFilterInToolbarFeature.h"
|
|
||||||
|
|
||||||
#include "RiaGuiApplication.h"
|
|
||||||
#include "RiuPlotMainWindow.h"
|
|
||||||
|
|
||||||
#include <QAction>
|
|
||||||
|
|
||||||
CAF_CMD_SOURCE_INIT( RicActivateCurveFilterInToolbarFeature, "RicActivateCurveFilterInToolbarFeature" );
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
bool RicActivateCurveFilterInToolbarFeature::isCommandEnabled()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RicActivateCurveFilterInToolbarFeature::onActionTriggered( bool isChecked )
|
|
||||||
{
|
|
||||||
if ( RiaGuiApplication::isRunning() )
|
|
||||||
{
|
|
||||||
auto plotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
|
||||||
if ( plotWindow )
|
|
||||||
{
|
|
||||||
plotWindow->setFocusToLineEditInSummaryToolBar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RicActivateCurveFilterInToolbarFeature::setupActionLook( QAction* actionToSetup )
|
|
||||||
{
|
|
||||||
actionToSetup->setText( "Activate Summary Curve Filter Editor" );
|
|
||||||
|
|
||||||
applyShortcutWithHintToAction( actionToSetup, QKeySequence( tr( "Ctrl+F" ) ) );
|
|
||||||
}
|
|
@ -1,34 +0,0 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////////
|
|
||||||
//
|
|
||||||
// Copyright (C) 2019- 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 RicActivateCurveFilterInToolbarFeature : public caf::CmdFeature
|
|
||||||
{
|
|
||||||
CAF_CMD_HEADER_INIT;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
bool isCommandEnabled() override;
|
|
||||||
void onActionTriggered( bool isChecked ) override;
|
|
||||||
void setupActionLook( QAction* actionToSetup ) override;
|
|
||||||
};
|
|
@ -77,7 +77,7 @@ void RicNewSummaryCrossPlotCurveFeature::onActionTriggered( bool isChecked )
|
|||||||
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
RiaGuiApplication::instance()->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ void RicNewSummaryCurveFeature::onActionTriggered( bool isChecked )
|
|||||||
app->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
app->getOrCreateAndShowMainPlotWindow()->selectAsCurrentItem( newCurve );
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = app->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = app->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ RimSummaryPlot*
|
|||||||
if ( mainPlotWindow )
|
if ( mainPlotWindow )
|
||||||
{
|
{
|
||||||
mainPlotWindow->selectAsCurrentItem( firstCurveSetCreated );
|
mainPlotWindow->selectAsCurrentItem( firstCurveSetCreated );
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
return plot;
|
return plot;
|
||||||
}
|
}
|
||||||
@ -183,7 +183,7 @@ void RicNewSummaryEnsembleCurveSetFeature::onActionTriggered( bool isChecked )
|
|||||||
if ( mainPlotWindow && firstCurveSet )
|
if ( mainPlotWindow && firstCurveSet )
|
||||||
{
|
{
|
||||||
mainPlotWindow->selectAsCurrentItem( firstCurveSet );
|
mainPlotWindow->selectAsCurrentItem( firstCurveSet );
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -236,7 +236,7 @@ void RicSummaryPlotEditorUi::fieldChangedByUi( const caf::PdmFieldHandle* change
|
|||||||
field->setValueWithFieldChanged( true );
|
field->setValueWithFieldChanged( true );
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
else if ( changedField == &m_useAutoAppearanceAssignment && m_useAutoAppearanceAssignment )
|
else if ( changedField == &m_useAutoAppearanceAssignment && m_useAutoAppearanceAssignment )
|
||||||
{
|
{
|
||||||
@ -861,7 +861,7 @@ void RicSummaryPlotEditorUi::createNewPlot()
|
|||||||
m_targetPlot = newSummaryPlot;
|
m_targetPlot = newSummaryPlot;
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -492,30 +492,6 @@ int RimMultiPlot::rowsPerPage() const
|
|||||||
return rowCount;
|
return rowCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
caf::PdmFieldHandle* RimMultiPlot::columnCountField()
|
|
||||||
{
|
|
||||||
return &m_columnCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
caf::PdmFieldHandle* RimMultiPlot::rowsPerPageField()
|
|
||||||
{
|
|
||||||
return &m_rowsPerPage;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
caf::PdmFieldHandle* RimMultiPlot::pagePreviewField()
|
|
||||||
{
|
|
||||||
return &m_pagePreviewMode;
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -913,3 +889,11 @@ bool RimMultiPlot::isMouseCursorInsidePlot()
|
|||||||
if ( !m_viewer ) return false;
|
if ( !m_viewer ) return false;
|
||||||
return m_viewer->underMouse();
|
return m_viewer->underMouse();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<caf::PdmFieldHandle*> RimMultiPlot::fieldsToShowInToolbar()
|
||||||
|
{
|
||||||
|
return { &m_pagePreviewMode, &m_columnCount, &m_rowsPerPage };
|
||||||
|
}
|
||||||
|
@ -89,11 +89,8 @@ public:
|
|||||||
void setRowCount( RiaDefines::RowCount rowCount );
|
void setRowCount( RiaDefines::RowCount rowCount );
|
||||||
void setTickmarkCount( RimPlotAxisPropertiesInterface::LegendTickmarkCountEnum tickmarkCount );
|
void setTickmarkCount( RimPlotAxisPropertiesInterface::LegendTickmarkCountEnum tickmarkCount );
|
||||||
|
|
||||||
int columnCount() const override;
|
int columnCount() const override;
|
||||||
int rowsPerPage() const;
|
int rowsPerPage() const;
|
||||||
caf::PdmFieldHandle* columnCountField();
|
|
||||||
caf::PdmFieldHandle* rowsPerPageField();
|
|
||||||
caf::PdmFieldHandle* pagePreviewField();
|
|
||||||
|
|
||||||
void setShowPlotTitles( bool enable );
|
void setShowPlotTitles( bool enable );
|
||||||
bool showPlotTitles() const;
|
bool showPlotTitles() const;
|
||||||
@ -108,6 +105,8 @@ public:
|
|||||||
int axisTitleFontSize() const;
|
int axisTitleFontSize() const;
|
||||||
int axisValueFontSize() const;
|
int axisValueFontSize() const;
|
||||||
|
|
||||||
|
virtual std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
QImage snapshotWindowContent() override;
|
QImage snapshotWindowContent() override;
|
||||||
|
|
||||||
@ -129,7 +128,6 @@ protected:
|
|||||||
void onLoadDataAndUpdate() override;
|
void onLoadDataAndUpdate() override;
|
||||||
void initAfterRead() override;
|
void initAfterRead() override;
|
||||||
|
|
||||||
|
|
||||||
void applyPlotWindowTitleToWidgets();
|
void applyPlotWindowTitleToWidgets();
|
||||||
void updatePlots();
|
void updatePlots();
|
||||||
void updateZoom();
|
void updateZoom();
|
||||||
|
@ -128,7 +128,7 @@ void updateNewObservedDataCreated( caf::PdmObject* object )
|
|||||||
caf::PdmUiObjectEditorHandle::updateUiAllObjectEditors();
|
caf::PdmUiObjectEditorHandle::updateUiAllObjectEditors();
|
||||||
|
|
||||||
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mpw = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
if ( mpw ) mpw->updateSummaryPlotToolBar();
|
if ( mpw ) mpw->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -795,7 +795,7 @@ void RimEnsembleCurveSet::fieldChangedByUi( const caf::PdmFieldHandle* changedFi
|
|||||||
plot->updateConnectedEditors();
|
plot->updateConnectedEditors();
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1076,7 +1076,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
plot->updatePlotTitle();
|
plot->updatePlotTitle();
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
|
|
||||||
// If no plot collection is found, we assume that we are inside a curve creator
|
// If no plot collection is found, we assume that we are inside a curve creator
|
||||||
// Update the summary curve collection to make sure the curve names are updated in curve creator UI
|
// Update the summary curve collection to make sure the curve names are updated in curve creator UI
|
||||||
@ -1236,7 +1236,7 @@ void RimSummaryCurve::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
plot->updateConnectedEditors();
|
plot->updateConnectedEditors();
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
|
|
||||||
dataChanged.send();
|
dataChanged.send();
|
||||||
}
|
}
|
||||||
|
@ -449,6 +449,9 @@ std::vector<caf::PdmFieldHandle*> RimSummaryMultiPlot::fieldsToShowInToolbar()
|
|||||||
toolBarFields.insert( std::end( toolBarFields ), std::begin( fields ), std::end( fields ) );
|
toolBarFields.insert( std::end( toolBarFields ), std::begin( fields ), std::end( fields ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto multiFields = RimMultiPlot::fieldsToShowInToolbar();
|
||||||
|
toolBarFields.insert( std::end( toolBarFields ), std::begin( multiFields ), std::end( multiFields ) );
|
||||||
|
|
||||||
return toolBarFields;
|
return toolBarFields;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,6 +583,14 @@ void RimSummaryMultiPlot::duplicate()
|
|||||||
duplicatePlot.send( this );
|
duplicatePlot.send( this );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RimSummaryMultiPlot::makeSureIsVisible( RimSummaryPlot* summaryPlot )
|
||||||
|
{
|
||||||
|
if ( summaryPlot->plotWidget() && !m_viewer.isNull() ) m_viewer->scrollToPlot( summaryPlot->plotWidget() );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -68,7 +68,7 @@ public:
|
|||||||
void removePlotNoUpdate( RimPlot* plot ) override;
|
void removePlotNoUpdate( RimPlot* plot ) override;
|
||||||
void updateAfterPlotRemove() override;
|
void updateAfterPlotRemove() override;
|
||||||
|
|
||||||
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar();
|
std::vector<caf::PdmFieldHandle*> fieldsToShowInToolbar() override;
|
||||||
|
|
||||||
void syncAxisRanges();
|
void syncAxisRanges();
|
||||||
|
|
||||||
@ -79,6 +79,8 @@ public:
|
|||||||
std::vector<RimSummaryPlot*> summaryPlots() const;
|
std::vector<RimSummaryPlot*> summaryPlots() const;
|
||||||
std::vector<RimSummaryPlot*> visibleSummaryPlots() const;
|
std::vector<RimSummaryPlot*> visibleSummaryPlots() const;
|
||||||
|
|
||||||
|
void makeSureIsVisible( RimSummaryPlot* plot );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool handleGlobalKeyEvent( QKeyEvent* keyEvent ) override;
|
bool handleGlobalKeyEvent( QKeyEvent* keyEvent ) override;
|
||||||
bool handleGlobalWheelEvent( QWheelEvent* wheelEvent ) override;
|
bool handleGlobalWheelEvent( QWheelEvent* wheelEvent ) override;
|
||||||
|
@ -112,7 +112,7 @@ void RimSummaryPlotCollection::onChildDeleted( caf::PdmChildArrayFieldHandle*
|
|||||||
{
|
{
|
||||||
updateSummaryNameHasChanged();
|
updateSummaryNameHasChanged();
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -236,7 +236,7 @@ void RimSummaryPlotFilterTextCurveSetEditor::fieldChangedByUi( const caf::PdmFie
|
|||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
if ( mainPlotWindow )
|
if ( mainPlotWindow )
|
||||||
{
|
{
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -397,9 +397,8 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
|||||||
ensembleCurveColl->updateConnectedEditors();
|
ensembleCurveColl->updateConnectedEditors();
|
||||||
}
|
}
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->getOrCreateMainPlotWindow();
|
||||||
bool forceUpdateOfFieldsInToolbar = true;
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar( forceUpdateOfFieldsInToolbar );
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -597,7 +596,7 @@ void RimSummaryPlotSourceStepping::fieldChangedByUi( const caf::PdmFieldHandle*
|
|||||||
}
|
}
|
||||||
|
|
||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ caf::PdmObjectHandle* RimProject_importSummaryCase::execute()
|
|||||||
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
RiuPlotMainWindow* mainPlotWindow = RiaGuiApplication::instance()->mainPlotWindow();
|
||||||
if ( mainPlotWindow && !newCases.empty() )
|
if ( mainPlotWindow && !newCases.empty() )
|
||||||
{
|
{
|
||||||
mainPlotWindow->updateSummaryPlotToolBar();
|
mainPlotWindow->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,6 +663,24 @@ void RiuMultiPlotBook::changeCurrentPage( int pageNumber )
|
|||||||
if ( !m_pages.isEmpty() ) m_scrollArea->ensureWidgetVisible( m_pages[m_currentPageIndex] );
|
if ( !m_pages.isEmpty() ) m_scrollArea->ensureWidgetVisible( m_pages[m_currentPageIndex] );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuMultiPlotBook::scrollToPlot( RiuPlotWidget* plotWidget )
|
||||||
|
{
|
||||||
|
int pageNum = 0;
|
||||||
|
|
||||||
|
for ( auto& page : m_pages )
|
||||||
|
{
|
||||||
|
if ( page->indexOfPlotWidget( plotWidget ) >= 0 )
|
||||||
|
{
|
||||||
|
changeCurrentPage( pageNum );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
pageNum++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -84,6 +84,8 @@ public:
|
|||||||
|
|
||||||
void renderTo( QPaintDevice* painter );
|
void renderTo( QPaintDevice* painter );
|
||||||
|
|
||||||
|
void scrollToPlot( RiuPlotWidget* plotWidget );
|
||||||
|
|
||||||
void goToNextPage();
|
void goToNextPage();
|
||||||
void goToPrevPage();
|
void goToPrevPage();
|
||||||
void goToLastPage();
|
void goToLastPage();
|
||||||
|
@ -196,7 +196,6 @@ void RiuPlotMainWindow::cleanupGuiBeforeProjectClose()
|
|||||||
cleanUpTemporaryWidgets();
|
cleanUpTemporaryWidgets();
|
||||||
|
|
||||||
m_wellLogPlotToolBarEditor->clear();
|
m_wellLogPlotToolBarEditor->clear();
|
||||||
m_summaryPlotToolBarEditor->clear();
|
|
||||||
m_multiPlotToolBarEditor->clear();
|
m_multiPlotToolBarEditor->clear();
|
||||||
|
|
||||||
setWindowTitle( "Plots - ResInsight" );
|
setWindowTitle( "Plots - ResInsight" );
|
||||||
@ -429,9 +428,6 @@ void RiuPlotMainWindow::createToolBars()
|
|||||||
m_wellLogPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Well Log Plot", this );
|
m_wellLogPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Well Log Plot", this );
|
||||||
m_wellLogPlotToolBarEditor->hide();
|
m_wellLogPlotToolBarEditor->hide();
|
||||||
|
|
||||||
m_summaryPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Summary Plot", this );
|
|
||||||
m_summaryPlotToolBarEditor->hide();
|
|
||||||
|
|
||||||
m_multiPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Multi Plot", this );
|
m_multiPlotToolBarEditor = std::make_unique<caf::PdmUiToolBarEditor>( "Multi Plot", this );
|
||||||
m_multiPlotToolBarEditor->hide();
|
m_multiPlotToolBarEditor->hide();
|
||||||
|
|
||||||
@ -691,9 +687,8 @@ void RiuPlotMainWindow::updateMultiPlotToolBar()
|
|||||||
RimMultiPlot* plotWindow = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
RimMultiPlot* plotWindow = dynamic_cast<RimMultiPlot*>( m_activePlotViewWindow.p() );
|
||||||
if ( plotWindow )
|
if ( plotWindow )
|
||||||
{
|
{
|
||||||
std::vector<caf::PdmFieldHandle*> toolBarFields = { plotWindow->pagePreviewField(),
|
std::vector<caf::PdmFieldHandle*> toolBarFields = plotWindow->fieldsToShowInToolbar();
|
||||||
plotWindow->columnCountField(),
|
|
||||||
plotWindow->rowsPerPageField() };
|
|
||||||
m_multiPlotToolBarEditor->setFields( toolBarFields );
|
m_multiPlotToolBarEditor->setFields( toolBarFields );
|
||||||
m_multiPlotToolBarEditor->updateUi();
|
m_multiPlotToolBarEditor->updateUi();
|
||||||
m_multiPlotToolBarEditor->show();
|
m_multiPlotToolBarEditor->show();
|
||||||
@ -706,61 +701,6 @@ void RiuPlotMainWindow::updateMultiPlotToolBar()
|
|||||||
refreshToolbars();
|
refreshToolbars();
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RiuPlotMainWindow::updateSummaryPlotToolBar( bool forceUpdateUi )
|
|
||||||
{
|
|
||||||
RimSummaryPlot* summaryPlot = dynamic_cast<RimSummaryPlot*>( m_activePlotViewWindow.p() );
|
|
||||||
RimSummaryMultiPlot* summaryMultiPlot = dynamic_cast<RimSummaryMultiPlot*>( m_activePlotViewWindow.p() );
|
|
||||||
|
|
||||||
std::vector<caf::PdmFieldHandle*> toolBarFields;
|
|
||||||
|
|
||||||
if ( summaryMultiPlot )
|
|
||||||
{
|
|
||||||
toolBarFields = summaryMultiPlot->fieldsToShowInToolbar();
|
|
||||||
}
|
|
||||||
else if ( summaryPlot )
|
|
||||||
{
|
|
||||||
toolBarFields = summaryPlot->fieldsToShowInToolbar();
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( toolBarFields.size() > 0 )
|
|
||||||
{
|
|
||||||
QString keyword;
|
|
||||||
|
|
||||||
if ( !m_summaryPlotToolBarEditor->isEditorDataValid( toolBarFields ) )
|
|
||||||
{
|
|
||||||
keyword = m_summaryPlotToolBarEditor->keywordForFocusWidget();
|
|
||||||
|
|
||||||
m_summaryPlotToolBarEditor->setFields( toolBarFields );
|
|
||||||
}
|
|
||||||
|
|
||||||
m_summaryPlotToolBarEditor->updateUi( caf::PdmUiToolBarEditor::uiEditorConfigName() );
|
|
||||||
m_summaryPlotToolBarEditor->show();
|
|
||||||
m_summaryPlotToolBarEditor->setFocusWidgetFromKeyword( keyword );
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
m_summaryPlotToolBarEditor->clear();
|
|
||||||
m_summaryPlotToolBarEditor->hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshToolbars();
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RiuPlotMainWindow::setFocusToLineEditInSummaryToolBar()
|
|
||||||
{
|
|
||||||
if ( m_summaryPlotToolBarEditor )
|
|
||||||
{
|
|
||||||
m_summaryPlotToolBarEditor->setFocusWidgetFromKeyword(
|
|
||||||
RimSummaryPlotFilterTextCurveSetEditor::curveFilterFieldKeyword() );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -901,7 +841,6 @@ void RiuPlotMainWindow::slotSubWindowActivated( QMdiSubWindow* subWindow )
|
|||||||
}
|
}
|
||||||
|
|
||||||
updateWellLogPlotToolBar();
|
updateWellLogPlotToolBar();
|
||||||
updateSummaryPlotToolBar();
|
|
||||||
updateMultiPlotToolBar();
|
updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1005,20 +944,17 @@ void RiuPlotMainWindow::selectedObjectsChanged()
|
|||||||
|
|
||||||
if ( firstSelectedObject )
|
if ( firstSelectedObject )
|
||||||
{
|
{
|
||||||
RimSummaryPlot* summaryPlot = nullptr;
|
RimSummaryMultiPlot* multiSummaryPlot = nullptr;
|
||||||
firstSelectedObject->firstAncestorOrThisOfType( summaryPlot );
|
firstSelectedObject->firstAncestorOrThisOfType( multiSummaryPlot );
|
||||||
if ( summaryPlot )
|
if ( multiSummaryPlot )
|
||||||
{
|
{
|
||||||
updateSummaryPlotToolBar();
|
updateMultiPlotToolBar();
|
||||||
}
|
|
||||||
else
|
RimSummaryPlot* summaryPlot = nullptr;
|
||||||
{
|
firstSelectedObject->firstAncestorOrThisOfType( summaryPlot );
|
||||||
RimSummaryMultiPlot* multiSummaryPlot = nullptr;
|
if ( summaryPlot )
|
||||||
firstSelectedObject->firstAncestorOrThisOfType( multiSummaryPlot );
|
|
||||||
if ( multiSummaryPlot )
|
|
||||||
{
|
{
|
||||||
updateSummaryPlotToolBar();
|
multiSummaryPlot->makeSureIsVisible( summaryPlot );
|
||||||
updateMultiPlotToolBar();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,8 +85,6 @@ public:
|
|||||||
|
|
||||||
void updateWellLogPlotToolBar();
|
void updateWellLogPlotToolBar();
|
||||||
void updateMultiPlotToolBar();
|
void updateMultiPlotToolBar();
|
||||||
void updateSummaryPlotToolBar( bool forceUpdateUi = false );
|
|
||||||
void setFocusToLineEditInSummaryToolBar();
|
|
||||||
|
|
||||||
RicSummaryPlotEditorDialog* summaryCurveCreatorDialog( bool createIfNotPresent );
|
RicSummaryPlotEditorDialog* summaryCurveCreatorDialog( bool createIfNotPresent );
|
||||||
RicSummaryCurveCalculatorDialog* summaryCurveCalculatorDialog( bool createIfNotPresent );
|
RicSummaryCurveCalculatorDialog* summaryCurveCalculatorDialog( bool createIfNotPresent );
|
||||||
@ -136,7 +134,6 @@ private:
|
|||||||
|
|
||||||
std::unique_ptr<caf::PdmUiToolBarEditor> m_wellLogPlotToolBarEditor;
|
std::unique_ptr<caf::PdmUiToolBarEditor> m_wellLogPlotToolBarEditor;
|
||||||
std::unique_ptr<caf::PdmUiToolBarEditor> m_multiPlotToolBarEditor;
|
std::unique_ptr<caf::PdmUiToolBarEditor> m_multiPlotToolBarEditor;
|
||||||
std::unique_ptr<caf::PdmUiToolBarEditor> m_summaryPlotToolBarEditor;
|
|
||||||
|
|
||||||
std::unique_ptr<caf::PdmUiPropertyView> m_pdmUiPropertyView;
|
std::unique_ptr<caf::PdmUiPropertyView> m_pdmUiPropertyView;
|
||||||
std::unique_ptr<caf::PdmUiPropertyView> m_summaryPlotManagerView;
|
std::unique_ptr<caf::PdmUiPropertyView> m_summaryPlotManagerView;
|
||||||
|
@ -94,7 +94,6 @@ void RiuPlotMainWindowTools::refreshToolbars()
|
|||||||
|
|
||||||
if ( mpw )
|
if ( mpw )
|
||||||
{
|
{
|
||||||
mpw->updateSummaryPlotToolBar();
|
|
||||||
mpw->updateWellLogPlotToolBar();
|
mpw->updateWellLogPlotToolBar();
|
||||||
mpw->updateMultiPlotToolBar();
|
mpw->updateMultiPlotToolBar();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user