ProjectWeb/Html5ToCss3ConverterParameterDialog.py

Thu, 10 Jan 2019 14:21:05 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 10 Jan 2019 14:21:05 +0100
changeset 28
ed9d3d3857af
parent 26
a2241ced2f9a
child 29
38577502d613
permissions
-rw-r--r--

Updated copyright for 2019.

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
28
ed9d3d3857af Updated copyright for 2019.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 26
diff changeset
3 # Copyright (c) 2014 - 2019 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
5
31bc1ef6f624 Added the HTML prettifier.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
10 from __future__ import unicode_literals
31bc1ef6f624 Added the HTML prettifier.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4
diff changeset
11
1
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
12 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
13
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14 from .Ui_Html5ToCss3ConverterParameterDialog import \
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
15 Ui_Html5ToCss3ConverterParameterDialog
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
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 class Html5ToCss3ConverterParameterDialog(
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 QDialog, Ui_Html5ToCss3ConverterParameterDialog):
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 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
22 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 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
24 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 Constructor
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 @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
28 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 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
30 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
31
917f93fc61dd A little improvement to the HTML5 to CSS3 conversion parameter dialog.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1
diff changeset
32 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
33 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
34
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 def getData(self):
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 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
38
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 @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
40 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
41 """
e3a92a671aa5 Added the 'Web' project type and the HTML5 to CSS3 converter.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 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
43 return " " * self.indentationSpinBox.value(), placeholders

eric ide

mercurial