37 """ |
37 """ |
38 if index.row() < 0 or index.row() >= self.rowCount(index.parent()): |
38 if index.row() < 0 or index.row() >= self.rowCount(index.parent()): |
39 return None |
39 return None |
40 |
40 |
41 if role == Qt.ToolTipRole: |
41 if role == Qt.ToolTipRole: |
42 if self.__manager.downloads()[index.row()].downloadedSuccessfully(): |
42 if self.__manager.downloads()[index.row()]\ |
|
43 .downloadedSuccessfully(): |
43 return self.__manager.downloads()[index.row()].getInfoData() |
44 return self.__manager.downloads()[index.row()].getInfoData() |
44 |
45 |
45 return None |
46 return None |
46 |
47 |
47 def rowCount(self, parent=QModelIndex()): |
48 def rowCount(self, parent=QModelIndex()): |
60 """ |
61 """ |
61 Public method to remove bookmarks from the model. |
62 Public method to remove bookmarks from the model. |
62 |
63 |
63 @param row row of the first bookmark to remove (integer) |
64 @param row row of the first bookmark to remove (integer) |
64 @param count number of bookmarks to remove (integer) |
65 @param count number of bookmarks to remove (integer) |
65 @param index of the parent bookmark node (QModelIndex) |
66 @param parent index of the parent bookmark node (QModelIndex) |
66 @return flag indicating successful removal (boolean) |
67 @return flag indicating successful removal (boolean) |
67 """ |
68 """ |
68 if parent.isValid(): |
69 if parent.isValid(): |
69 return False |
70 return False |
70 |
71 |