• Bob Obara's avatar
    ENH: Providing ability for better GUI control for attribute items · 71dfe1f9
    Bob Obara authored
    Added the ability to define Views for Attribute Items. This is supported in
    Attribute, Instanced, ModelEntityAttribute, and Operator View classes.  Group related views
    are not directly effected.
    
    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.
    71dfe1f9
qtAttributeRefItem.h 2.21 KB