QGIS API Documentation
2.12.0-Lyon
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
gui
qgscodeeditor.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgscodeeditor.h - A base code editor for QGIS and plugins. Provides
3
a base editor using QScintilla for editors
4
--------------------------------------
5
Date : 06-Oct-2013
6
Copyright : (C) 2013 by Salvatore Larosa
7
Email : lrssvtml (at) gmail (dot) com
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#ifndef QGSCODEEDITOR_H
18
#define QGSCODEEDITOR_H
19
20
#include <QString>
21
// qscintilla includes
22
#include <Qsci/qsciapis.h>
23
24
25
class
QWidget
;
26
31
class
GUI_EXPORT
QgsCodeEditor
:
public
QsciScintilla
32
{
33
Q_OBJECT
34
35
public
:
45
QgsCodeEditor
(
QWidget
*parent = 0,
const
QString
& title =
""
,
bool
folding =
false
,
bool
margin =
false
);
46
~
QgsCodeEditor
();
47
51
void
setTitle(
const
QString
& title );
52
56
void
setMarginVisible(
bool
margin );
57
bool
marginVisible
() {
return
mMargin; }
58
62
void
setFoldingVisible(
bool
folding );
63
bool
foldingVisible
() {
return
mFolding; }
64
69
void
insertText(
const
QString
& theText );
70
71
protected
:
72
73
bool
isFixedPitch(
const
QFont
& font );
74
75
QFont
getMonospaceFont();
76
77
private
:
78
79
void
setSciWidget();
80
81
QString
mWidgetTitle;
82
bool
mFolding;
83
bool
mMargin;
84
};
85
86
#endif
QWidget
QgsCodeEditor
A text editor based on QScintilla2.
Definition:
qgscodeeditor.h:31
QFont
QgsCodeEditor::marginVisible
bool marginVisible()
Definition:
qgscodeeditor.h:57
QString
QgsCodeEditor::foldingVisible
bool foldingVisible()
Definition:
qgscodeeditor.h:63
Generated on Sat Oct 24 2015 04:11:25 for QGIS API Documentation by
1.8.9.1