Add the ability to model a group of conditions
Consider a Group Item consisting of a set of optional items. The designer want to stipulate that at least n options should be enabled for the Group Item to be considered valid.
Possible Group Item Definition Changes
- Add a property to indicate that the group is a set of conditions
- This would automatically add isOptional to all of the group’s item definitions so the designer would not have to do so.
- This would allow the use of Item Blocks w/o forcing the designer of adding the isOptional property in the Item Block itself.
- Add a property to indicate the number of “relevant” optional children items should be enabled in order for the group to be considered valid
There may be the need for the Group Item to have a different number of conditions items to be enabled.
Possible Group Item Changes
- Add a property to override the number of “relevant” optional children items should be enabled in order for the group to be considered valid
Possible Qt Changes
How to indicate to the user that he/she hasn’t selected enough options
- Could put the alert icon next to the group name with a tooltip
- Could put text in red saying “Please choose n” in read next to the group’s label
- When satisfied , the text could go black or go away.
- GroupItemDefintion::setConditionalRange(unsigned int minNumber, unsigned int maxNumber) - if maxNumber is 0 then there is no maximum;
- GroupItem::setConditionalRange(unsigned int minNumber, unsigned int maxNumber) - overrides the values specified in the GroupItemDefinition
Suggested XML Format
<Group Name="options" Label="OptionsTest" Optional="true" IsEnabledByDefault="false" OptionalChoices="true" "MinNumberRequiredChoices="1" "MaxNumberRequiredChoices="0"> <ItemDefinitions> <String Name="opt1"/> <Int Name="opt2"/> <Double Name="opt3"/> </ItemDefinitions> </Group>