ProjectDjango/DjangoDiffsettingsDataDialog.py

branch
eric7
changeset 180
64339135bd61
parent 175
30cb5e553e7e
child 190
f394b11f9f31
equal deleted inserted replaced
179:8413c2429808 180:64339135bd61
15 class DjangoDiffsettingsDataDialog(QDialog, Ui_DjangoDiffsettingsDataDialog): 15 class DjangoDiffsettingsDataDialog(QDialog, Ui_DjangoDiffsettingsDataDialog):
16 """ 16 """
17 Class implementing a dialog to enter the data for the 'diffsettings' 17 Class implementing a dialog to enter the data for the 'diffsettings'
18 command. 18 command.
19 """ 19 """
20
20 def __init__(self, django, parent=None): 21 def __init__(self, django, parent=None):
21 """ 22 """
22 Constructor 23 Constructor
23 24
24 @param django reference to the Django project object 25 @param django reference to the Django project object
25 @type Project 26 @type Project
26 @param parent reference to the parent widget 27 @param parent reference to the parent widget
27 @type QWidget 28 @type QWidget
28 """ 29 """
29 super().__init__(parent) 30 super().__init__(parent)
30 self.setupUi(self) 31 self.setupUi(self)
31 32
32 self.formatComboBox.addItem(self.tr("Hash Format"), "hash") 33 self.formatComboBox.addItem(self.tr("Hash Format"), "hash")
33 self.formatComboBox.addItem(self.tr("Unified Diff"), "unified") 34 self.formatComboBox.addItem(self.tr("Unified Diff"), "unified")
34 35
35 msh = self.minimumSizeHint() 36 msh = self.minimumSizeHint()
36 self.resize(max(self.width(), msh.width()), msh.height()) 37 self.resize(max(self.width(), msh.width()), msh.height())
37 38
38 def getData(self): 39 def getData(self):
39 """ 40 """
40 Public method to get the dialog data. 41 Public method to get the dialog data.
41 42
42 @return tuple containing a flag indicating to show all settings, 43 @return tuple containing a flag indicating to show all settings,
43 the name of a module containing the default settings and the 44 the name of a module containing the default settings and the
44 output format 45 output format
45 @rtype tuple of (bool, str, str) 46 @rtype tuple of (bool, str, str)
46 """ 47 """
47 outputFormat = self.formatComboBox.itemData( 48 outputFormat = self.formatComboBox.itemData(self.formatComboBox.currentIndex())
48 self.formatComboBox.currentIndex()) 49
49 50 return (self.allCheckBox.isChecked(), self.defaultEdit.text(), outputFormat)
50 return (self.allCheckBox.isChecked(), self.defaultEdit.text(),
51 outputFormat)

eric ide

mercurial