NexusSortFilterProxyModel
class¶
-
class
silx.gui.hdf5.
NexusSortFilterProxyModel
(parent=None)[source]¶ Bases:
PyQt4.QtGui.QSortFilterProxyModel
Try to sort items according to Nexus structure. Else sort by name.
-
lessThan
(sourceLeft, sourceRight)[source]¶ Returns True if the value of the item referred to by the given index sourceLeft is less than the value of the item referred to by the given index sourceRight, otherwise returns false.
Parameters: - sourceLeft (qt.QModelIndex) –
- sourceRight (qt.QModelIndex) –
Return type: bool
-
getWordsAndNumbers
(name)[source]¶ Returns a list of words and integers composing the name.
An input “aaa10bbb50.30” will return [“aaa”, 10, “bbb”, 50, ”.”, 30].
Parameters: name (str) – A name Return type: List
-
nameLessThan
(left, right)[source]¶ Returns True if the left string is less than the right string.
Number composing the names are compared as integers, as result “name2” is smaller than “name10”.
Parameters: - left (str) – A string
- right (str) – A string
Return type: bool
-
childDatasetLessThan
(left, right, childName)[source]¶ Reach the same children name of two items and compare their values.
Returns True if the left one is smaller than the right one.
Parameters: - left (Hdf5Item) – An item
- right (Hdf5Item) – An item
- childName (str) – Name of the children to search. Returns None if the children is not found.
Return type: bool
-