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

Class TextEdit

source code

       object --+                            
                |                            
sip.simplewrapper --+                        
                    |                        
          sip.wrapper --+                    
                        |                    
     PyQt5.QtCore.QObject --+                
                            |                
           object --+       |                
                    |       |                
    sip.simplewrapper --+   |                
                        |   |                
 PyQt5.QtGui.QPaintDevice --+                
                            |                
      PyQt5.QtWidgets.QWidget --+            
                                |            
           PyQt5.QtWidgets.QFrame --+        
                                    |        
  PyQt5.QtWidgets.QAbstractScrollArea --+    
                                        |    
                PyQt5.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.

Nested Classes

Inherited from PyQt5.QtWidgets.QTextEdit: AutoFormatting, AutoFormattingFlag, ExtraSelection, LineWrapMode

Inherited from PyQt5.QtWidgets.QAbstractScrollArea: SizeAdjustPolicy

Inherited from PyQt5.QtWidgets.QFrame: Shadow, Shape, StyleMask

Inherited from PyQt5.QtWidgets.QWidget: RenderFlag, RenderFlags

Inherited from PyQt5.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods
 
__init__(self, filename, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
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

Inherited from PyQt5.QtWidgets.QTextEdit: acceptRichText, alignment, anchorAt, append, autoFormatting, canInsertFromMimeData, canPaste, changeEvent, clear, copy, copyAvailable, createMimeDataFromSelection, createStandardContextMenu, currentCharFormat, currentCharFormatChanged, currentFont, cursorForPosition, cursorPositionChanged, cursorRect, cursorWidth, cut, document, documentTitle, dragLeaveEvent, ensureCursorVisible, event, extraSelections, find, focusNextPrevChild, focusOutEvent, fontFamily, fontItalic, fontPointSize, fontUnderline, fontWeight, inputMethodEvent, inputMethodQuery, insertFromMimeData, insertHtml, insertPlainText, isReadOnly, isUndoRedoEnabled, lineWrapColumnOrWidth, lineWrapMode, loadResource, mergeCurrentCharFormat, mouseDoubleClickEvent, mousePressEvent, moveCursor, overwriteMode, paintEvent, paste, placeholderText, print_, redo, redoAvailable, resizeEvent, scrollContentsBy, scrollToAnchor, selectAll, selectionChanged, setAcceptRichText, setAlignment, setAutoFormatting, setCurrentCharFormat, setCurrentFont, setCursorWidth, setDocument, setDocumentTitle, setExtraSelections, setFontFamily, setFontItalic, setFontPointSize, setFontUnderline, setFontWeight, setHtml, setLineWrapColumnOrWidth, setLineWrapMode, setOverwriteMode, setPlaceholderText, setPlainText, setReadOnly, setTabChangesFocus, setTabStopWidth, setText, setTextBackgroundColor, setTextColor, setTextCursor, setTextInteractionFlags, setUndoRedoEnabled, setWordWrapMode, showEvent, tabChangesFocus, tabStopWidth, textBackgroundColor, textChanged, textColor, textCursor, textInteractionFlags, timerEvent, toHtml, toPlainText, undo, undoAvailable, wheelEvent, wordWrapMode, zoomIn, zoomOut

Inherited from PyQt5.QtWidgets.QAbstractScrollArea: addScrollBarWidget, cornerWidget, eventFilter, horizontalScrollBar, horizontalScrollBarPolicy, maximumViewportSize, minimumSizeHint, scrollBarWidgets, setCornerWidget, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setSizeAdjustPolicy, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportMargins, setupViewport, sizeAdjustPolicy, sizeHint, verticalScrollBar, verticalScrollBarPolicy, viewport, viewportEvent, viewportMargins, viewportSizeHint

Inherited from PyQt5.QtWidgets.QFrame: drawFrame, frameRect, frameShadow, frameShape, frameStyle, frameWidth, initStyleOption, lineWidth, midLineWidth, setFrameRect, setFrameShadow, setFrameShape, setFrameStyle, setLineWidth, setMidLineWidth

Inherited from PyQt5.QtWidgets.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuPolicy, create, createWindowContainer, cursor, customContextMenuRequested, destroy, devType, effectiveWinId, ensurePolished, enterEvent, focusNextChild, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grab, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, hasFocus, hasHeightForWidth, hasMouseTracking, height, heightForWidth, hide, hideEvent, initPainter, inputMethodHints, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseGrabber, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, restoreGeometry, saveGeometry, scroll, setAcceptDrops, setAccessibleDescription, setAccessibleName, setAttribute, setAutoFillBackground, setBackgroundRole, setBaseSize, setContentsMargins, setContextMenuPolicy, setCursor, setDisabled, setEnabled, setFixedHeight, setFixedSize, setFixedWidth, setFocus, setFocusPolicy, setFocusProxy, setFont, setForegroundRole, setGeometry, setGraphicsEffect, setHidden, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setToolTipDuration, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, sharedPainter, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, winId, window, windowFilePath, windowFlags, windowHandle, windowIcon, windowIconChanged, windowIconText, windowIconTextChanged, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowTitleChanged, windowType, x, y

Inherited from PyQt5.QtCore.QObject: __getattr__, blockSignals, childEvent, children, connectNotify, customEvent, deleteLater, destroyed, disconnect, disconnectNotify, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, tr

Inherited from PyQt5.QtGui.QPaintDevice: colorCount, depth, devicePixelRatio, heightMM, logicalDpiX, logicalDpiY, paintingActive, physicalDpiX, physicalDpiY, widthMM

Inherited from sip.simplewrapper: __new__

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  SUBSTITUTION_ARGS = ['env', 'optenv', 'find', 'anon', 'arg']
  CONTEXT_FILE_EXT = ['.launch', '.test', '.xml']
  YAML_VALIDATION_FILES = ['.yaml', '.iface', '.sync']

Inherited from PyQt5.QtWidgets.QTextEdit: AutoAll, AutoBulletList, AutoNone, FixedColumnWidth, FixedPixelWidth, NoWrap, WidgetWidth

Inherited from PyQt5.QtWidgets.QAbstractScrollArea: AdjustIgnored, AdjustToContents, AdjustToContentsOnFirstShow

Inherited from PyQt5.QtWidgets.QFrame: Box, HLine, NoFrame, Panel, Plain, Raised, Shadow_Mask, Shape_Mask, StyledPanel, Sunken, VLine, WinPanel

Inherited from PyQt5.QtWidgets.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt5.QtCore.QObject: staticMetaObject

Inherited from PyQt5.QtGui.QPaintDevice: PdmDepth, PdmDevicePixelRatio, PdmDpiX, PdmDpiY, PdmHeight, PdmHeightMM, PdmNumColors, PdmPhysicalDpiX, PdmPhysicalDpiY, PdmWidth, PdmWidthMM

Instance Variables
 
load_request_signal(...)
A signal for request to open a configuration file
source code
 
search_result_signal(...)
A signal emitted after search_threaded was started.
source code
Properties

Inherited from object: __class__

Method Details

__init__(self, filename, parent=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

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

focusInEvent(self, event)

source code 
Overrides: PyQt5.QtWidgets.QWidget.focusInEvent

mouseReleaseEvent(self, event)

source code 

Opens the new editor, if the user clicked on the included file and sets the default cursor.

Overrides: PyQt5.QtWidgets.QWidget.mouseReleaseEvent

mouseMoveEvent(self, event)

source code 

Sets the Qt.PointingHandCursor if the control key is pressed and the mouse is over the included file.

Overrides: PyQt5.QtWidgets.QWidget.mouseMoveEvent

keyPressEvent(self, event)

source code 

Enable the mouse tracking by setMouseTracking() if the control key is pressed.

Overrides: PyQt5.QtWidgets.QWidget.keyPressEvent

keyReleaseEvent(self, event)

source code 

Disable the mouse tracking by setMouseTracking() if the control key is released and set the cursor back to Qt.IBeamCursor.

Overrides: PyQt5.QtWidgets.QWidget.keyReleaseEvent

dragEnterEvent(self, e)

source code 
Overrides: PyQt5.QtWidgets.QWidget.dragEnterEvent

dragMoveEvent(self, e)

source code 
Overrides: PyQt5.QtWidgets.QWidget.dragMoveEvent

dropEvent(self, e)

source code 
Overrides: PyQt5.QtWidgets.QWidget.dropEvent

contextMenuEvent(self, event)

source code 
Overrides: PyQt5.QtWidgets.QWidget.contextMenuEvent

Instance Variable Details

search_result_signal(...)

source code 
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.