[Paraview] How to have QWidget change the "Accept" state when it changes

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon Mar 29 14:02:53 EDT 2010


All you really need it call setModified() on the pqObjectPanel
subclass every time the selection changes. That will enable the apply
button. Then override "accept()" and "reset()" methods to update the
servermanager-property using the selection  or vice-versa
respectively.

Utkarsh

On Mon, Mar 29, 2010 at 12:21 PM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
>  I have a custom reader panel that I am implementing. In the panel is a
> QListWidget that is filled with some integer values. The user can select
> any, some or none of them. The problem that I am having is that when the
> user changes their selection how do I trigger the "Accept" button to change
> state and thus when the "accept" button is clicked my new values will get
> passed back to the server.
>
>  It looks like I should use the pqPropertyManger::registerLink(...) method
> but I am not real sure what all the arguments should be. Any pointers to
> examples or other sources would be great. I tried to follow the
> pqContourFilterPanel but got lost in the implementation details.
>
> The PVSM XML that is being used is
> <IntVectorProperty
>  name="SelectedNeighborList"
>  command="SetSelectedNeighborList"
>  number_of_elements="0"
>  argument_is_array="1"
>  set_number_command="SetLoadNumberOfNeighbors"
>  repeat_command="0"
>  number_of_elements_per_command="1"
>  use_index="0">
>  <Documentation> This property lists the neighbors that will be loaded
>    in addition to the main grain</Documentation>
> </IntVectorProperty>
>
> Thanks
> ___________________________________________________________
> Mike Jackson                      www.bluequartz.net
> Principal Software Engineer       mike.jackson at bluequartz.net
> BlueQuartz Software               Dayton, Ohio
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>


More information about the ParaView mailing list