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

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9653
e67609152c5e
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
14 14
15 class GitStashDataDialog(QDialog, Ui_GitStashDataDialog): 15 class GitStashDataDialog(QDialog, Ui_GitStashDataDialog):
16 """ 16 """
17 Class implementing a dialog to enter the data for a stash operation. 17 Class implementing a dialog to enter the data for a stash operation.
18 """ 18 """
19
19 NoUntracked = 0 20 NoUntracked = 0
20 UntrackedOnly = 1 21 UntrackedOnly = 1
21 UntrackedAndIgnored = 2 22 UntrackedAndIgnored = 2
22 23
23 def __init__(self, parent=None): 24 def __init__(self, parent=None):
24 """ 25 """
25 Constructor 26 Constructor
26 27
27 @param parent reference to the parent widget (QWidget) 28 @param parent reference to the parent widget (QWidget)
28 """ 29 """
29 super().__init__(parent) 30 super().__init__(parent)
30 self.setupUi(self) 31 self.setupUi(self)
31 32
32 msh = self.minimumSizeHint() 33 msh = self.minimumSizeHint()
33 self.resize(max(self.width(), msh.width()), msh.height()) 34 self.resize(max(self.width(), msh.width()), msh.height())
34 35
35 def getData(self): 36 def getData(self):
36 """ 37 """
37 Public method to get the user data. 38 Public method to get the user data.
38 39
39 @return tuple containing the message (string), a flag indicating to 40 @return tuple containing the message (string), a flag indicating to
40 keep changes in the staging area (boolean) and an indication to 41 keep changes in the staging area (boolean) and an indication to
41 stash untracked and/or ignored files (integer) 42 stash untracked and/or ignored files (integer)
42 """ 43 """
43 if self.noneRadioButton.isChecked(): 44 if self.noneRadioButton.isChecked():
44 untracked = self.NoUntracked 45 untracked = self.NoUntracked
45 elif self.untrackedRadioButton.isChecked(): 46 elif self.untrackedRadioButton.isChecked():
46 untracked = self.UntrackedOnly 47 untracked = self.UntrackedOnly
47 else: 48 else:
48 untracked = self.UntrackedAndIgnored 49 untracked = self.UntrackedAndIgnored
49 50
50 return (self.messageEdit.text(), self.keepCheckBox.isChecked(), 51 return (self.messageEdit.text(), self.keepCheckBox.isChecked(), untracked)
51 untracked)

eric ide

mercurial