Create a property group for combining a standard property widget with a checkbox.
Load the attached plugin xml from Tools | Manage Plugins, Load New....
This adds a new source called CustomSource. Create this source from the Sources menu.
The panel looks as follows:
We don't want it to look like that. What we want is to add a new custom property group widget that combines the checkbox and a corresponding property (in this example, the checkbox for Enable Property A and Property A, or Enable Property B and Property B) so that the check is placed next to the main property widget e.g.
Notice how the widget is disabled when the checkbox is unchecked.
In the plugin XML, I've added a potential property group as follows:
<PropertyGroup panel_widget="EnablePair"> <Property name="PropertyA" function="Property" /> <Property name="EnablePropertyA" function="Enable" /> </PropertyGroup> <PropertyGroup panel_widget="EnablePair"> <Property name="PropertyB" function="Property" /> <Property name="EnablePropertyB" function="Enable" /> </PropertyGroup>
You need to add a custom
pqPropertyWidget subclass to support this new widget type that I am calling
EnablePair. Feel free to choose a better name.
Custom property group widgets are defined/added in
pqPropertyWidget subclass must be registered with this method so that ParaView will use it when it encounters
panel_widget="EnablePair" for a property-group.