src/eric7/Plugins/VcsPlugins/vcsMercurial/QueuesExtension/HgQueuesFoldDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
23 23
24 def __init__(self, patchesList, parent=None): 24 def __init__(self, patchesList, parent=None):
25 """ 25 """
26 Constructor 26 Constructor
27 27
28 @param patchesList list of patches to select from (list of strings) 28 @param patchesList list of patches to select from
29 @param parent reference to the parent widget (QWidget) 29 @type list of str
30 @param parent reference to the parent widget
31 @type QWidget
30 """ 32 """
31 super().__init__(parent) 33 super().__init__(parent)
32 self.setupUi(self) 34 self.setupUi(self)
33 35
34 self.addButton.setIcon(EricPixmapCache.getIcon("plus")) 36 self.addButton.setIcon(EricPixmapCache.getIcon("plus"))
117 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) 119 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
118 def on_sourcePatches_currentItemChanged(self, current, previous): 120 def on_sourcePatches_currentItemChanged(self, current, previous):
119 """ 121 """
120 Private slot to react on changes of the current item of source patches. 122 Private slot to react on changes of the current item of source patches.
121 123
122 @param current reference to the new current item (QTreeWidgetItem) 124 @param current reference to the new current item
125 @type QTreeWidgetItem
123 @param previous reference to the previous current item 126 @param previous reference to the previous current item
124 (QTreeWidgetItem) 127 @type QTreeWidgetItem
125 """ 128 """
126 self.addButton.setEnabled(current is not None) 129 self.addButton.setEnabled(current is not None)
127 130
128 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem) 131 @pyqtSlot(QTreeWidgetItem, QTreeWidgetItem)
129 def on_selectedPatches_currentItemChanged(self, current, previous): 132 def on_selectedPatches_currentItemChanged(self, current, previous):
130 """ 133 """
131 Private slot to react on changes of the current item of selected 134 Private slot to react on changes of the current item of selected
132 patches. 135 patches.
133 136
134 @param current reference to the new current item (QTreeWidgetItem) 137 @param current reference to the new current item
138 @type QTreeWidgetItem
135 @param previous reference to the previous current item 139 @param previous reference to the previous current item
136 (QTreeWidgetItem) 140 @type QTreeWidgetItem
137 """ 141 """
138 self.removeButton.setEnabled(current is not None) 142 self.removeButton.setEnabled(current is not None)
139 143
140 row = self.selectedPatches.indexOfTopLevelItem(current) 144 row = self.selectedPatches.indexOfTopLevelItem(current)
141 self.upButton.setEnabled(row > 0) 145 self.upButton.setEnabled(row > 0)
144 def getData(self): 148 def getData(self):
145 """ 149 """
146 Public method to retrieve the entered data. 150 Public method to retrieve the entered data.
147 151
148 @return tuple of commit message and list of selected patches 152 @return tuple of commit message and list of selected patches
149 (string, list of strings) 153 @rtype tuple of (str, list of str)
150 """ 154 """
151 patchesList = [] 155 patchesList = []
152 for row in range(self.selectedPatches.topLevelItemCount()): 156 for row in range(self.selectedPatches.topLevelItemCount()):
153 patchesList.append(self.selectedPatches.topLevelItem(row).text(0)) 157 patchesList.append(self.selectedPatches.topLevelItem(row).text(0))
154 158

eric ide

mercurial