basic_QPlainTextEdit.py
This decorator is used to handle edit blocks undo states.
Parameters: | object – Object to decorate. ( Object ) |
---|---|
Returns: | Object. ( Object ) |
Bases: PyQt4.QtGui.QPlainTextEdit
This class is a QPlainTextEdit subclass providing a basic editor base class.
Parameters: |
|
---|
This signal is emited by the Basic_QPlainTextEdit class when patterns have been replaced. ( pyqtSignal )
Returns: | Replaced patterns. ( List ) |
---|
This method is the property for self.__searchPattern attribute.
Returns: | self.__searchPattern. ( String ) |
---|
This method is the property for self.__minimumFontPointSize attribute.
Returns: | self.__minimumFontPointSize. ( Integer ) |
---|
This method is the property for self.__maximumFontPointSize attribute.
Returns: | self.__maximumFontPointSize. ( Integer ) |
---|
This method reimplements the QPlainTextEdit.wheelEvent() method.
Parameters: | event – Event. ( QEvent ) |
---|
This method returns current document selected text metrics.
Returns: | Selected text metrics. ( Tuple ) |
---|
This method returns default text option.
Returns: | Default text options. ( QTextOption ) |
---|
This method sets default text option using given flag.
Parameters: | textOption – Text option. ( QTextOption ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method stores the document cursor anchor.
Returns: | Method success. ( Boolean ) |
---|
This method restores the document cursor anchor.
Returns: | Method success. ( Boolean ) |
---|
This method returns the document cursor line.
Returns: | Cursor line. ( Integer ) |
---|
This method returns the document cursor column.
Returns: | Cursor column. ( Integer ) |
---|
This method returns the character before the cursor.
Returns: | Previous cursor character. ( QString ) |
---|
This method returns the character after the cursor.
Returns: | Next cursor character. ( QString ) |
---|
This method returns the document text under cursor.
Returns: | Text under cursor. ( QString ) |
---|
This method returns the document word under cursor ( Using Qt legacy “QTextCursor.WordUnderCursor” ).
Returns: | Word under cursor. ( QString ) |
---|
This method returns the document word under cursor.
Returns: | Word under cursor. ( QString ) |
---|
This method returns the document partial word under cursor ( From word start to cursor position ).
Returns: | Partial word under cursor. ( QString ) |
---|
This method returns if the document is modified.
Returns: | Document modified state. ( Boolean ) |
---|
This method sets the document modified state.
Parameters: | state – Modified state. ( Boolean ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method returns if the document is empty.
Returns: | Document empty state. ( Boolean ) |
---|
This method sets document with given content while providing undo capability.
Parameters: | content – Content to set. ( List ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method deletes the document text under cursor.
Returns: | Method success. ( Boolean ) |
---|
This method deletes the document lines under cursor.
Returns: | Method success. ( Boolean ) |
---|
This method duplicates the document lines under cursor.
Returns: | Method success. ( Boolean ) |
---|
This method moves the document lines under cursor.
Parameters: | direction – Move direction ( QTextCursor.Down / QTextCursor.Up ). ( QTextCursor.MoveOperation ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method moves up the document lines under cursor.
Returns: | Method success. ( Boolean ) |
---|
This method moves down the document lines under cursor.
Returns: | Method success. ( Boolean ) |
---|
This method searchs given pattern text in the document.
Usage:
>>> scriptEditor = Umbra.componentsManager.getInterface("factory.scriptEditor")
True
>>> codeEditor = scriptEditor.getCurrentEditor()
True
>>> codeEditor.search(searchPattern, caseSensitive=True, wholeWord=True, regularExpressions=True, backwardSearch=True, wrapAround=True)
True
Parameters: |
|
---|---|
Returns: | Method success. ( Boolean ) |
This method searchs the next search pattern in the document.
Returns: | Method success. ( Boolean ) |
---|
This method searchs the previous search pattern in the document.
Returns: | Method success. ( Boolean ) |
---|
This method replaces current given pattern occurence in the document with the replacement pattern.
Usage:
>>> scriptEditor = Umbra.componentsManager.getInterface("factory.scriptEditor")
True
>>> codeEditor = scriptEditor.getCurrentEditor()
True
>>> codeEditor.replace(searchPattern, replacementPattern, caseSensitive=True, wholeWord=True, regularExpressions=True, backwardSearch=True, wrapAround=True)
True
Parameters: |
|
---|---|
Returns: | Method success. ( Boolean ) |
Warning
Initializing wrapAround keyword to True leads to infinite recursion loop if the search pattern and the replacementPattern are the same.
Parameters: |
|
---|---|
Returns: | Method success. ( Boolean ) |
This method moves the text cursor to given line.
Parameters: | line – Line to go to. ( Integer ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method moves the text cursor to given column.
Parameters: | column – Column to go to. ( Integer ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method moves the text cursor to given position.
Parameters: | position – Position to go to. ( Integer ) |
---|---|
Returns: | Method success. ( Boolean ) |
This method toggles document word wrap.
Returns: | Method success. ( Boolean ) |
---|
This method toggles document white spaces display.
Returns: | Method success. ( Boolean ) |
---|