src/eric7/Plugins/VcsPlugins/vcsGit/GitBranchPushDialog.py

branch
eric7
changeset 10438
4cd7e5a8b3cf
parent 9971
773ad1f1ed22
child 10439
21c28b0f9e41
equal deleted inserted replaced
10437:2f70ca07f0af 10438:4cd7e5a8b3cf
20 20
21 def __init__(self, branches, remotes, delete=False, parent=None): 21 def __init__(self, branches, remotes, delete=False, parent=None):
22 """ 22 """
23 Constructor 23 Constructor
24 24
25 @param branches list of branch names (list of string) 25 @param branches list of branch names
26 @param remotes list of remote names (list of string) 26 @type list of str
27 @param delete flag indicating a delete branch action (boolean) 27 @param remotes list of remote names
28 @param parent reference to the parent widget (QWidget) 28 @type list of str
29 @param delete flag indicating a delete branch action
30 @type bool
31 @param parent reference to the parent widget
32 @type QWidget
29 """ 33 """
30 super().__init__(parent) 34 super().__init__(parent)
31 self.setupUi(self) 35 self.setupUi(self)
32 36
33 self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok) 37 self.__okButton = self.buttonBox.button(QDialogButtonBox.StandardButton.Ok)
60 @pyqtSlot(str) 64 @pyqtSlot(str)
61 def on_branchComboBox_editTextChanged(self, txt): 65 def on_branchComboBox_editTextChanged(self, txt):
62 """ 66 """
63 Private slot to handle a change of the branch name. 67 Private slot to handle a change of the branch name.
64 68
65 @param txt branch name (string) 69 @param txt branch name
70 @type str
66 """ 71 """
67 self.__okButton.setEnabled(bool(txt)) 72 self.__okButton.setEnabled(bool(txt))
68 73
69 def getData(self): 74 def getData(self):
70 """ 75 """
71 Public method to get the selected data. 76 Public method to get the selected data.
72 77
73 @return tuple of selected branch name, remote name and a flag 78 @return tuple of selected branch name, remote name and a flag
74 indicating all branches (tuple of two strings and a boolean) 79 indicating all branches
80 @rtype tuple of (str, str, bool)
75 """ 81 """
76 return ( 82 return (
77 self.branchComboBox.currentText(), 83 self.branchComboBox.currentText(),
78 self.remoteComboBox.currentText(), 84 self.remoteComboBox.currentText(),
79 self.branchComboBox.currentText() == self.__allBranches, 85 self.branchComboBox.currentText() == self.__allBranches,

eric ide

mercurial