QGIS API Documentation
2.14.0-Essen
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
32
class
GUI_EXPORT
QgsCodeEditor
:
public
QsciScintilla
33
{
34
Q_OBJECT
35
36
public
:
46
QgsCodeEditor
(
QWidget
*parent =
nullptr
,
const
QString
& title =
""
,
bool
folding =
false
,
bool
margin =
false
);
47
~
QgsCodeEditor
();
48
52
void
setTitle(
const
QString
& title );
53
57
void
setMarginVisible(
bool
margin );
58
bool
marginVisible
() {
return
mMargin; }
59
63
void
setFoldingVisible(
bool
folding );
64
bool
foldingVisible
() {
return
mFolding; }
65
70
void
insertText(
const
QString
& theText );
71
72
protected
:
73
74
bool
isFixedPitch(
const
QFont
& font );
75
76
QFont
getMonospaceFont();
77
78
private
:
79
80
void
setSciWidget();
81
82
QString
mWidgetTitle;
83
bool
mFolding;
84
bool
mMargin;
85
};
86
87
#endif
QWidget
QgsCodeEditor
A text editor based on QScintilla2.
Definition:
qgscodeeditor.h:32
QFont
QgsCodeEditor::marginVisible
bool marginVisible()
Definition:
qgscodeeditor.h:58
QString
QgsCodeEditor::foldingVisible
bool foldingVisible()
Definition:
qgscodeeditor.h:64
Generated on Sat Feb 27 2016 18:33:25 for QGIS API Documentation by
1.8.11