mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-28 16:10:24 -05:00
#14216 Improve well event GUI: keyword item table, timeline sorting and filtering
Show keyword event items as an editable table in the property panel instead of one tree node per attribute. Items expose a single typed Value column via a proxy field; name and type are read-only. Add sorting (date, well, type; ascending or descending) and filtering (wells, event types, optional date range) to the well event timeline. The project tree shows the filtered event count in the timeline node name. Provide well path options for the event well path field, name keyword event tree nodes consistently with other event types, and hide the unused well path field for schedule-level keyword events.
This commit is contained in:
1 parent
c8b1ebc266
commit
9df7b933a7
9 files changed
+355
-11
No files matched your search
@@ -27,6 +27,7 @@
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
#include "cafPdmObjectScriptingCapability.h"
|
||||
#include "cafPdmUiOrdering.h"
|
||||
#include "cafPdmUiTableViewEditor.h"
|
||||
#include "cafPdmUiTreeOrdering.h"
|
||||
|
||||
CAF_PDM_SOURCE_INIT( RimWellEventKeyword, "WellEventKeyword" );
|
||||
@@ -40,6 +41,12 @@ RimWellEventKeyword::RimWellEventKeyword()
|
||||
|
||||
CAF_PDM_InitScriptableField( &m_keywordName, "KeywordName", QString(), "Keyword Name" );
|
||||
CAF_PDM_InitFieldNoDefault( &m_items, "Items", "Items" );
|
||||
m_items.uiCapability()->setUiEditorTypeName( caf::PdmUiTableViewEditor::uiEditorTypeName() );
|
||||
m_items.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::LabelPosition::TOP );
|
||||
m_items.uiCapability()->setAttribute( caf::PdmUiTableViewEditor::Keys::RESIZE_POLICY,
|
||||
static_cast<int>( caf::PdmUiTableViewEditorAttribute::RESIZE_TO_FILL_CONTAINER ) );
|
||||
m_items.uiCapability()->setAttribute( caf::PdmUiTableViewEditor::Keys::ALWAYS_ENFORCE_RESIZE_POLICY, true );
|
||||
m_items.uiCapability()->setAttribute( caf::PdmUiTableViewEditor::Keys::MINIMUM_HEIGHT, 200 );
|
||||
|
||||
setDeletable( true );
|
||||
}
|
||||
@@ -148,8 +155,12 @@ std::optional<Opm::DeckKeyword> RimWellEventKeyword::generateDeckKeyword( const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellEventKeyword::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||
{
|
||||
RimWellEvent::defineUiOrdering( uiConfigName, uiOrdering );
|
||||
|
||||
uiOrdering.add( &m_keywordName );
|
||||
uiOrdering.add( &m_items );
|
||||
|
||||
uiOrdering.skipRemainingFields();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
@@ -157,5 +168,7 @@ void RimWellEventKeyword::defineUiOrdering( QString uiConfigName, caf::PdmUiOrde
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellEventKeyword::defineUiTreeOrdering( caf::PdmUiTreeOrdering& uiTreeOrdering, QString uiConfigName )
|
||||
{
|
||||
uiTreeOrdering.add( &m_items );
|
||||
setUiName( QString( "%1 %2 [%3]" ).arg( m_keywordName() ).arg( m_eventDate().toString( "yyyy-MM-dd" ) ).arg( wellName() ) );
|
||||
|
||||
uiTreeOrdering.skipRemainingChildren( true );
|
||||
}
|
||||
Reference in new issue
Block a user