QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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

Public Member Functions

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

Protected Member Functions

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

Detailed Description

A text editor based on QScintilla2.

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.

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

Member Function Documentation

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

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

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

Set folding visible state.

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

Set margin visible state.

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

Set the widget title.

titlewidget title

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