7 Module implementing a dialog to enter the JavaScript conversion parameters. |
7 Module implementing a dialog to enter the JavaScript conversion parameters. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtWidgets import QDialog |
10 from PyQt6.QtWidgets import QDialog |
11 |
11 |
12 from .Ui_Html5ToJsConverterParameterDialog import ( |
12 from .Ui_Html5ToJsConverterParameterDialog import Ui_Html5ToJsConverterParameterDialog |
13 Ui_Html5ToJsConverterParameterDialog |
|
14 ) |
|
15 |
13 |
16 |
14 |
17 class Html5ToJsConverterParameterDialog( |
15 class Html5ToJsConverterParameterDialog(QDialog, Ui_Html5ToJsConverterParameterDialog): |
18 QDialog, Ui_Html5ToJsConverterParameterDialog): |
|
19 """ |
16 """ |
20 Class implementing a dialog to enter the JavaScript conversion parameters. |
17 Class implementing a dialog to enter the JavaScript conversion parameters. |
21 """ |
18 """ |
|
19 |
22 def __init__(self, parent=None): |
20 def __init__(self, parent=None): |
23 """ |
21 """ |
24 Constructor |
22 Constructor |
25 |
23 |
26 @param parent reference to the parent widget |
24 @param parent reference to the parent widget |
27 @type QWidget |
25 @type QWidget |
28 """ |
26 """ |
29 super().__init__(parent) |
27 super().__init__(parent) |
30 self.setupUi(self) |
28 self.setupUi(self) |
31 |
29 |
32 msh = self.minimumSizeHint() |
30 msh = self.minimumSizeHint() |
33 self.resize(max(self.width(), msh.width()), msh.height()) |
31 self.resize(max(self.width(), msh.width()), msh.height()) |
34 |
32 |
35 def getData(self): |
33 def getData(self): |
36 """ |
34 """ |
37 Public method to get the entered data. |
35 Public method to get the entered data. |
38 |
36 |
39 @return tuple of indentation string and a flag indicating to enclose |
37 @return tuple of indentation string and a flag indicating to enclose |
40 the code by 'script' tags |
38 the code by 'script' tags |
41 @rtype tuple of (str, bool) |
39 @rtype tuple of (str, bool) |
42 """ |
40 """ |
43 return (" " * self.indentationSpinBox.value(), |
41 return (" " * self.indentationSpinBox.value(), self.scriptCheckBox.isChecked()) |
44 self.scriptCheckBox.isChecked()) |
|