Package node_manager_fkie :: Module xml_editor :: Class Editor
[frames] | no frames]

Class Editor

source code

       object --+                            
                |                            
sip.simplewrapper --+                        
                    |                        
          sip.wrapper --+                    
                        |                    
     PyQt4.QtCore.QObject --+                
                            |                
           object --+       |                
                    |       |                
    sip.simplewrapper --+   |                
                        |   |                
 PyQt4.QtGui.QPaintDevice --+                
                            |                
          PyQt4.QtGui.QWidget --+            
                                |            
               PyQt4.QtGui.QFrame --+        
                                    |        
      PyQt4.QtGui.QAbstractScrollArea --+    
                                        |    
                    PyQt4.QtGui.QTextEdit --+
                                            |
                                           Editor

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 PyQt4.QtGui.QTextEdit: AutoFormatting, AutoFormattingFlag, ExtraSelection, LineWrapMode

Inherited from PyQt4.QtGui.QFrame: Shadow, Shape, StyleMask

Inherited from PyQt4.QtGui.QWidget: RenderFlag, RenderFlags

Inherited from PyQt4.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods
 
__init__(self, filename, parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
save(self)
Saves changes to the file.
source code
 
markLine(self, no) source code
 
setCurrentPath(self, path)
Sets the current working path.
source code
str
interpretPath(self, path)
Tries to determine the path of the included file.
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
[str, ...]
fileWithText(self, search_text)
Searches for given text in this document and all included files.
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 QtCore.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 QtCore.Qt.IBeamCursor.
source code
 
commentText(self) source code
 
shiftText(self)
Increase (Decrease) indentation using Tab (Ctrl+Tab).
source code
 
dragEnterEvent(self, e) source code
 
dragMoveEvent(self, e) source code
 
dropEvent(self, e) source code

Inherited from PyQt4.QtGui.QTextEdit: acceptRichText, alignment, anchorAt, append, autoFormatting, canInsertFromMimeData, canPaste, changeEvent, clear, contextMenuEvent, 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, print, 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, 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 PyQt4.QtGui.QAbstractScrollArea: addScrollBarWidget, cornerWidget, horizontalScrollBar, horizontalScrollBarPolicy, maximumViewportSize, minimumSizeHint, scrollBarWidgets, setCornerWidget, setHorizontalScrollBar, setHorizontalScrollBarPolicy, setVerticalScrollBar, setVerticalScrollBarPolicy, setViewport, setViewportMargins, setupViewport, sizeHint, verticalScrollBar, verticalScrollBarPolicy, viewport, viewportEvent

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

Inherited from PyQt4.QtGui.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, closeEvent, contentsMargins, contentsRect, contextMenuPolicy, create, cursor, customContextMenuRequested, destroy, devType, effectiveWinId, enabledChange, ensurePolished, enterEvent, focusNextChild, focusPolicy, focusPreviousChild, focusProxy, focusWidget, font, fontChange, fontInfo, fontMetrics, foregroundRole, frameGeometry, frameSize, geometry, getContentsMargins, grabGesture, grabKeyboard, grabMouse, grabShortcut, graphicsEffect, graphicsProxyWidget, handle, hasFocus, hasMouseTracking, height, heightForWidth, hide, hideEvent, inputContext, inputMethodHints, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isEnabledToTLW, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isTopLevel, isVisible, isVisibleTo, isWindow, isWindowModified, keyboardGrabber, languageChange, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumWidth, mouseGrabber, move, moveEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, palette, paletteChange, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resetInputContext, 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, setInputContext, setInputMethodHints, setLayout, setLayoutDirection, setLocale, setMask, setMaximumHeight, setMaximumSize, setMaximumWidth, setMinimumHeight, setMinimumSize, setMinimumWidth, setMouseTracking, setPalette, setParent, setShortcutAutoRepeat, setShortcutEnabled, setShown, setSizeIncrement, setSizePolicy, setStatusTip, setStyle, setStyleSheet, setTabOrder, setToolTip, setUpdatesEnabled, setVisible, setWhatsThis, setWindowFilePath, setWindowFlags, setWindowIcon, setWindowIconText, setWindowModality, setWindowModified, setWindowOpacity, setWindowRole, setWindowState, setWindowTitle, show, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, topLevelWidget, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, width, winId, window, windowActivationChange, windowFilePath, windowFlags, windowIcon, windowIconText, windowModality, windowOpacity, windowRole, windowState, windowTitle, windowType, x, x11Info, x11PictureHandle, y

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

Inherited from PyQt4.QtGui.QPaintDevice: colorCount, depth, heightMM, logicalDpiX, logicalDpiY, numColors, 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 PyQt4.QtGui.QTextEdit: AutoAll, AutoBulletList, AutoNone, FixedColumnWidth, FixedPixelWidth, NoWrap, WidgetWidth

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

Inherited from PyQt4.QtGui.QWidget: DrawChildren, DrawWindowBackground, IgnoreMask

Inherited from PyQt4.QtCore.QObject: staticMetaObject

Inherited from PyQt4.QtGui.QPaintDevice: PdmDepth, 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
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)

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)

interpretPath(self, path)

source code 

Tries to determine the path of the included file. The statement of $(find 'package') will be resolved.

Parameters:
  • path (str) - the sting which contains the included path
Returns: str
if no leading os.sep is detected, the path setted by setCurrentPath() will be prepend. $(find 'package') will be resolved. Otherwise the parameter itself will be returned

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

fileWithText(self, search_text)

source code 

Searches for given text in this document and all included files.

Parameters:
  • search_text (str) - text to find
Returns: [str, ...]
the list with all files contain the text

focusInEvent(self, event)

source code 
Overrides: PyQt4.QtGui.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: PyQt4.QtGui.QWidget.mouseReleaseEvent

mouseMoveEvent(self, event)

source code 

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

Overrides: PyQt4.QtGui.QWidget.mouseMoveEvent

keyPressEvent(self, event)

source code 

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

Overrides: PyQt4.QtGui.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 QtCore.Qt.IBeamCursor.

Overrides: PyQt4.QtGui.QWidget.keyReleaseEvent

dragEnterEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QWidget.dragEnterEvent

dragMoveEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QWidget.dragMoveEvent

dropEvent(self, e)

source code 
Overrides: PyQt4.QtGui.QWidget.dropEvent