ProjectWeb/Html5ToCss3ConverterParameterDialog.py

Sat, 26 Oct 2024 17:37:43 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 26 Oct 2024 17:37:43 +0200
branch
eric7
changeset 54
1b47d2b39f7c
parent 52
815847f3d404
child 56
d91d613bba96
permissions
-rw-r--r--

- changed to new style header
- changed code to ensure proper parent relationship of modal dialogs
- included compiled form files

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

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

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

from PyQt6.QtWidgets import QDialog

from .Ui_Html5ToCss3ConverterParameterDialog import (
    Ui_Html5ToCss3ConverterParameterDialog,
)


class Html5ToCss3ConverterParameterDialog(
    QDialog, Ui_Html5ToCss3ConverterParameterDialog
):
    """
    Class implementing a dialog to enter the CSS 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 use CSS
            placeholders
        @rtype tuple of (str, bool)
        """
        placeholders = self.placeholderComboBox.currentIndex() == 1
        return " " * self.indentationSpinBox.value(), placeholders

eric ide

mercurial