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

Cory Quammen cory.quammen at kitware.com
Tue Dec 6 11:15:47 EST 2016


David,

Sweet!. Thanks for following up.

Cory

On Tue, Dec 6, 2016 at 11:11 AM, David Lawrie <dlawrie at ara.co.uk> wrote:
> Hi Cory,
>
> Thanks for the pointer to the pqIntVectorPropertyWidget.
> I was able to see how the box was being populated by the xml and incorporate that into the custom widget which got it working.
>
>
> -----Original Message-----
> From: Cory Quammen [mailto:cory.quammen at kitware.com]
> Sent: 05 December 2016 18:58
> To: David Lawrie
> Cc: paraview-developers at paraview.org
> Subject: Re: [Paraview-developers] Panel widget combo box not reading enumerationdomain xml
>
> David,
>
> I think you might need
>
>       this->addPropertyLink(
>         adaptor, "currentText", SIGNAL(currentTextChanged(QString)),
> smproperty);
>       this->setChangeAvailableAsChangeFinished(true);
>
> instead of the property link you have provided. You may also need to populate the combobox with the XML values explicitly. See
> pqIntVectorPropertyWidget.cxx:156-178 for how the standard combobox with an enumeration domain works. That ought to help you out with your custom widget.
>
> Hope that helps,
> Cory
>
> On Thu, Nov 24, 2016 at 9:12 AM, David Lawrie <dlawrie at ara.co.uk> wrote:
>> 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
>>
>> **********************************************************************
>>
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Search the list archives at:
>> http://markmail.org/search/?q=Paraview-developers
>>
>> Follow this link to subscribe/unsubscribe:
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>
> **********************************************************************
> 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
>
> **********************************************************************



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the Paraview-developers mailing list