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

Class Editor

source code

       object --+                    
                |                    
sip.simplewrapper --+                
                    |                
          sip.wrapper --+            
                        |            
     PyQt5.QtCore.QObject --+        
                            |        
           object --+       |        
                    |       |        
    sip.simplewrapper --+   |        
                        |   |        
 PyQt5.QtGui.QPaintDevice --+        
                            |        
      PyQt5.QtWidgets.QWidget --+    
                                |    
      PyQt5.QtWidgets.QMainWindow --+
                                    |
                                   Editor

Creates a dialog to edit a launch file.

Nested Classes

Inherited from PyQt5.QtWidgets.QMainWindow: DockOption, DockOptions

Inherited from PyQt5.QtWidgets.QWidget: RenderFlag, RenderFlags

Inherited from PyQt5.QtGui.QPaintDevice: PaintDeviceMetric

Instance Methods
 
finished_signal(...)
finished_signal has as parameter the filenames of the initialization and is emitted, if this dialog was closed.
source code
 
__init__(self, filenames, search_text='', parent=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
keyPressEvent(self, event)
Enable the shortcats for search and replace
source code
 
readSettings(self) source code
 
storeSetting(self) source code
 
on_load_request(self, filename, search_text='', insert_index=-1, goto_line=-1)
Loads a file in a new tab or focus the tab, if the file is already open.
source code
 
on_graph_load_file(self, path, insert_after=True) source code
 
on_graph_goto(self, path, linenr) source code
 
on_text_changed(self, value='') source code
 
on_tab_changed(self, index) source code
 
on_close_tab(self, tab_index)
Signal handling to close single tabs.
source code
 
reject(self) source code
 
closeEvent(self, event)
Test the open files for changes and save this if needed.
source code
 
on_editor_modificationChanged(self, value=None)
If the content was changed, a '*' will be shown in the tab name.
source code
 
on_editor_positionChanged(self)
Shows the number of the line and column in a label.
source code
 
on_upperButton_clicked(self)
Opens the file which include the current open file
source code
 
on_saveButton_clicked(self)
Saves the current document.
source code
 
on_shortcut_find(self) source code
 
on_toggled_graph(self, value)
Shows the search frame
source code
 
on_toggled_find(self, value)
Shows the search frame
source code
 
on_toggled_replace(self, value)
Shows the replace lineedit in the search frame
source code
 
on_shortcut_goto(self)
Opens a goto dialog.
source code
 
on_search_result(self, search_text, found, path, index)
A slot to handle a found text.
source code
 
on_search_result_on_open(self, search_text, found, path, index)
Like on_search_result, but skips the text in comments.
source code
 
on_replace(self, search_text, path, index, replaced_text)
A slot to handle a text replacement of the TextSearchFrame.
source code

Inherited from PyQt5.QtWidgets.QMainWindow: addDockWidget, addToolBar, addToolBarBreak, centralWidget, contextMenuEvent, corner, createPopupMenu, dockOptions, dockWidgetArea, documentMode, event, iconSize, iconSizeChanged, insertToolBar, insertToolBarBreak, isAnimated, isDockNestingEnabled, isSeparator, menuBar, menuWidget, removeDockWidget, removeToolBar, removeToolBarBreak, restoreDockWidget, restoreState, saveState, setAnimated, setCentralWidget, setCorner, setDockNestingEnabled, setDockOptions, setDocumentMode, setIconSize, setMenuBar, setMenuWidget, setStatusBar, setTabPosition, setTabShape, setToolButtonStyle, setUnifiedTitleAndToolBarOnMac, splitDockWidget, statusBar, tabPosition, tabShape, tabifiedDockWidgets, tabifyDockWidget, takeCentralWidget, toolBarArea, toolBarBreak, toolButtonStyle, toolButtonStyleChanged, unifiedTitleAndToolBarOnMac

Inherited from PyQt5.QtWidgets.QWidget: acceptDrops, accessibleDescription, accessibleName, actionEvent, actions, activateWindow, addAction, addActions, adjustSize, autoFillBackground, backgroundRole, baseSize, changeEvent, childAt, childrenRect, childrenRegion, clearFocus, clearMask, close, contentsMargins, contentsRect, contextMenuPolicy, create, createWindowContainer, cursor, customContextMenuRequested, destroy, devType, dragEnterEvent, dragLeaveEvent, dragMoveEvent, dropEvent, effectiveWinId, ensurePolished, enterEvent, find, focusInEvent, focusNextChild, focusNextPrevChild, focusOutEvent, 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, inputMethodEvent, inputMethodHints, inputMethodQuery, insertAction, insertActions, isActiveWindow, isAncestorOf, isEnabled, isEnabledTo, isFullScreen, isHidden, isLeftToRight, isMaximized, isMinimized, isModal, isRightToLeft, isVisible, isVisibleTo, isWindow, isWindowModified, keyReleaseEvent, keyboardGrabber, layout, layoutDirection, leaveEvent, locale, lower, mapFrom, mapFromGlobal, mapFromParent, mapTo, mapToGlobal, mapToParent, mask, maximumHeight, maximumSize, maximumWidth, metric, minimumHeight, minimumSize, minimumSizeHint, minimumWidth, mouseDoubleClickEvent, mouseGrabber, mouseMoveEvent, mousePressEvent, mouseReleaseEvent, move, moveEvent, nativeEvent, nativeParentWidget, nextInFocusChain, normalGeometry, overrideWindowFlags, overrideWindowState, paintEngine, paintEvent, palette, parentWidget, pos, previousInFocusChain, raise_, rect, releaseKeyboard, releaseMouse, releaseShortcut, removeAction, render, repaint, resize, resizeEvent, 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, showEvent, showFullScreen, showMaximized, showMinimized, showNormal, size, sizeHint, sizeIncrement, sizePolicy, stackUnder, statusTip, style, styleSheet, tabletEvent, testAttribute, toolTip, toolTipDuration, underMouse, ungrabGesture, unsetCursor, unsetLayoutDirection, unsetLocale, update, updateGeometry, updateMicroFocus, updatesEnabled, visibleRegion, whatsThis, wheelEvent, 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, eventFilter, findChild, findChildren, inherits, installEventFilter, isSignalConnected, isWidgetType, isWindowType, killTimer, metaObject, moveToThread, objectName, objectNameChanged, parent, property, pyqtConfigure, receivers, removeEventFilter, sender, senderSignalIndex, setObjectName, setProperty, signalsBlocked, startTimer, thread, timerEvent, 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

Inherited from PyQt5.QtWidgets.QMainWindow: AllowNestedDocks, AllowTabbedDocks, AnimatedDocks, ForceTabbedDocks, VerticalTabs

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

Properties

Inherited from object: __class__

Method Details

__init__(self, filenames, search_text='', parent=None)
(Constructor)

source code 

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

Parameters:
  • filenames ([str, ...]) - a list with filenames. The last one will be activated.
  • search_text (str (Default: Empty String)) - if not empty, searches in new document for first occurrence of the given text
Overrides: object.__init__

keyPressEvent(self, event)

source code 

Enable the shortcats for search and replace

Overrides: PyQt5.QtWidgets.QWidget.keyPressEvent

on_load_request(self, filename, search_text='', insert_index=-1, goto_line=-1)

source code 

Loads a file in a new tab or focus the tab, if the file is already open.

Parameters:
  • filename (str) - the path to file
  • search_text (str (Default: Empty String)) - if not empty, searches in new document for first occurrence of the given text

on_close_tab(self, tab_index)

source code 

Signal handling to close single tabs.

Parameters:
  • tab_index (int) - tab index to close

closeEvent(self, event)

source code 

Test the open files for changes and save this if needed.

Overrides: PyQt5.QtWidgets.QWidget.closeEvent

on_saveButton_clicked(self)

source code 

Saves the current document. This method is called if the save button was clicked.

on_search_result(self, search_text, found, path, index)

source code 

A slot to handle a found text. It goes to the position in the text and select the searched text. On new file it will be open. :param search_text: the searched text :type search_text: str :param found: the text was found or not :type found: bool :param path: the path of the file the text was found :type path: str :param index: the position in the text :type index: int

on_replace(self, search_text, path, index, replaced_text)

source code 

A slot to handle a text replacement of the TextSearchFrame. :param search_text: the searched text :type search_text: str :param path: the path of the file the text was found :type path: str :param index: the position in the text :type index: int :param replaced_text: the new text :type replaced_text: str