Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ParaView ParaView
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1,965
    • Issues 1,965
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 97
    • Merge requests 97
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ParaViewParaView
  • ParaViewParaView
  • Issues
  • #19984
Closed
Open
Issue created Jun 10, 2020 by Utkarsh Ayachit@utkarsh.ayachit⛰Contributor

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:

image

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.

image

Notice how the widget is disabled when the checkbox is unchecked.

Developer notes

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 pqStandardPropertyWidgetInterface::createWidgetForPropertyGroup. Your pqPropertyWidget subclass must be registered with this method so that ParaView will use it when it encounters panel_widget="EnablePair" for a property-group.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking