[Paraview] immediate_update for an information only property

Nehme Bilal nehmebilal at gmail.com
Sun Jun 7 13:35:41 EDT 2009


Hi all,

I am trying to do a progress bar in a filter. I did the following steps:
1- add an information only property to my xml to pass the progress
status to the client:

      <IntVectorProperty
        name="currentIteration"
        command="GetcurrentIteration"
        number_of_elements="1"
        information_only="1"
        default_values="0"
        immediate_update="1">
        <SimpleIntInformationHelper/>
      </IntVectorProperty>

2 - connect this property to a slot in the client to update the
progress bar value:

	this->currentIteration = vtkSMIntVectorProperty::SafeDownCast(
		this->proxy()->GetProperty("currentIteration"));
	this->QVTKConnect = vtkSmartPointer<vtkEventQtSlotConnect>::New();
	this->QVTKConnect->Connect(currentIteration, vtkCommand::ModifiedEvent,
		this, SLOT(updateProgressBar()),0,0, Qt::DirectConnection);

3- I update the value of the progress bar in the Slot:
void pqMyFilter::updateProgressBar()
{
	this->progressBar->setValue(this->currentIteration->GetElement(0));
	QCoreApplication::processEvents();
}

The value of the progress bar is updated only when requestData is
done. Is that mean the immediate_update of an
information only property doesn't work ?

Thank you !


More information about the ParaView mailing list