Exemple #1
0
 def __init__(self, url=None, encoding=None):
     super(Document, self).__init__()
     self.setDocumentLayout(QPlainTextDocumentLayout(self))
     self._encoding = encoding
     self._url = url # avoid urlChanged on init
     self.setUrl(url)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)
     self.load()
Exemple #2
0
 def __init__(self, url=None, encoding=None):
     super(Document, self).__init__()
     self.setDocumentLayout(QPlainTextDocumentLayout(self))
     self._encoding = encoding
     if url is None:
         url = QUrl()
     self._url = url # avoid urlChanged on init
     self.setUrl(url)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)
     self.load()
Exemple #3
0
 def __init__(self, url=None, encoding=None):
     """Create a new Document with url and encoding.
     
     Does not load the contents, you should use load() for that, or
     use the new_from_url() constructor to instantiate a new Document
     with the contents loaded.
     
     """
     if url is None:
         url = QUrl()
     super(Document, self).__init__()
     self.setDocumentLayout(QPlainTextDocumentLayout(self))
     self._encoding = encoding
     self._url = url # avoid urlChanged on init
     self.setUrl(url)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)
Exemple #4
0
 def __init__(self, url=None, encoding=None):
     """Create a new Document with url and encoding.
     
     Does not load the contents, you should use load() for that, or
     use the new_from_url() constructor to instantiate a new Document
     with the contents loaded.
     
     """
     if url is None:
         url = QUrl()
     super(Document, self).__init__()
     self.setDocumentLayout(QPlainTextDocumentLayout(self))
     self._encoding = encoding
     self._url = url  # avoid urlChanged on init
     self.setUrl(url)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)
Exemple #5
0
 def __init__(self, url=None, encoding=None):
     super(EditorDocument, self).__init__(url, encoding)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)
Exemple #6
0
 def __init__(self, url=None, encoding=None):
     super(EditorDocument, self).__init__(url, encoding)
     self.modificationChanged.connect(self.slotModificationChanged)
     app.documents.append(self)
     app.documentCreated(self)