QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Public Member Functions | List of all members
QgsCodeEditorExpression Class Reference

A QGIS expression editor based on QScintilla2. More...

#include <qgscodeeditorexpression.h>

Inheritance diagram for QgsCodeEditorExpression:
Inheritance graph
[legend]

Public Member Functions

 QgsCodeEditorExpression (QWidget *parent=nullptr)
 Constructor for QgsCodeEditorExpression. More...
 
void setExpressionContext (const QgsExpressionContext &context)
 Variables and functions from this expression context will be added to the API. More...
 
void setFields (const QgsFields &fields)
 Field names will be added to the API. More...
 
- Public Member Functions inherited from QgsCodeEditor
 QgsCodeEditor (QWidget *parent=nullptr, const QString &title=QString(), bool folding=false, bool margin=false)
 Construct a new code editor. More...
 
bool foldingVisible ()
 
void insertText (const QString &text)
 Insert text at cursor position, or replace any selected text if user has made a selection. More...
 
bool marginVisible ()
 
void setFoldingVisible (bool folding)
 Set folding visible state. More...
 
void setMarginVisible (bool margin)
 Set margin visible state. More...
 
void setTitle (const QString &title)
 Set the widget title. More...
 

Additional Inherited Members

- Protected Member Functions inherited from QgsCodeEditor
void focusOutEvent (QFocusEvent *event) override
 
QFont getMonospaceFont ()
 
bool isFixedPitch (const QFont &font)
 
void keyPressEvent (QKeyEvent *event) override
 

Detailed Description

A QGIS expression editor based on QScintilla2.

Adds syntax highlighting and code autocompletion.

Since
QGIS 3.4

Definition at line 36 of file qgscodeeditorexpression.h.

Constructor & Destructor Documentation

QgsCodeEditorExpression::QgsCodeEditorExpression ( QWidget *  parent = nullptr)

Constructor for QgsCodeEditorExpression.

Definition at line 24 of file qgscodeeditorexpression.cpp.

Member Function Documentation

void QgsCodeEditorExpression::setExpressionContext ( const QgsExpressionContext context)

Variables and functions from this expression context will be added to the API.

Will also reload all globally registered functions.

Definition at line 37 of file qgscodeeditorexpression.cpp.

void QgsCodeEditorExpression::setFields ( const QgsFields fields)

Field names will be added to the API.

Definition at line 90 of file qgscodeeditorexpression.cpp.


The documentation for this class was generated from the following files: