QGIS API Documentation  2.8.2-Wien
 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 ()
bool foldingVisible ()
void insertText (const QString theText)
 Insert text at cursor position, or replace any selected text if user has made a selection.
bool marginVisible ()
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.

Protected Member Functions

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

Detailed Description

A text editor based on QScintilla2.

Note
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.

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

Definition at line 24 of file qgscodeeditor.cpp.

QgsCodeEditor::~QgsCodeEditor ( )

Definition at line 43 of file qgscodeeditor.cpp.

Member Function Documentation

bool QgsCodeEditor::foldingVisible ( )
inline

Definition at line 63 of file qgscodeeditor.h.

QFont QgsCodeEditor::getMonospaceFont ( )
protected

Definition at line 132 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.

Parameters
theTextThe text to be inserted

Definition at line 109 of file qgscodeeditor.cpp.

bool QgsCodeEditor::isFixedPitch ( const QFont &  font)
protected

Definition at line 126 of file qgscodeeditor.cpp.

bool QgsCodeEditor::marginVisible ( )
inline

Definition at line 57 of file qgscodeeditor.h.

void QgsCodeEditor::setFoldingVisible ( bool  folding)

Set folding visible state.

Parameters
foldingSet folding in the editor

Definition at line 95 of file qgscodeeditor.cpp.

void QgsCodeEditor::setMarginVisible ( bool  margin)

Set margin visible state.

Parameters
marginSet margin in the editor

Definition at line 75 of file qgscodeeditor.cpp.

void QgsCodeEditor::setTitle ( const QString  title)

Set the widget title.

Parameters
titlewidget title

Definition at line 70 of file qgscodeeditor.cpp.


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