QGIS API Documentation  3.0.2-Girona (307d082)
Public Member Functions | List of all members
QgsCodeEditorPython Class Reference

A Python editor based on QScintilla2. More...

#include <qgscodeeditorpython.h>

Inheritance diagram for QgsCodeEditorPython:
Inheritance graph
[legend]

Public Member Functions

 QgsCodeEditorPython (QWidget *parent=nullptr, const QList< QString > &filenames=QList< QString >())
 Construct a new Python editor. More...
 
void loadAPIs (const QList< QString > &filenames)
 Load APIs from one or more files. More...
 
bool loadScript (const QString &script)
 Load a script file. 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 Python editor based on QScintilla2.

Adds syntax highlighting and code autocompletion.

Since
QGIS 2.6
Note
may not be available in Python bindings, depending on platform support

Definition at line 33 of file qgscodeeditorpython.h.

Constructor & Destructor Documentation

◆ QgsCodeEditorPython()

QgsCodeEditorPython::QgsCodeEditorPython ( QWidget *  parent = nullptr,
const QList< QString > &  filenames = QList<QString>() 
)

Construct a new Python editor.

Parameters
parentThe parent QWidget
filenamesThe list of apis files to load for the Python lexer
Since
QGIS 2.6

Definition at line 28 of file qgscodeeditorpython.cpp.

Member Function Documentation

◆ loadAPIs()

void QgsCodeEditorPython::loadAPIs ( const QList< QString > &  filenames)

Load APIs from one or more files.

Parameters
filenamesThe list of apis files to load for the Python lexer

Definition at line 105 of file qgscodeeditorpython.cpp.

◆ loadScript()

bool QgsCodeEditorPython::loadScript ( const QString &  script)

Load a script file.

Parameters
scriptThe script file to load

Definition at line 112 of file qgscodeeditorpython.cpp.


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