[Paraview] KWWidgets / GUI updates

Sebastien BARRE sebastien.barre at kitware.com
Mon Mar 21 13:09:55 EST 2005


Hi,

I sneaked in several hundreds small commits this week-end, so here is a 
little follow-up, in case your code is still conflicting with my changes, 
or if you are wondering what happened to a couple of classes or methods.

These changes are related to the ongoing effort to make KWWidgets (i.e. the 
PV/GUI/Widgets) a separate/standalone project. BTW, please refrain from 
putting anymore ParaView-related elements to Widgets/, add them to 
PV/GUI/Client instead. Thank you.

More infos can be found in PV/GUI/Widgets/README.txt

The commits were three-fold:

1) clean the vtkKWLabeled* widgets, i.e. a dozen or so classes that had 
more or less the same interface and needed to be unified/cleaned-up before 
they grow out of control. A "labeled widget" is a composite widget that 
allows developers to associate a label (vtkKWLabel) to another widget. 
Labeled widgets are now created automatically as subclasses of 
vtkKWWidgetLabeled by configuring some templates. They all follow the new 
classname pattern vtkKW*Labeled, and adopt the same API to manipulate the 
internal vtkKWLabel.

2) clean the vtkKW*Set widgets, i.e. again a good bunch of classes that had 
more or less the same interface and needed to be unified/cleaned-up before 
they grow out of control. A set of widgets is a basic container that allows 
developers to delegate allocation, deletion, creation and packing of 
multiple widgets to a single object called a set. Sets of widgets are 
useful in situations that require dynamic numbers of widgets. They can also 
be used to group related widgets together without maintaining ivars for 
each one of them. Sets of widgets are now created automatically as 
subclasses of vtkKWWidgetSet  by configuring some templates. The API to 
manipulate the widgets and control the layout has been unified.

3) the SetLabel(const char *) and SetText(const char *) methods were mixed 
and matched among the core widgets. Some buttons used SetLabel(), other 
SetText(). Some classes had inconsistent Set/Get pairs, e.g. vtkKWLabel* 
GetLabel(), and SetLabel(const char*). The SetText()  is now the only one 
in use for the core widgets. Composite widgets, including the labeled 
widgets mentioned above, may provide a SetLabelText() method as a shortcut 
to GetLabel()->SetText() for example.

Check the migrations notes in README.txt if you are lost, or contact me. 
This should be pretty straightforward though. Also check the Doxygen 
documentation:
	http://www.paraview.org/doc/nightly/html/classes.html

Thanks

--
Sebastien Barre



More information about the ParaView mailing list