mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-08 07:03:25 -06:00
Reorder curve calculator to use more of available screen space
This commit is contained in:
parent
f3ea5b39f1
commit
cde05458f2
@ -62,6 +62,7 @@ RimSummaryCalculation::RimSummaryCalculation()
|
|||||||
CAF_PDM_InitObject( "RimSummaryCalculation", ":/octave.png", "Calculation", "" );
|
CAF_PDM_InitObject( "RimSummaryCalculation", ":/octave.png", "Calculation", "" );
|
||||||
|
|
||||||
CAF_PDM_InitField( &m_distributeToOtherItems, "DistributeToOtherItems", true, "Distribute to other items (wells, groups, ..)" );
|
CAF_PDM_InitField( &m_distributeToOtherItems, "DistributeToOtherItems", true, "Distribute to other items (wells, groups, ..)" );
|
||||||
|
caf::PdmUiNativeCheckBoxEditor::configureFieldForEditor( &m_distributeToOtherItems );
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
@ -200,18 +201,15 @@ bool RimSummaryCalculation::detectCyclicCalculation( int id, std::set<int>& ids
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
void RimSummaryCalculation::defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute )
|
void RimSummaryCalculation::defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering )
|
||||||
{
|
{
|
||||||
RimUserDefinedCalculation::defineEditorAttribute( field, uiConfigName, attribute );
|
RimUserDefinedCalculation::defineUiOrdering( uiConfigName, uiOrdering );
|
||||||
|
|
||||||
if ( field == &m_distributeToOtherItems )
|
// Adjust the layout to avoid a lot of unused white space in dialog
|
||||||
{
|
m_description.uiCapability()->setUiHidden( true );
|
||||||
auto myAttr = dynamic_cast<caf::PdmUiCheckBoxEditorAttribute*>( attribute );
|
m_expression.uiCapability()->setUiName( "Expression" );
|
||||||
if ( myAttr )
|
m_expression.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||||
{
|
m_unit.uiCapability()->setUiLabelPosition( caf::PdmUiItemInfo::TOP );
|
||||||
myAttr->setWordWrap( true );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -87,7 +87,7 @@ protected:
|
|||||||
bool checkVariables() const;
|
bool checkVariables() const;
|
||||||
bool detectCyclicCalculation( int id, std::set<int>& ids ) const;
|
bool detectCyclicCalculation( int id, std::set<int>& ids ) const;
|
||||||
|
|
||||||
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
caf::PdmField<bool> m_distributeToOtherItems;
|
caf::PdmField<bool> m_distributeToOtherItems;
|
||||||
|
Loading…
Reference in New Issue
Block a user