QGIS API Documentation  2.6.0-Brighton
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | List of all members
QgsCodeEditor Class Reference

A text editor based on QScintilla2. More...

#include <qgscodeeditor.h>

Inheritance diagram for QgsCodeEditor:
Inheritance graph
[legend]

Public Member Functions

 QgsCodeEditor (QWidget *parent=0, QString title="", bool folding=false, bool margin=false)
 Construct a new code editor.
 ~QgsCodeEditor ()
void setTitle (const QString title)
 Set the widget title.
void setMarginVisible (bool margin)
 Set margin visible state.
bool marginVisible ()
void setFoldingVisible (bool folding)
 Set folding visible state.
bool foldingVisible ()
void insertText (const QString theText)
 Insert text at cursor position, or replace any selected text if user has made a selection.

Protected Member Functions

bool isFixedPitch (const QFont &font)
QFont getMonospaceFont ()

Detailed Description

A text editor based on QScintilla2.

Note
added in 2.6

Constructor & Destructor Documentation

QgsCodeEditor::QgsCodeEditor ( QWidget *  parent = 0,
QString  title = "",
bool  folding = false,
bool  margin = false 
)

Construct a new code editor.

Parameters
parentThe parent QWidget
titleThe title to show in the code editor dialog
foldingFalse: Enable margin for code editor
marginFalse: Enable folding for code editor
Note
added in 2.6
QgsCodeEditor::~QgsCodeEditor ( )

Member Function Documentation

bool QgsCodeEditor::foldingVisible ( )
inline
QFont QgsCodeEditor::getMonospaceFont ( )
protected
void QgsCodeEditor::insertText ( const QString  theText)

Insert text at cursor position, or replace any selected text if user has made a selection.

Parameters
theTextThe text to be inserted
bool QgsCodeEditor::isFixedPitch ( const QFont &  font)
protected
bool QgsCodeEditor::marginVisible ( )
inline
void QgsCodeEditor::setFoldingVisible ( bool  folding)

Set folding visible state.

Parameters
foldingSet folding in the editor
void QgsCodeEditor::setMarginVisible ( bool  margin)

Set margin visible state.

Parameters
marginSet margin in the editor
void QgsCodeEditor::setTitle ( const QString  title)

Set the widget title.

Parameters
titlewidget title

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