Skip to content

ENH: Providing ability for better GUI control for attribute items

Added the ability to define Views for Attribute Items. Currently this is only supported by InstancedViews but this mechanism can be extended to all appropriate Views. Here is an example:

<View Type="Instanced" Title="Frequency Information">
  <InstancedAttributes>
    <Att Name="EigenSolver" Type="FrequencyInfo">
      <ItemViews>
        <View Item="NumEigenvalues" Type="Default" Option="SpinBox"/>
        <View Item="FrequencyShift" Option="SpinBox" StepSize="100" Decimals="0"/>
      </ItemViews>
    </Att>
  </InstancedAttributes>
</View>

The Item attribute is mandatory. If the Type attribute is missing then it is assumed to be Default. The rest of the information is then processed by the qtItem class that is being created. To demonstrate this I have added spinbox options for both IntItem and DoubleItem for their default qtItem class (qtInputsItem).

This mechanism can be extended to add custom GUI's for items.

Merge request reports