mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#5539 Populate the vector selection dialog from selection
This commit is contained in:
parent
3b0aacb666
commit
233f63e80b
@ -354,20 +354,8 @@ void RimAnalysisPlot::fieldChangedByUi( const caf::PdmFieldHandle* changedField,
|
|||||||
{
|
{
|
||||||
// Do select variables
|
// Do select variables
|
||||||
RiuSummaryVectorSelectionDialog dlg( nullptr );
|
RiuSummaryVectorSelectionDialog dlg( nullptr );
|
||||||
// RimSummaryCase* candidateCase = m_yValuesSummaryCase();
|
|
||||||
// RifEclipseSummaryAddress candicateAddress = m_yValuesSummaryAddress->address();
|
|
||||||
|
|
||||||
// if ( candidateCase == nullptr )
|
dlg.setCurveSelection( this->curveDefinitions() );
|
||||||
//{
|
|
||||||
// candidateCase = m_xValuesSummaryCase();
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
// if ( !candicateAddress.isValid() )
|
|
||||||
//{
|
|
||||||
// candicateAddress = m_xValuesSummaryAddress->address();
|
|
||||||
//}
|
|
||||||
|
|
||||||
// dlg.hideEnsembles();
|
|
||||||
dlg.enableMultiSelect( true );
|
dlg.enableMultiSelect( true );
|
||||||
dlg.setCaseAndAddress( nullptr, RifEclipseSummaryAddress() );
|
dlg.setCaseAndAddress( nullptr, RifEclipseSummaryAddress() );
|
||||||
|
|
||||||
@ -550,3 +538,17 @@ void RimAnalysisPlot::updatePlotTitle()
|
|||||||
m_plotWidget->scheduleReplot();
|
m_plotWidget->scheduleReplot();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
std::vector<RiaSummaryCurveDefinition> RimAnalysisPlot::curveDefinitions()
|
||||||
|
{
|
||||||
|
std::vector<RiaSummaryCurveDefinition> curveDefs;
|
||||||
|
for ( auto dataEntry : m_data )
|
||||||
|
{
|
||||||
|
curveDefs.push_back( dataEntry->curveDefinition() );
|
||||||
|
}
|
||||||
|
|
||||||
|
return curveDefs;
|
||||||
|
}
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "RiaSummaryCurveDefinition.h"
|
||||||
|
|
||||||
#include "RimPlot.h"
|
#include "RimPlot.h"
|
||||||
|
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
@ -109,6 +111,8 @@ private:
|
|||||||
void buildTestPlot( RiuGroupedBarChartBuilder& chartBuilder );
|
void buildTestPlot( RiuGroupedBarChartBuilder& chartBuilder );
|
||||||
void updatePlotTitle();
|
void updatePlotTitle();
|
||||||
|
|
||||||
|
std::vector<RiaSummaryCurveDefinition> curveDefinitions();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPointer<RiuQwtPlotWidget> m_plotWidget;
|
QPointer<RiuQwtPlotWidget> m_plotWidget;
|
||||||
|
|
||||||
|
@ -69,9 +69,9 @@ void RimAnalysisPlotDataEntry::setFromCurveDefinition( const RiaSummaryCurveDefi
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimAnalysisPlotDataEntry::setSummaryCase( RimSummaryCase* sumCase )
|
RiaSummaryCurveDefinition RimAnalysisPlotDataEntry::curveDefinition() const
|
||||||
{
|
{
|
||||||
m_summaryCase = sumCase;
|
return RiaSummaryCurveDefinition( m_summaryCase(), m_summaryAddress->address(), m_ensemble() );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -90,14 +90,6 @@ RimSummaryCaseCollection* RimAnalysisPlotDataEntry::ensemble() const
|
|||||||
return m_ensemble;
|
return m_ensemble;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
///
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
|
||||||
void RimAnalysisPlotDataEntry::setSummaryAddress( const RifEclipseSummaryAddress& address )
|
|
||||||
{
|
|
||||||
m_summaryAddress->setAddress( address );
|
|
||||||
}
|
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include "RiaSummaryCurveDefinition.h"
|
||||||
#include "RifEclipseSummaryAddress.h"
|
#include "RifEclipseSummaryAddress.h"
|
||||||
#include "cafPdmChildField.h"
|
#include "cafPdmChildField.h"
|
||||||
#include "cafPdmObject.h"
|
#include "cafPdmObject.h"
|
||||||
@ -26,7 +27,6 @@
|
|||||||
class RimSummaryCase;
|
class RimSummaryCase;
|
||||||
class RimSummaryAddress;
|
class RimSummaryAddress;
|
||||||
class RimSummaryCaseCollection;
|
class RimSummaryCaseCollection;
|
||||||
class RiaSummaryCurveDefinition;
|
|
||||||
|
|
||||||
class RimAnalysisPlotDataEntry : public caf::PdmObject
|
class RimAnalysisPlotDataEntry : public caf::PdmObject
|
||||||
{
|
{
|
||||||
@ -36,14 +36,12 @@ public:
|
|||||||
RimAnalysisPlotDataEntry();
|
RimAnalysisPlotDataEntry();
|
||||||
~RimAnalysisPlotDataEntry() override;
|
~RimAnalysisPlotDataEntry() override;
|
||||||
|
|
||||||
void setFromCurveDefinition( const RiaSummaryCurveDefinition& curveDef );
|
void setFromCurveDefinition( const RiaSummaryCurveDefinition& curveDef );
|
||||||
|
RiaSummaryCurveDefinition curveDefinition() const;
|
||||||
|
|
||||||
void setSummaryCase( RimSummaryCase* sumCase );
|
|
||||||
RimSummaryCase* summaryCase() const;
|
RimSummaryCase* summaryCase() const;
|
||||||
RimSummaryCaseCollection* ensemble() const;
|
RimSummaryCaseCollection* ensemble() const;
|
||||||
|
RifEclipseSummaryAddress summaryAddress() const;
|
||||||
void setSummaryAddress( const RifEclipseSummaryAddress& address );
|
|
||||||
RifEclipseSummaryAddress summaryAddress() const;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
caf::PdmPtrField<RimSummaryCase*> m_summaryCase;
|
||||||
|
@ -107,6 +107,14 @@ void RiuSummaryVectorSelectionDialog::setEnsembleAndAddress( RimSummaryCaseColle
|
|||||||
updateLabel();
|
updateLabel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
///
|
||||||
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
void RiuSummaryVectorSelectionDialog::setCurveSelection( const std::vector<RiaSummaryCurveDefinition>& selection )
|
||||||
|
{
|
||||||
|
summaryAddressSelection()->setSelectedCurveDefinitions( selection );
|
||||||
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -132,11 +140,11 @@ void RiuSummaryVectorSelectionDialog::hideSummaryCases()
|
|||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RiuSummaryVectorSelectionDialog::enableMultiSelect( bool enable )
|
void RiuSummaryVectorSelectionDialog::enableMultiSelect( bool enable )
|
||||||
{
|
{
|
||||||
summaryAddressSelection()->setMultiSelectionMode(enable);
|
summaryAddressSelection()->setMultiSelectionMode( enable );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -41,11 +41,12 @@ public:
|
|||||||
|
|
||||||
void setCaseAndAddress( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address );
|
void setCaseAndAddress( RimSummaryCase* summaryCase, const RifEclipseSummaryAddress& address );
|
||||||
void setEnsembleAndAddress( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& address );
|
void setEnsembleAndAddress( RimSummaryCaseCollection* ensemble, const RifEclipseSummaryAddress& address );
|
||||||
|
void setCurveSelection( const std::vector<RiaSummaryCurveDefinition>& selection );
|
||||||
std::vector<RiaSummaryCurveDefinition> curveSelection() const;
|
std::vector<RiaSummaryCurveDefinition> curveSelection() const;
|
||||||
|
|
||||||
void hideEnsembles();
|
void hideEnsembles();
|
||||||
void hideSummaryCases();
|
void hideSummaryCases();
|
||||||
void enableMultiSelect(bool enable);
|
void enableMultiSelect( bool enable );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RiuSummaryVectorSelectionUi* summaryAddressSelection() const;
|
RiuSummaryVectorSelectionUi* summaryAddressSelection() const;
|
||||||
|
Loading…
Reference in New Issue
Block a user