147 CodeFolding = 1 << 0,
148 ImmediatelyUpdateHistory = 1 << 1,
161 static constexpr
int SEARCH_RESULT_INDICATOR = QsciScintilla::INDIC_MAX - 1;
179 void setTitle( const QString &title );
186 virtual
Qgis::ScriptLanguage language() const;
193 virtual
Qgis::ScriptLanguageCapabilities languageCapabilities() const;
200 static QString languageToString(
Qgis::ScriptLanguage language );
207 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
223 void setLineNumbersVisible(
bool visible );
231 bool lineNumbersVisible()
const;
237 void setFoldingVisible(
bool folding );
243 bool foldingVisible();
250 void insertText(
const QString &text );
294 static QFont getMonospaceFont();
303 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;
311 void addWarning(
int lineNumber, const QString &warning );
319 void clearWarnings();
333 bool isCursorOnLastLine()
const;
343 void setHistoryFilePath(
const QString &path );
352 QStringList history()
const;
376 int linearPosition()
const;
383 void setLinearPosition(
int position );
392 int selectionStart()
const;
401 int selectionEnd()
const;
408 void setLinearSelection(
int start,
int end );
411 virtual void callTip()
override;
420 int wrapPosition(
int line = -1 );
434 void runCommand(
const QString &command,
bool skipHistory =
false );
442 virtual void moveCursorToStart();
450 virtual void moveCursorToEnd();
459 void showPreviousCommand();
468 void showNextCommand();
484 void removeHistoryCommand(
int index );
493 void clearSessionHistory();
502 void clearPersistentHistory();
509 bool writeHistoryFile();
527 virtual bool checkSyntax();
536 virtual void toggleComment();
559 static bool isFixedPitch(
const QFont &font );
561 void focusOutEvent( QFocusEvent *event )
override;
562 void keyPressEvent( QKeyEvent *event )
override;
563 void contextMenuEvent( QContextMenuEvent *event )
override;
564 bool eventFilter( QObject *watched, QEvent *event )
override;
573 virtual void initializeLexer();
587 QFont lexerFont()
const;
594 void runPostLexerConfigurationTasks();
601 void updateSoftHistory();
621 virtual void populateContextMenu( QMenu *menu );
630 virtual QString reformatCodeString(
const QString &
string );
639 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
644 void updateFolding();
645 bool readHistoryFile();
646 void syncSoftHistory();
647 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
648 char getCharacter(
int &pos )
const;
650 QString mWidgetTitle;
651 bool mMargin =
false;
655 bool mUseDefaultSettings =
true;
657 bool mOverrideColors =
false;
658 QString mColorScheme;
659 QMap< QgsCodeEditorColorScheme::ColorRole, QColor > mCustomColors;
663 QVector< int > mWarningLines;
666 QStringList mHistory;
667 QStringList mSoftHistory;
668 int mSoftHistoryIndex = 0;
669 QString mHistoryFilePath;
673 static QMap< QgsCodeEditorColorScheme::ColorRole, QString > sColorRoleToSettingsKey;
675 static constexpr int MARKER_NUMBER = 6;
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)