cim-unito / MITK

MITK - unofficial, customized version
http://www.mitk.org/wiki
1 stars 0 forks source link

Tri-state checkbox for Data Manager view items #16

Closed espakm closed 12 years ago

espakm commented 13 years ago

If a subtree is collapsed in the Data Manager view then you cannot see if a sub-node is selected or not.

It is confusing since if the root item of the subtree is not checked then you may except that the elements in that sub-tree are not visible. If you want to be sure that no other nodes are visible then what you want to see, you have to keep all the tree items unfolded.

There is a "tristate" property for QCheckBox. If a node is not visible but contains sum subnodes that are, then this node can be made "partially checked".

espakm commented 12 years ago

I solved this in my plugin. Instead of tri-state checkboxes, I just change the visibility of the "grouping" nodes (those that contain no data). If a node is checked visible, its parent grouping nodes are turned on. Similarly, if a grouping node is turned of, every subnode of it is turned off.