17 #ifndef QGSCODEEDITOR_H
18 #define QGSCODEEDITOR_H
23 #include <Qsci/qsciapis.h>
76 void setTitle(
const QString &title );
83 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
99 void setLineNumbersVisible(
bool visible );
107 bool lineNumbersVisible()
const;
113 void setFoldingVisible(
bool folding );
126 void insertText(
const QString &text );
170 static QFont getMonospaceFont();
179 void setCustomAppearance(
const QString &scheme = QString(),
const QMap< QgsCodeEditorColorScheme::ColorRole, QColor > &customColors = QMap< QgsCodeEditorColorScheme::ColorRole, QColor >(),
const QString &fontFamily = QString(),
int fontSize = 0 )
SIP_SKIP;
187 void addWarning(
int lineNumber, const QString &warning );
195 void clearWarnings();
199 bool isFixedPitch( const QFont &font );
201 void focusOutEvent( QFocusEvent *event ) override;
202 void keyPressEvent( QKeyEvent *event ) override;
211 virtual
void initializeLexer();
225 QFont lexerFont() const;
232 void runPostLexerConfigurationTasks();
238 QString mWidgetTitle;
242 bool mUseDefaultSettings = true;
244 bool mOverrideColors = false;
245 QString mColorScheme;
250 QVector<
int > mWarningLines;
254 static constexpr
int MARKER_NUMBER = 6;
Defines a color scheme for use in QgsCodeEditor widgets.
A text editor based on QScintilla2.
Q_DECL_DEPRECATED bool marginVisible()
Returns whether margins are in a visible state.
bool foldingVisible()
Returns true if the folding controls are visible in the editor.
#define SIP_IF_MODULE(condition)