Class: QgsCodeEditorExpression¶
- class qgis.gui.QgsCodeEditorExpression(parent: QWidget = None)¶
Bases:
QgsCodeEditor
Constructor for QgsCodeEditorExpression
A QGIS expression editor based on QScintilla2. Adds syntax highlighting and code autocompletion.
Methods
Returns the color to use in the lexer for the specified
role
.Returns the font to use in the lexer.
Performs tasks which must be run after a lexer has been set for the widget.
scrollContentsBy
Variables and functions from this expression context will be added to the API.
Field names will be added to the API.
- actionEvent(self, QActionEvent)¶
- canInsertFromMimeData(self, QMimeData) → bool¶
- changeEvent(self, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- drawFrame(self, QPainter)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) → bool¶
- eventFilter(self, QObject, QEvent) → bool¶
- focusInEvent(self, QFocusEvent)¶
- focusNextChild(self) → bool¶
- focusNextPrevChild(self, bool) → bool¶
- focusOutEvent(self, event: QFocusEvent)¶
- focusPreviousChild(self) → bool¶
- fromMimeData(self, QMimeData) → Tuple[QByteArray, bool]¶
- hideEvent(self, QHideEvent)¶
- initPainter(self, QPainter)¶
- initStyleOption(self, QStyleOptionFrame)¶
- initializeLexer(self)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- inputMethodQuery(self, Qt.InputMethodQuery) → Any¶
- isFixedPitch(self, font: QFont) → bool¶
- isSignalConnected(self, QMetaMethod) → bool¶
- keyPressEvent(self, event: QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- lexerColor(self, role: QgsCodeEditorColorScheme.ColorRole) → QColor¶
Returns the color to use in the lexer for the specified
role
.New in version 3.16.
- lexerFont(self) → QFont¶
Returns the font to use in the lexer.
New in version 3.16.
- metric(self, QPaintDevice.PaintDeviceMetric) → int¶
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) → Tuple[bool, int]¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) → int¶
- resizeEvent(self, QResizeEvent)¶
- runPostLexerConfigurationTasks(self)¶
Performs tasks which must be run after a lexer has been set for the widget.
New in version 3.16.
- QgsCodeEditorExpression.scrollContentsBy(self, int, int)
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- setExpressionContext(self, context: QgsExpressionContext)¶
Variables and functions from this expression context will be added to the API. Will also reload all globally registered functions.
- Parameters
context (QgsExpressionContext) –
- setFields(self, fields: QgsFields)¶
Field names will be added to the API.
- Parameters
fields (QgsFields) –
- QgsCodeEditorExpression.setViewportMargins(self, int, int, int, int)
- setViewportMargins(self, QMargins) → None¶
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- toMimeData(self, Union[QByteArray, bytes, bytearray], bool) → QMimeData¶
- updateMicroFocus(self)¶
- viewportEvent(self, QEvent) → bool¶
- viewportMargins(self) → QMargins¶
- viewportSizeHint(self) → QSize¶
- wheelEvent(self, QWheelEvent)¶