E5Gui/E5ModelMenu.py

changeset 461
34528aaedf1c
parent 55
b5c84934de9c
child 482
4650a72c307a
equal deleted inserted replaced
460:6a3899e91d76 461:34528aaedf1c
40 self._mouseButton = Qt.NoButton 40 self._mouseButton = Qt.NoButton
41 self._keyboardModifiers = Qt.KeyboardModifiers(Qt.NoModifier) 41 self._keyboardModifiers = Qt.KeyboardModifiers(Qt.NoModifier)
42 self.__dropRow = -1 42 self.__dropRow = -1
43 self.__dropIndex = None 43 self.__dropIndex = None
44 44
45 self.connect(self, SIGNAL("aboutToShow()"), self.__aboutToShow) 45 self.aboutToShow.connect(self.__aboutToShow)
46 self.connect(self, SIGNAL("triggered(QAction*)"), self.__actionTriggered) 46 self.connect(self, SIGNAL("triggered(QAction*)"), self.__actionTriggered)
47 47
48 def prePopulated(self): 48 def prePopulated(self):
49 """ 49 """
50 Public method to add any actions before the tree. 50 Public method to add any actions before the tree.
385 self.__model.removeRow(row, self.__root) 385 self.__model.removeRow(row, self.__root)
386 386
387 if not self.isAncestorOf(drag.target()): 387 if not self.isAncestorOf(drag.target()):
388 self.close() 388 self.close()
389 else: 389 else:
390 self.emit(SIGNAL("aboutToShow()")) 390 self.aboutToShow.emit()
391 391
392 def mouseReleaseEvent(self, evt): 392 def mouseReleaseEvent(self, evt):
393 """ 393 """
394 Protected method handling mouse release events. 394 Protected method handling mouse release events.
395 395
412 412
413 @param idx index of the entry to be removed (QModelIndex) 413 @param idx index of the entry to be removed (QModelIndex)
414 """ 414 """
415 row = idx.row() 415 row = idx.row()
416 self.__model.removeRow(row, self.__root) 416 self.__model.removeRow(row, self.__root)
417 self.emit(SIGNAL("aboutToShow()")) 417 self.aboutToShow.emit()

eric ide

mercurial