Package node_manager_fkie :: Package editor :: Module text_edit :: Class TextEdit
[frames] | no frames]

Class TextEdit

source code

python_qt_binding.QtWidgets.QTextEdit --+
                                        |
                                       TextEdit

The XML editor to handle the included files. If an included file in the opened launch file is detected, this can be open by STRG+(mouse click) in a new editor.

Instance Methods
 
__init__(self, filename, parent=None) source code
 
save(self, force=False)
Saves changes to the file.
source code
 
markLine(self, no) source code
 
setCurrentPath(self, path)
Sets the current working path.
source code
int
index(self, text)
Searches in the given text for key indicates the including of a file and return their index.
source code
 
includedFiles(self)
Returns all included files in the document.
source code
 
focusInEvent(self, event) source code
 
mouseReleaseEvent(self, event)
Opens the new editor, if the user clicked on the included file and sets the default cursor.
source code
 
mouseMoveEvent(self, event)
Sets the Qt.PointingHandCursor if the control key is pressed and the mouse is over the included file.
source code
 
keyPressEvent(self, event)
Enable the mouse tracking by setMouseTracking() if the control key is pressed.
source code
 
keyReleaseEvent(self, event)
Disable the mouse tracking by setMouseTracking() if the control key is released and set the cursor back to Qt.IBeamCursor.
source code
 
commentText(self) source code
 
shiftText(self, back=False)
Increase (Decrease) indentation using Tab (Ctrl+Tab).
source code
 
indentCurrentLine(self, count=0)
Increase indentation of current line according to the preview line.
source code
 
getIdentOfCurretLine(self) source code
 
getIndentOfPreviewsBlock(self) source code
 
dragEnterEvent(self, e) source code
 
dragMoveEvent(self, e) source code
 
dropEvent(self, e) source code
 
show_custom_context_menu(self, pos) source code
 
contextMenuEvent(self, event) source code
Class Variables
  SUBSTITUTION_ARGS = ['env', 'optenv', 'find', 'anon', 'arg']
  CONTEXT_FILE_EXT = ['.launch', '.test', '.xml']
  YAML_VALIDATION_FILES = ['.yaml', '.iface', '.sync']
Instance Variables
  load_request_signal = Signal(str)
A signal for request to open a configuration file
  search_result_signal = Signal(str, bool, str, int)
A signal emitted after search_threaded was started.
Method Details

save(self, force=False)

source code 

Saves changes to the file. :return: saved, errors, msg :rtype: bool, bool, str

setCurrentPath(self, path)

source code 

Sets the current working path. This path is to open the included files, which contains the relative path.

Parameters:
  • path (str) - the path of the current opened file (without the file)

index(self, text)

source code 

Searches in the given text for key indicates the including of a file and return their index.

Parameters:
  • text (str) - text to find
Returns: int
the index of the including key or -1

Instance Variable Details

search_result_signal

A signal emitted after search_threaded was started. (search text, found or not, file, position in text) for each result a signal will be emitted.
Value:
Signal(str, bool, str, int)