QGIS API Documentation  2.10.1-Pisa
 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

Public Member Functions

 QgsCodeEditor (QWidget *parent=0, QString title="", bool folding=false, bool margin=false)
 Construct a new code editor. More...
 ~QgsCodeEditor ()
bool foldingVisible ()
void insertText (const QString theText)
 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...

Protected Member Functions

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

Detailed Description

A text editor based on QScintilla2.

added in 2.6

Definition at line 31 of file qgscodeeditor.h.

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

Definition at line 24 of file qgscodeeditor.cpp.

QgsCodeEditor::~QgsCodeEditor ( )

Definition at line 43 of file qgscodeeditor.cpp.

Member Function Documentation

bool QgsCodeEditor::foldingVisible ( )

Definition at line 63 of file qgscodeeditor.h.

QFont QgsCodeEditor::getMonospaceFont ( )

Definition at line 131 of file qgscodeeditor.cpp.

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

Definition at line 109 of file qgscodeeditor.cpp.

bool QgsCodeEditor::isFixedPitch ( const QFont font)

Definition at line 126 of file qgscodeeditor.cpp.

bool QgsCodeEditor::marginVisible ( )

Definition at line 57 of file qgscodeeditor.h.

void QgsCodeEditor::setFoldingVisible ( bool  folding)

Set folding visible state.

foldingSet folding in the editor

Definition at line 95 of file qgscodeeditor.cpp.

void QgsCodeEditor::setMarginVisible ( bool  margin)

Set margin visible state.

marginSet margin in the editor

Definition at line 75 of file qgscodeeditor.cpp.

void QgsCodeEditor::setTitle ( const QString  title)

Set the widget title.

titlewidget title

Definition at line 70 of file qgscodeeditor.cpp.

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