7 Module implementing the font dialog wizard dialog. |
7 Module implementing the font dialog wizard dialog. |
8 """ |
8 """ |
9 |
9 |
10 import os |
10 import os |
11 |
11 |
12 from PyQt5.QtCore import pyqtSlot |
12 from PyQt6.QtCore import pyqtSlot |
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFontDialog |
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QFontDialog |
14 |
14 |
15 from .Ui_FontDialogWizardDialog import Ui_FontDialogWizardDialog |
15 from .Ui_FontDialogWizardDialog import Ui_FontDialogWizardDialog |
16 |
16 |
17 |
17 |
18 class FontDialogWizardDialog(QDialog, Ui_FontDialogWizardDialog): |
18 class FontDialogWizardDialog(QDialog, Ui_FontDialogWizardDialog): |
115 if self.eVariable.text() or self.font is not None: |
115 if self.eVariable.text() or self.font is not None: |
116 if title or parent != "None": |
116 if title or parent != "None": |
117 code += '{0}{1}'.format(os.linesep, istring) |
117 code += '{0}{1}'.format(os.linesep, istring) |
118 if not self.eVariable.text(): |
118 if not self.eVariable.text(): |
119 if self.font is not None: |
119 if self.font is not None: |
120 code += 'QFont("{0}", {1:d}, {2:d}, {3:d})'.format( |
120 code += 'QFont(["{0}"], {1:d}, {2:d}, {3:d})'.format( |
121 self.font.family(), self.font.pointSize(), |
121 self.font.family(), self.font.pointSize(), |
122 self.font.weight(), self.font.italic()) |
122 self.font.weight(), self.font.italic()) |
123 else: |
123 else: |
124 code += self.eVariable.text() |
124 code += self.eVariable.text() |
125 if title: |
125 if title: |