14 |
14 |
15 class TemplateSingleVariableDialog(QDialog, Ui_TemplateSingleVariableDialog): |
15 class TemplateSingleVariableDialog(QDialog, Ui_TemplateSingleVariableDialog): |
16 """ |
16 """ |
17 Class implementing a dialog for entering a single template variable. |
17 Class implementing a dialog for entering a single template variable. |
18 """ |
18 """ |
|
19 |
19 def __init__(self, variable, parent=None): |
20 def __init__(self, variable, parent=None): |
20 """ |
21 """ |
21 Constructor |
22 Constructor |
22 |
23 |
23 @param variable template variable name (string) |
24 @param variable template variable name (string) |
24 @param parent parent widget of this dialog (QWidget) |
25 @param parent parent widget of this dialog (QWidget) |
25 """ |
26 """ |
26 super().__init__(parent) |
27 super().__init__(parent) |
27 self.setupUi(self) |
28 self.setupUi(self) |
28 |
29 |
29 self.variableLabel.setText(variable) |
30 self.variableLabel.setText(variable) |
30 |
31 |
31 def getVariable(self): |
32 def getVariable(self): |
32 """ |
33 """ |
33 Public method to get the value for the variable. |
34 Public method to get the value for the variable. |
34 |
35 |
35 @return value for the template variable (string) |
36 @return value for the template variable (string) |
36 """ |
37 """ |
37 return self.variableEdit.toPlainText() |
38 return self.variableEdit.toPlainText() |