[Paraview-developers] What widget is used for the the check box selection?

Joshua Murphy Joshua.Murphy at lasp.colorado.edu
Mon Aug 26 14:25:54 EDT 2013


Hello,

My Apologies.  I guess I did not state my question very well.

I am writing a custom Property Panel, and I have need for a tree-structure
widget with check-boxes for activation.  These are used in places such as
the array status selector, and the multi-block status/selector boxes.

I am trying to ascertain what widgets, within the ParaView source, are
utilized to make these selection boxes, so that I may call them for my own
Property panels (thus giving a continuity of style).

The following image shows what I am trying to get at.






If someone can point me to the source code to accomplish this, I would be
grateful!

Thanks

Josh



Joshua J. Murphy
Computer Scientist
Laboratory for Atmospheric and Space Physics
University of Colorado, Boulder




On 8/22/13 6:27 PM, "Cory Quammen" <cquammen at cs.unc.edu> wrote:

>Hi Josh,
>
>Do you have a custom filter/source you are writing as a plugin? If so,
>you just need to define certain methods in your filter/source and
>configure your plugin XML a certain way.
>
>Say you want to have checkboxes selecting a subset of point data
>arrays from the input. The methods you need are:
>
>  // Description:
>  // Get number of point data arrays
>  int GetNumberOfPointArrays();
>
>  // Description:
>  // Get name of a point data array at index
>  const char* GetPointArrayName(int index);
>
>  // Description:
>  // Get/set the status of a point data array of a given name
>  void SetPointArrayStatus(const char *name, int status);
>  int GetPointArrayStatus(const char *name);
>
>Now in the XML for your filter, you need something like this:
>
>      <StringVectorProperty information_only="1"
>                            name="PointArrayInfo">
>        <ArraySelectionInformationHelper attribute_name="Point" />
>      </StringVectorProperty>
>      <StringVectorProperty command="SetPointArrayStatus"
>                            element_types="2 0"
>                            information_property="PointArrayInfo"
>                            label="Point Arrays to Evaluate"
>                            name="ArrayStatus"
>                            number_of_elements="0"
>                            number_of_elements_per_command="2"
>                            panel_visibility="default"
>                            repeat_command="1">
>        <ArraySelectionDomain name="array_list">
>          <RequiredProperties>
>            <Property function="ArrayList"
>                      name="PointArrayInfo" />
>          </RequiredProperties>
>          </ArraySelectionDomain>
>        <Documentation>
>        </Documentation>
>      </StringVectorProperty>
>
>I cribbed this from the XML descriptions in one of the readers in
>ParaView/ParaViewCore/ServerManager/SMApplication/Resources/readers.xml
>
>I hope that helps,
>
>Cory
>
>On Thu, Aug 22, 2013 at 6:16 PM, Joshua Murphy
><Joshua.Murphy at lasp.colorado.edu> wrote:
>> Hello,
>>
>> I am trying to figure out what widget is used to create the check-box
>> selection panels, such as the array selection panels in the readers?  I
>>am
>> trying to write a custom panel that utilizes the checkbox panels, and I
>> haven't been able to figure out how it works.
>>
>> If someone could point me toward the code for the array selection
>>properties
>> panel, I would be grateful!
>>
>> Thanks,
>> Josh
>>
>>
>> _______________________________________________
>> Paraview-developers mailing list
>> Paraview-developers at paraview.org
>> http://public.kitware.com/mailman/listinfo/paraview-developers
>>
>
>
>
>-- 
>Cory Quammen
>Research Associate
>Department of Computer Science
>The University of North Carolina at Chapel Hill

-------------- next part --------------
A non-text attachment was scrubbed...
Name: default.png
Type: image/png
Size: 20557 bytes
Desc: default.png
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130826/ff7bf040/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: default[1][1].png
Type: image/png
Size: 20557 bytes
Desc: default[1][1].png
URL: <http://public.kitware.com/pipermail/paraview-developers/attachments/20130826/ff7bf040/attachment-0003.png>


More information about the Paraview-developers mailing list