|
1 # -*- coding: utf-8 -*- |
|
2 |
|
3 # Copyright (c) 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
|
4 # |
|
5 |
|
6 """ |
|
7 Module implementing a dialog to enter the CSS conversion parameters. |
|
8 """ |
|
9 |
|
10 from PyQt5.QtWidgets import QDialog |
|
11 |
|
12 from .Ui_Html5ToCss3ConverterParameterDialog import \ |
|
13 Ui_Html5ToCss3ConverterParameterDialog |
|
14 |
|
15 |
|
16 class Html5ToCss3ConverterParameterDialog( |
|
17 QDialog, Ui_Html5ToCss3ConverterParameterDialog): |
|
18 """ |
|
19 Class implementing a dialog to enter the CSS conversion parameters. |
|
20 """ |
|
21 def __init__(self, parent=None): |
|
22 """ |
|
23 Constructor |
|
24 |
|
25 @param parent reference to the parent widget (QWidget) |
|
26 """ |
|
27 super(Html5ToCss3ConverterParameterDialog, self).__init__(parent) |
|
28 self.setupUi(self) |
|
29 |
|
30 def getData(self): |
|
31 """ |
|
32 Public method to get the entered data. |
|
33 |
|
34 @return tuple of indentation string (string) and a flag indicating to |
|
35 use CSS placeholders (boolean) |
|
36 """ |
|
37 placeholders = self.placeholderComboBox.currentIndex() == 1 |
|
38 return " " * self.indentationSpinBox.value(), placeholders |