ProjectWeb/Html5ToJsConverterParameterDialog.py

Wed, 21 Sep 2022 15:36:01 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 21 Sep 2022 15:36:01 +0200
branch
eric7
changeset 43
2bed42620c99
parent 40
a9b17341d181
child 49
1910859bbacf
permissions
-rw-r--r--

Reformatted source code with 'Black'.

# -*- coding: utf-8 -*-

# Copyright (c) 2014 - 2022 Detlev Offenbach <detlev@die-offenbachs.de>
#

"""
Module implementing a dialog to enter the JavaScript conversion parameters.
"""

from PyQt6.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
        @type QWidget
        """
        super().__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 and a flag indicating to enclose
            the code by 'script' tags
        @rtype tuple of (str, bool)
        """
        return (" " * self.indentationSpinBox.value(), self.scriptCheckBox.isChecked())

eric ide

mercurial