|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to enter the JavaScript conversion parameters. |
|
8 """ |
|
9 |
|
10 from PyQt5.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_Html5ToJsConverterParameterDialog import \ |
|
13 Ui_Html5ToJsConverterParameterDialog |
|
14 |
|
15 |
|
16 class Html5ToJsConverterParameterDialog( |
|
17 QDialog, Ui_Html5ToJsConverterParameterDialog): |
|
18 """ |
|
19 Class implementing a dialog to enter the JavaScript conversion parameters. |
|
20 """ |
|
21 def __init__(self, parent=None): |
|
22 """ |
|
23 Constructor |
|
24 |
|
25 @param parent reference to the parent widget (QWidget) |
|
26 """ |
|
27 super(Html5ToJsConverterParameterDialog, self).__init__(parent) |
|
28 self.setupUi(self) |
|
29 |
|
30 msh = self.minimumSizeHint() |
|
31 self.resize(max(self.width(), msh.width()), msh.height()) |
|
32 |
|
33 def getData(self): |
|
34 """ |
|
35 Public method to get the entered data. |
|
36 |
|
37 @return tuple of indentation string (string) and a flag indicating to |
|
38 enclose the code by 'script' tags (boolean) |
|
39 """ |
|
40 return (" " * self.indentationSpinBox.value(), |
|
41 self.scriptCheckBox.isChecked()) |