E5Gui/E5TreeView.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
2 2
3 # Copyright (c) 2009 - 2011 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2009 - 2011 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing specialized tree views. 7 Module implementing specialized tree views.
8 """ 8 """
9 9
10 from PyQt4.QtCore import Qt 10 from PyQt4.QtCore import Qt
11 from PyQt4.QtGui import QTreeView 11 from PyQt4.QtGui import QTreeView
12
12 13
13 class E5TreeView(QTreeView): 14 class E5TreeView(QTreeView):
14 """ 15 """
15 Class implementing a tree view supporting removal of entries. 16 Class implementing a tree view supporting removal of entries.
16 """ 17 """
44 def removeAll(self): 45 def removeAll(self):
45 """ 46 """
46 Public method to clear the view. 47 Public method to clear the view.
47 """ 48 """
48 if self.model() is not None: 49 if self.model() is not None:
49 self.model().removeRows(0, self.model().rowCount(self.rootIndex()), 50 self.model().removeRows(0, self.model().rowCount(self.rootIndex()),
50 self.rootIndex()) 51 self.rootIndex())

eric ide

mercurial