mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-24 22:27:55 -05:00
docs: Update agent guidelines for attribute map
This commit is contained in:
1 parent
43a4378cee
commit
b21a7d2d00
1 file changed
+3
-5
+3
-5
@@ -385,19 +385,17 @@ m_comboBoxField.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::BU
|
||||
**Old pattern (deprecated):**
|
||||
```cpp
|
||||
// In defineEditorAttribute() override
|
||||
auto* myAttr = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>( attribute );
|
||||
auto* myAttr = dynamic_cast<caf::PdmUiSomeEditorAttribute*>( attribute );
|
||||
if ( myAttr )
|
||||
{
|
||||
myAttr->adjustWidthToContents = true;
|
||||
myAttr->minimumContentsLength = 15;
|
||||
myAttr->someMember = true;
|
||||
}
|
||||
```
|
||||
|
||||
**New pattern:**
|
||||
```cpp
|
||||
// In field initialization or elsewhere
|
||||
m_field.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::ADJUST_WIDTH_TO_CONTENTS, true );
|
||||
m_field.uiCapability()->setAttribute( caf::PdmUiComboBoxEditor::Keys::MINIMUM_CONTENTS_LENGTH, 15 );
|
||||
m_field.uiCapability()->setAttribute( caf::PdmUiLineEditor::Keys::NOTIFY_WHEN_TEXT_IS_EDITED, true );
|
||||
```
|
||||
|
||||
### Common Attribute Examples
|
||||
|
||||
Reference in new issue
Block a user