src/eric7/Templates/TemplateMultipleVariablesDialog.py

branch
eric7
changeset 10431
64157aeb0312
parent 10373
093dcebe5ecb
child 10439
21c28b0f9e41
equal deleted inserted replaced
10430:e440aaf179ce 10431:64157aeb0312
32 32
33 def __init__(self, variables, parent=None): 33 def __init__(self, variables, parent=None):
34 """ 34 """
35 Constructor 35 Constructor
36 36
37 @param variables list of template variable names (list of strings) 37 @param variables list of template variable names
38 @param parent parent widget of this dialog (QWidget) 38 @type list of str
39 @param parent parent widget of this dialog
40 @type QWidget
39 """ 41 """
40 super().__init__(parent) 42 super().__init__(parent)
41 43
42 self.TemplateMultipleVariablesDialogLayout = QVBoxLayout(self) 44 self.TemplateMultipleVariablesDialogLayout = QVBoxLayout(self)
43 self.TemplateMultipleVariablesDialogLayout.setContentsMargins(6, 6, 6, 6) 45 self.TemplateMultipleVariablesDialogLayout.setContentsMargins(6, 6, 6, 6)
126 128
127 def getVariables(self): 129 def getVariables(self):
128 """ 130 """
129 Public method to get the values for all variables. 131 Public method to get the values for all variables.
130 132
131 @return dictionary with the variable as a key and its value (string) 133 @return dictionary with the variable as a key and its value
134 @rtype str
132 """ 135 """
133 values = {} 136 values = {}
134 for var, textEdit in self.variablesEntries.items(): 137 for var, textEdit in self.variablesEntries.items():
135 try: 138 try:
136 values[var] = textEdit.text() 139 values[var] = textEdit.text()

eric ide

mercurial