106 @param url url of the entry (string) |
106 @param url url of the entry (string) |
107 @return reference to the generated item (QTreeWidgetItem) |
107 @return reference to the generated item (QTreeWidgetItem) |
108 """ |
108 """ |
109 path = repopath |
109 path = repopath |
110 |
110 |
111 itm = QTreeWidgetItem(self.parentItem, [ |
111 if revision == "": |
112 path, |
112 rev = "" |
113 revision, |
113 else: |
114 author, |
114 rev = int(revision) |
115 size, |
115 if size == "": |
116 date, |
116 sz = "" |
117 ]) |
117 else: |
|
118 sz = int(size) |
|
119 |
|
120 itm = QTreeWidgetItem(self.parentItem) |
|
121 itm.setData(0, Qt.DisplayRole, path) |
|
122 itm.setData(1, Qt.DisplayRole, rev) |
|
123 itm.setData(2, Qt.DisplayRole, author) |
|
124 itm.setData(3, Qt.DisplayRole, sz) |
|
125 itm.setData(4, Qt.DisplayRole, date) |
118 |
126 |
119 if nodekind == "dir": |
127 if nodekind == "dir": |
120 itm.setIcon(0, self.__dirIcon) |
128 itm.setIcon(0, self.__dirIcon) |
121 itm.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator) |
129 itm.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator) |
122 elif nodekind == "file": |
130 elif nodekind == "file": |