QgsCodeEditor class
A text editor based on QScintilla2.
Contents
Derived classes
- class QgsCodeEditorCSS
- A CSS editor based on QScintilla2.
- class QgsCodeEditorExpression
- A QGIS expression editor based on QScintilla2.
- class QgsCodeEditorHTML
- A HTML editor based on QScintilla2.
- class QgsCodeEditorPython
- A Python editor based on QScintilla2.
- class QgsCodeEditorSQL
- A SQL editor based on QScintilla2.
Constructors, destructors, conversion operators
- QgsCodeEditor(QWidget* parent = nullptr, const QString& title = QString(), bool folding = false, bool margin = false)
- Construct a new code editor.
Public functions
- void insertText(const QString& text)
- Insert text at cursor position, or replace any selected text if user has made a selection.
- void setFoldingVisible(bool folding)
- Set folding visible state.
- void setMarginVisible(bool margin)
- Set margin visible state.
- void setTitle(const QString& title)
- Set the widget title.
Function documentation
QgsCodeEditor:: QgsCodeEditor(QWidget* parent = nullptr,
const QString& title = QString(),
bool folding = false,
bool margin = false)
Construct a new code editor.
| Parameters | |
|---|---|
| parent | The parent QWidget |
| title | The title to show in the code editor dialog |
| folding | false: Enable folding for code editor |
| margin | false: Enable margin for code editor |
void QgsCodeEditor:: insertText(const QString& text)
Insert text at cursor position, or replace any selected text if user has made a selection.
| Parameters | |
|---|---|
| text | The text to be inserted |
void QgsCodeEditor:: setFoldingVisible(bool folding)
Set folding visible state.
| Parameters | |
|---|---|
| folding | Set folding in the editor |
void QgsCodeEditor:: setMarginVisible(bool margin)
Set margin visible state.
| Parameters | |
|---|---|
| margin | Set margin in the editor |
void QgsCodeEditor:: setTitle(const QString& title)
Set the widget title.
| Parameters | |
|---|---|
| title | widget title |