29 def __init__(self, vcs, parent=None): |
29 def __init__(self, vcs, parent=None): |
30 """ |
30 """ |
31 Constructor |
31 Constructor |
32 |
32 |
33 @param vcs reference to the vcs object |
33 @param vcs reference to the vcs object |
34 @param parent parent widget (QWidget) |
34 @type Subversion |
|
35 @param parent parent widget |
|
36 @type QWidget |
35 """ |
37 """ |
36 super().__init__(parent) |
38 super().__init__(parent) |
37 self.setupUi(self) |
39 self.setupUi(self) |
38 SvnDialogMixin.__init__(self) |
40 SvnDialogMixin.__init__(self) |
39 self.setWindowFlags(Qt.WindowType.Window) |
41 self.setWindowFlags(Qt.WindowType.Window) |
100 |
103 |
101 def on_buttonBox_clicked(self, button): |
104 def on_buttonBox_clicked(self, button): |
102 """ |
105 """ |
103 Private slot called by a button of the button box clicked. |
106 Private slot called by a button of the button box clicked. |
104 |
107 |
105 @param button button that was clicked (QAbstractButton) |
108 @param button button that was clicked |
|
109 @type QAbstractButton |
106 """ |
110 """ |
107 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
111 if button == self.buttonBox.button(QDialogButtonBox.StandardButton.Close): |
108 self.close() |
112 self.close() |
109 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
113 elif button == self.buttonBox.button(QDialogButtonBox.StandardButton.Cancel): |
110 self.__finish() |
114 self.__finish() |
117 |
121 |
118 def __generateItem(self, revision, author, lineno, text): |
122 def __generateItem(self, revision, author, lineno, text): |
119 """ |
123 """ |
120 Private method to generate a blame item in the blame list. |
124 Private method to generate a blame item in the blame list. |
121 |
125 |
122 @param revision revision string (string) |
126 @param revision revision string |
123 @param author author of the change (string) |
127 @type str |
124 @param lineno linenumber (string) |
128 @param author author of the change |
125 @param text line of text from the annotated file (string) |
129 @type str |
|
130 @param lineno linenumber |
|
131 @type str |
|
132 @param text line of text from the annotated file |
|
133 @type str |
126 """ |
134 """ |
127 itm = QTreeWidgetItem( |
135 itm = QTreeWidgetItem( |
128 self.blameList, |
136 self.blameList, |
129 ["{0:d}".format(revision), author, "{0:d}".format(lineno), text], |
137 ["{0:d}".format(revision), author, "{0:d}".format(lineno), text], |
130 ) |
138 ) |
133 |
141 |
134 def __showError(self, msg): |
142 def __showError(self, msg): |
135 """ |
143 """ |
136 Private slot to show an error message. |
144 Private slot to show an error message. |
137 |
145 |
138 @param msg error message to show (string) |
146 @param msg error message to show |
|
147 @type str |
139 """ |
148 """ |
140 self.errorGroup.show() |
149 self.errorGroup.show() |
141 self.errors.insertPlainText(msg) |
150 self.errors.insertPlainText(msg) |
142 self.errors.ensureCursorVisible() |
151 self.errors.ensureCursorVisible() |