diff -r 917f93fc61dd -r e478a359e1fb ProjectWeb/Html5ToJsConverterParameterDialog.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ProjectWeb/Html5ToJsConverterParameterDialog.py Wed Dec 31 20:38:35 2014 +0100 @@ -0,0 +1,41 @@ +# -*- coding: utf-8 -*- + +# Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de> +# + +""" +Module implementing a dialog to enter the JavaScript conversion parameters. +""" + +from PyQt5.QtWidgets import QDialog + +from .Ui_Html5ToJsConverterParameterDialog import \ + Ui_Html5ToJsConverterParameterDialog + + +class Html5ToJsConverterParameterDialog( + QDialog, Ui_Html5ToJsConverterParameterDialog): + """ + Class implementing a dialog to enter the JavaScript conversion parameters. + """ + def __init__(self, parent=None): + """ + Constructor + + @param parent reference to the parent widget (QWidget) + """ + super(Html5ToJsConverterParameterDialog, self).__init__(parent) + self.setupUi(self) + + msh = self.minimumSizeHint() + self.resize(max(self.width(), msh.width()), msh.height()) + + def getData(self): + """ + Public method to get the entered data. + + @return tuple of indentation string (string) and a flag indicating to + enclose the code by 'script' tags (boolean) + """ + return (" " * self.indentationSpinBox.value(), + self.scriptCheckBox.isChecked())