[Paraview] custom TreeWidgetitems in custom panel

Felipe Bordeu felipe.bordeu at ec-nantes.fr
Thu Mar 28 12:35:44 EDT 2013


Hello,

I have QTreeWidget derived class instance in my homemade reader (custom 
panel), managed automatically by ParaView (using the xml description), 
but the fields are alphabetically sort (1, 10, 100, 101, ..., 11, 
12,...) and  not numerically (1,2,3,...10,11,);

So a created a new a function "callbackcreateTreeWidgetItem" to create 
new treewidgetitems with the good "operator<" so my items are sorted in 
the right order. but I do not know how put all the bricks together to 
make this work . (I tried to do some reverse engineering on paraview 
sources "pqSelectionInspectorPanel.h/cxx").
*
*Ingredients: *
*** ***
*P <140331173311760>roductTreeWidget* PointArrayStatus;// (derived class 
from QTreeWidget) instance in my custom panel *
**
*the callback function (with the right signature) to create new items 
with the right "operator<":
QTreeWidgetItem* callbackTreeWidgetItem(QTreeWidget* parent, const 
QStringList& val);*
**
* I know that I have to use the pqSignalAdaptorTreeWidget but I dont 
know how.*

*Any ideas, hints ???*
*Thanks,*
*

-- 
Felipe Bordeu Weldt
Ingénieur de Recherche
-------------------------------------
Tél. : 33 (0)2 40 37 16 57
Fax. : 33 (0)2 40 74 74 06
Felipe.Bordeu at ec-nantes.fr
Institut GeM - UMR CNRS 6183
École Centrale Nantes
1 Rue de La Noë, 44321 Nantes, FRANCE
-------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130328/c8bab99f/attachment.htm>


More information about the ParaView mailing list