[Paraview-developers] Panel widget combo box not reading enumerationdomain xml

David Lawrie dlawrie at ara.co.uk
Thu Nov 24 09:12:38 EST 2016


Hi,

I am trying to work out how to create custom panels using the panel_widget entry in PropertyGroups. I have created a simple
panel using QT designer and an associated class (subclassing pqPropertyGroupWidget). I use addPropertyLink to link the ui to
the paraview filter and then set up the servermanager xml.

This mostly seems to work, the initial values in the ui and the filter are as set in the xml and correctly update when I change them in
the ui.

However, one of the widget in the panel is a combo-box which I specify the entries of in the xml, this remains blank.

Below is a shortened example of the servermanager xml I am using and the addPropertyLink code I have used. Any hints as to where
I am going wrong, or what I might have missed out would be gratefully received.

<IntVectorProperty command="SetMode" name="SetMode" number_of_elements="1" default_values="1">
  <EnumerationDomain name="enum">
    <Entry text="First entry" value="1"/>
    <Entry text="Second entry" value="2"/>
  </EnumerationDomain>
</IntVectorProperty>

<PropertyGroup label="" panel_widget="MyPanel">
  ...
  <Property name="SetMode" function="LinkSetMode"/>
  ...
</PropertyGroup>

smproperty = smgroup->GetProperty("LinkSetMode");
if (smproperty != nullptr){
  this->addPropertyLink(this->Internals->ComboMode, "currentIndex", SIGNAL(activated(int)), smproperty);
}

**********************************************************************
Please consider the environment. Only print this email if absolutely necessary.

This email contains information that is private and confidential and is intended only for the addressee.
If you are not the intended recipient please delete it and notify us immediately by e-mailing the sender.
Note: All email sent to or from this address may be accessed by someone other than the recipient, for
system management and security reasons.
Aircraft Research Association Ltd.  Registered in England, Registration No 503668 Registered Office:
Manton Lane, Bedford MK41 7PF England VAT No GB 196351245

**********************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20161124/adac5054/attachment-0001.html>


More information about the Paraview-developers mailing list