[Paraview] Using GUI element Scale
Jean M. Favre
jfavre at cscs.ch
Thu Jul 1 12:01:17 EDT 2004
Mattijs Janssens wrote:
> I need to define a time step selector so
>
> In my PVFoamReader.xml I have:
>
> <Scale variable="TimeStep"
> trace_name="TimeStep"
> type="int"
> label="Time step"
> range="0 1"
> default_value="0"
> display_entry="1"
> display_value="1"
> entry_and_label_on_top="0"
> help="Set the current time step."
> range_source="TimeStepRange" />
>
> which will setup a call to GetTimeStepRange to get the max and min for the
> slider.
you are close to the solution.
Your XML looks good.
your reader should include:
class VTK_IO_EXPORT vtkfoo : public vtk???
{
public:
vtkSetVector2Macro(TimeStepRange,int);
vtkGetVector2Macro(TimeStepRange,int);
protected:
int TimeStepRange[2];
};
and your *.cxx reader source code can do the following during the
ExecuteInformation phase:
this->SetTimeStepRange(0, this->NbTimeSteps-1);
It works for me. I use PV1.5 nightly.
Cheers
--
Dr. Jean M. Favre, email:favre @ cscs.ch
http://www.cscs.ch/about/Favre.php
CSCS, Swiss Center for Scientific Computing | Tel: +41 (91) 610.82.40
Via Cantonale, 6928 Manno, Switzerland | Fax: +41 (91) 610.82.82
More information about the ParaView
mailing list