mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 23:23:01 -06:00
#5116 Hide unneccessary tree elements for well measurements.
This commit is contained in:
parent
391046c4fa
commit
d09cae0e55
@ -22,7 +22,6 @@
|
||||
#include "RimWellMeasurement.h"
|
||||
#include "RimWellMeasurementFilePath.h"
|
||||
|
||||
#include "cafCmdFeatureMenuBuilder.h"
|
||||
#include "cafPdmUiTableViewEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafPdmUiTreeSelectionEditor.h"
|
||||
@ -42,7 +41,7 @@ RimWellMeasurementCollection::RimWellMeasurementCollection()
|
||||
m_measurements.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
CAF_PDM_InitFieldNoDefault( &m_importedFiles, "ImportedFiles", "Imported Files", "", "", "" );
|
||||
m_importedFiles.uiCapability()->setUiTreeHidden( false );
|
||||
m_importedFiles.uiCapability()->setUiTreeHidden( true );
|
||||
|
||||
this->setName( "Well Measurements" );
|
||||
}
|
||||
@ -81,6 +80,14 @@ std::vector<RimWellMeasurement*> RimWellMeasurementCollection::measurements() co
|
||||
return attrs;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
bool RimWellMeasurementCollection::isEmpty() const
|
||||
{
|
||||
return m_measurements.empty();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@ -160,7 +167,10 @@ void RimWellMeasurementCollection::defineUiOrdering( QString uiConfigName, caf::
|
||||
void RimWellMeasurementCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering,
|
||||
QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
uiTreeOrdering.add( &m_importedFiles );
|
||||
if ( !m_importedFiles.empty() )
|
||||
{
|
||||
uiTreeOrdering.add( &m_importedFiles );
|
||||
}
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
void appendMeasurement( RimWellMeasurement* measurement );
|
||||
void deleteMeasurement( RimWellMeasurement* measurementToDelete );
|
||||
void deleteAllMeasurements();
|
||||
bool isEmpty() const;
|
||||
|
||||
std::set<QString> importedFiles() const;
|
||||
|
||||
|
@ -47,6 +47,7 @@
|
||||
#include "RifWellPathImporter.h"
|
||||
|
||||
#include "cafPdmUiEditorHandle.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
#include "cafProgressInfo.h"
|
||||
|
||||
#include <QFile>
|
||||
@ -432,6 +433,24 @@ void RimWellPathCollection::defineUiOrdering( QString uiConfigName, caf::PdmUiOr
|
||||
advancedGroup->add( &wellPathClipZDistance );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName /*= ""*/ )
|
||||
{
|
||||
if ( !wellPaths.empty() )
|
||||
{
|
||||
uiTreeOrdering.add( &wellPaths );
|
||||
}
|
||||
|
||||
if ( !m_wellMeasurements->isEmpty() )
|
||||
{
|
||||
uiTreeOrdering.add( &m_wellMeasurements );
|
||||
}
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
@ -121,7 +121,9 @@ protected:
|
||||
const QVariant& newValue ) override;
|
||||
|
||||
private:
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||
void defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName ) override;
|
||||
|
||||
caf::PdmFieldHandle* objectToggleField() override;
|
||||
|
||||
void readAndAddWellPaths( std::vector<RimFileWellPath*>& wellPathArray );
|
||||
|
Loading…
Reference in New Issue
Block a user