File indexing completed on 2025-03-09 04:10:20

0001 """
0002 SPDX-FileCopyrightText: 2017 Eliakin Costa <eliakim170@gmail.com>
0003 
0004 SPDX-License-Identifier: GPL-2.0-or-later
0005 """
0006 from PyQt5.QtGui import QTextCursor
0007 
0008 
0009 class DocWrapper(object):
0010 
0011     def __init__(self, textdocument):
0012         self.textdocument = textdocument
0013 
0014     def write(self, text, view=None):
0015         cursor = QTextCursor(self.textdocument)
0016         cursor.clearSelection()
0017         cursor.movePosition(QTextCursor.End)
0018         cursor.insertText(text)