RefactoringRope/PreviewDialogBase.py

changeset 87
1fbf5fdbe721
parent 76
936b2a98fe4e
child 88
e71619898d0f
child 94
03d6a17c66ac
equal deleted inserted replaced
84:f8e0131a4761 87:1fbf5fdbe721
7 Module implementing a dialog base class to preview changes. 7 Module implementing a dialog base class to preview changes.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 from PyQt4.QtCore import Qt 12 from PyQt5.QtCore import Qt
13 from PyQt4.QtGui import QDialog, QBrush, QColor, QTextCursor 13 from PyQt5.QtGui import QBrush, QColor, QTextCursor
14 from PyQt5.QtWidgets import QDialog
14 15
15 from Ui_PreviewDialog import Ui_PreviewDialog 16 from Ui_PreviewDialog import Ui_PreviewDialog
16 17
17 import Globals 18 import Globals
18 19
54 format.setBackground(QBrush(QColor(190, 190, 190))) 55 format.setBackground(QBrush(QColor(190, 190, 190)))
55 self.formats['='] = format 56 self.formats['='] = format
56 57
57 def _appendText(self, txt, format): 58 def _appendText(self, txt, format):
58 """ 59 """
59 Restricted method to append text to the end of the contents pane. 60 Protected method to append text to the end of the contents pane.
60 61
61 @param txt text to insert (string) 62 @param txt text to insert (string)
62 @param format text format to be used (QTextCharFormat) 63 @param format text format to be used (QTextCharFormat)
63 """ 64 """
64 tc = self.previewEdit.textCursor() 65 tc = self.previewEdit.textCursor()

eric ide

mercurial