RefactoringRope/PreviewDialogBase.py

branch
eric5
changeset 88
e71619898d0f
parent 86
3339c75dc777
equal deleted inserted replaced
86:3339c75dc777 88:e71619898d0f
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 PyQt5.QtCore import Qt 12 from PyQt4.QtCore import Qt
13 from PyQt5.QtGui import QBrush, QColor, QTextCursor 13 from PyQt4.QtGui import QDialog, QBrush, QColor, QTextCursor
14 from PyQt5.QtWidgets import QDialog
15 14
16 from Ui_PreviewDialog import Ui_PreviewDialog 15 from Ui_PreviewDialog import Ui_PreviewDialog
17 16
18 import Globals 17 import Globals
19 18
55 format.setBackground(QBrush(QColor(190, 190, 190))) 54 format.setBackground(QBrush(QColor(190, 190, 190)))
56 self.formats['='] = format 55 self.formats['='] = format
57 56
58 def _appendText(self, txt, format): 57 def _appendText(self, txt, format):
59 """ 58 """
60 Protected method to append text to the end of the contents pane. 59 Restricted method to append text to the end of the contents pane.
61 60
62 @param txt text to insert (string) 61 @param txt text to insert (string)
63 @param format text format to be used (QTextCharFormat) 62 @param format text format to be used (QTextCharFormat)
64 """ 63 """
65 tc = self.previewEdit.textCursor() 64 tc = self.previewEdit.textCursor()

eric ide

mercurial