ProjectWeb/Html5ToCss3ConverterParameterDialog.py

Wed, 30 Dec 2020 11:02:10 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:02:10 +0100
changeset 34
a6d8718f37b5
parent 30
38092622e612
child 35
a3f1dcf94fe4
permissions
-rw-r--r--

Updated copyright for 2021.

1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
34
a6d8718f37b5 Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 30
diff changeset
3 # Copyright (c) 2014 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a dialog to enter the CSS conversion parameters.
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
10 from PyQt5.QtWidgets import QDialog
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
30
38092622e612 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 29
diff changeset
12 from .Ui_Html5ToCss3ConverterParameterDialog import (
1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
13 Ui_Html5ToCss3ConverterParameterDialog
30
38092622e612 Removed support for Python2.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 29
diff changeset
14 )
1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
16
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17 class Html5ToCss3ConverterParameterDialog(
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 QDialog, Ui_Html5ToCss3ConverterParameterDialog):
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 Class implementing a dialog to enter the CSS conversion parameters.
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 def __init__(self, parent=None):
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Constructor
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 @param parent reference to the parent widget (QWidget)
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 super(Html5ToCss3ConverterParameterDialog, self).__init__(parent)
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 self.setupUi(self)
2
917f93fc61dd A little improvement to the HTML5 to CSS3 conversion parameter dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1
diff changeset
30
917f93fc61dd A little improvement to the HTML5 to CSS3 conversion parameter dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1
diff changeset
31 msh = self.minimumSizeHint()
917f93fc61dd A little improvement to the HTML5 to CSS3 conversion parameter dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1
diff changeset
32 self.resize(max(self.width(), msh.width()), msh.height())
1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 def getData(self):
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 Public method to get the entered data.
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38 @return tuple of indentation string (string) and a flag indicating to
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 use CSS placeholders (boolean)
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 placeholders = self.placeholderComboBox.currentIndex() == 1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 return " " * self.indentationSpinBox.value(), placeholders

eric ide

mercurial