26 def __init__(self, vcs, repodir, parent=None): |
26 def __init__(self, vcs, repodir, parent=None): |
27 """ |
27 """ |
28 Constructor |
28 Constructor |
29 |
29 |
30 @param vcs reference to the git object |
30 @param vcs reference to the git object |
31 @param repodir directory name of the local repository (string) |
31 @type Git |
32 @param parent reference to the parent widget (QWidget) |
32 @param repodir directory name of the local repository |
|
33 @type str |
|
34 @param parent reference to the parent widget |
|
35 @type QWidget |
33 """ |
36 """ |
34 super().__init__(parent) |
37 super().__init__(parent) |
35 self.setupUi(self) |
38 self.setupUi(self) |
36 |
39 |
37 self.__vcs = vcs |
40 self.__vcs = vcs |
84 @pyqtSlot(str) |
87 @pyqtSlot(str) |
85 def on_remotesComboBox_currentTextChanged(self, txt): |
88 def on_remotesComboBox_currentTextChanged(self, txt): |
86 """ |
89 """ |
87 Private slot to handle changes of the selected repository. |
90 Private slot to handle changes of the selected repository. |
88 |
91 |
89 @param txt current text of the combo box (string) |
92 @param txt current text of the combo box |
|
93 @type str |
90 """ |
94 """ |
91 self.remoteEdit.setText(self.__repos[txt]) |
95 self.remoteEdit.setText(self.__repos[txt]) |
92 |
96 |
93 for row in range(self.branchesTree.topLevelItemCount()): |
97 for row in range(self.branchesTree.topLevelItemCount()): |
94 itm = self.branchesTree.topLevelItem(row) |
98 itm = self.branchesTree.topLevelItem(row) |
109 @pyqtSlot(QTreeWidgetItem, int) |
113 @pyqtSlot(QTreeWidgetItem, int) |
110 def on_branchesTree_itemChanged(self, item, column): |
114 def on_branchesTree_itemChanged(self, item, column): |
111 """ |
115 """ |
112 Private slot handling changes of a branch item. |
116 Private slot handling changes of a branch item. |
113 |
117 |
114 @param item reference to the changed item (QTreeWidgetItem) |
118 @param item reference to the changed item |
115 @param column changed column (integer) |
119 @type QTreeWidgetItem |
|
120 @param column changed column |
|
121 @type int |
116 """ |
122 """ |
117 if column == GitPushDialog.PushColumn: |
123 if column == GitPushDialog.PushColumn: |
118 # step 1: set the item's remote branch, if it is empty |
124 # step 1: set the item's remote branch, if it is empty |
119 if item.checkState(GitPushDialog.PushColumn) == Qt.CheckState.Checked and ( |
125 if item.checkState(GitPushDialog.PushColumn) == Qt.CheckState.Checked and ( |
120 self.branchesTree.itemWidget( |
126 self.branchesTree.itemWidget( |
150 @pyqtSlot(int) |
156 @pyqtSlot(int) |
151 def on_selectAllCheckBox_stateChanged(self, state): |
157 def on_selectAllCheckBox_stateChanged(self, state): |
152 """ |
158 """ |
153 Private slot to select/deselect all branch items. |
159 Private slot to select/deselect all branch items. |
154 |
160 |
155 @param state check state of the check box (Qt.CheckState) |
161 @param state check state of the check box |
|
162 @type Qt.CheckState |
156 """ |
163 """ |
157 if state != Qt.CheckState.PartiallyChecked: |
164 if state != Qt.CheckState.PartiallyChecked: |
158 for row in range(self.branchesTree.topLevelItemCount()): |
165 for row in range(self.branchesTree.topLevelItemCount()): |
159 itm = self.branchesTree.topLevelItem(row) |
166 itm = self.branchesTree.topLevelItem(row) |
160 if itm.checkState(GitPushDialog.PushColumn) != state: |
167 if itm.checkState(GitPushDialog.PushColumn) != state: |