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() |