36 |
36 |
37 @param vcs reference to the vcs object |
37 @param vcs reference to the vcs object |
38 @param mode mode of the dialog (string, "browse" or "select") |
38 @param mode mode of the dialog (string, "browse" or "select") |
39 @param parent parent widget (QWidget) |
39 @param parent parent widget (QWidget) |
40 """ |
40 """ |
41 super(SvnRepoBrowserDialog, self).__init__(parent) |
41 super().__init__(parent) |
42 self.setupUi(self) |
42 self.setupUi(self) |
43 self.setWindowFlags(Qt.WindowType.Window) |
43 self.setWindowFlags(Qt.WindowType.Window) |
44 |
44 |
45 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
45 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
46 self.repoTree.header().setSortIndicator(0, Qt.SortOrder.AscendingOrder) |
46 self.repoTree.header().setSortIndicator(0, Qt.SortOrder.AscendingOrder) |
120 @param date date info (string) |
120 @param date date info (string) |
121 @param nodekind node kind info (string, "dir" or "file") |
121 @param nodekind node kind info (string, "dir" or "file") |
122 @param url url of the entry (string) |
122 @param url url of the entry (string) |
123 @return reference to the generated item (QTreeWidgetItem) |
123 @return reference to the generated item (QTreeWidgetItem) |
124 """ |
124 """ |
125 path = repopath |
125 rev = "" if revision == "" else int(revision) |
126 |
126 sz = "" if size == "" else int(size) |
127 if revision == "": |
|
128 rev = "" |
|
129 else: |
|
130 rev = int(revision) |
|
131 if size == "": |
|
132 sz = "" |
|
133 else: |
|
134 sz = int(size) |
|
135 |
127 |
136 itm = QTreeWidgetItem(self.parentItem) |
128 itm = QTreeWidgetItem(self.parentItem) |
137 itm.setData(0, Qt.ItemDataRole.DisplayRole, path) |
129 itm.setData(0, Qt.ItemDataRole.DisplayRole, repopath) |
138 itm.setData(1, Qt.ItemDataRole.DisplayRole, rev) |
130 itm.setData(1, Qt.ItemDataRole.DisplayRole, rev) |
139 itm.setData(2, Qt.ItemDataRole.DisplayRole, author) |
131 itm.setData(2, Qt.ItemDataRole.DisplayRole, author) |
140 itm.setData(3, Qt.ItemDataRole.DisplayRole, sz) |
132 itm.setData(3, Qt.ItemDataRole.DisplayRole, sz) |
141 itm.setData(4, Qt.ItemDataRole.DisplayRole, date) |
133 itm.setData(4, Qt.ItemDataRole.DisplayRole, date) |
142 |
134 |
350 Public slot called when the dialog is accepted. |
342 Public slot called when the dialog is accepted. |
351 """ |
343 """ |
352 if self.focusWidget() == self.urlCombo: |
344 if self.focusWidget() == self.urlCombo: |
353 return |
345 return |
354 |
346 |
355 super(SvnRepoBrowserDialog, self).accept() |
347 super().accept() |
356 |
348 |
357 def getSelectedUrl(self): |
349 def getSelectedUrl(self): |
358 """ |
350 """ |
359 Public method to retrieve the selected repository URL. |
351 Public method to retrieve the selected repository URL. |
360 |
352 |