eric7/Templates/TemplateSingleVariableDialog.py

branch
eric7
changeset 8312
800c432b34c8
parent 8218
7c09585bd960
child 8318
962bce857696
equal deleted inserted replaced
8311:4e8b98454baa 8312:800c432b34c8
1 # -*- coding: utf-8 -*-
2
3 # Copyright (c) 2005 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4 #
5
6 """
7 Module implementing a dialog for entering a single template variable.
8 """
9
10 from PyQt5.QtWidgets import QDialog
11
12 from .Ui_TemplateSingleVariableDialog import Ui_TemplateSingleVariableDialog
13
14
15 class TemplateSingleVariableDialog(QDialog, Ui_TemplateSingleVariableDialog):
16 """
17 Class implementing a dialog for entering a single template variable.
18 """
19 def __init__(self, variable, parent=None):
20 """
21 Constructor
22
23 @param variable template variable name (string)
24 @param parent parent widget of this dialog (QWidget)
25 """
26 super().__init__(parent)
27 self.setupUi(self)
28
29 self.variableLabel.setText(variable)
30
31 def getVariable(self):
32 """
33 Public method to get the value for the variable.
34
35 @return value for the template variable (string)
36 """
37 return self.variableEdit.toPlainText()

eric ide

mercurial