mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
ResInsight: Migrate commands, UI and application code to attribute map
This commit is contained in:
1 parent
064ac45da0
commit
43a4378cee
56 files changed
+153
-627
No files matched your search
@@ -18,7 +18,9 @@
|
||||
|
||||
#include "RiuTools.h"
|
||||
|
||||
#include "cafPdmFieldHandle.h"
|
||||
#include "cafPdmUiComboBoxEditor.h"
|
||||
#include "cafPdmUiFieldHandle.h"
|
||||
|
||||
#include <QMenu>
|
||||
#include <QObject>
|
||||
@@ -54,12 +56,10 @@ void RiuTools::enableAllActionsOnShow( QObject* object, QMenu* menu )
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RiuTools::enableUpDownArrowsForComboBox( caf::PdmUiEditorAttribute* attribute )
|
||||
void RiuTools::enableUpDownArrowsForComboBox( caf::PdmFieldHandle* field )
|
||||
{
|
||||
if ( auto attrib = dynamic_cast<caf::PdmUiComboBoxEditorAttribute*>( attribute ) )
|
||||
{
|
||||
attrib->nextIcon = QIcon( ":/ComboBoxDown.svg" );
|
||||
attrib->previousIcon = QIcon( ":/ComboBoxUp.svg" );
|
||||
attrib->showPreviousAndNextButtons = true;
|
||||
}
|
||||
auto* uiCapability = field->uiCapability();
|
||||
uiCapability->setAttribute( caf::PdmUiComboBoxEditor::Keys::NEXT_ICON, QIcon( ":/ComboBoxDown.svg" ) );
|
||||
uiCapability->setAttribute( caf::PdmUiComboBoxEditor::Keys::PREVIOUS_ICON, QIcon( ":/ComboBoxUp.svg" ) );
|
||||
uiCapability->setAttribute( caf::PdmUiComboBoxEditor::Keys::SHOW_PREVIOUS_AND_NEXT_BUTTONS, true );
|
||||
}
|
||||
Reference in new issue
Block a user