148 CodeFolding = 1 << 0,
149 ImmediatelyUpdateHistory = 1 << 1,
162 static constexpr
int SEARCH_RESULT_INDICATOR = QsciScintilla::INDIC_MAX - 1;
180 void setTitle( const QString &title );
187 virtual
Qgis::ScriptLanguage language() const;
194 virtual
Qgis::ScriptLanguageCapabilities languageCapabilities() const;
201 static QString languageToString(
Qgis::ScriptLanguage language );
208 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
224 void setLineNumbersVisible(
bool visible );
232 bool lineNumbersVisible()
const;
238 void setFoldingVisible(
bool folding );
244 bool foldingVisible();
251 void insertText(
const QString &text );
295 static QFont getMonospaceFont();
304 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;
312 void addWarning(
int lineNumber, const QString &warning );
320 void clearWarnings();
334 bool isCursorOnLastLine()
const;
344 void setHistoryFilePath(
const QString &path );
353 QStringList history()
const;
377 int linearPosition()
const;
384 void setLinearPosition(
int position );
393 int selectionStart()
const;
402 int selectionEnd()
const;
409 void setLinearSelection(
int start,
int end );
423 void runCommand(
const QString &command,
bool skipHistory =
false );
431 virtual void moveCursorToStart();
439 virtual void moveCursorToEnd();
448 void showPreviousCommand();
457 void showNextCommand();
473 void removeHistoryCommand(
int index );
482 void clearSessionHistory();
491 void clearPersistentHistory();
498 bool writeHistoryFile();
516 virtual bool checkSyntax();
525 virtual void toggleComment();
548 static bool isFixedPitch(
const QFont &font );
550 void focusOutEvent( QFocusEvent *event )
override;
551 void keyPressEvent( QKeyEvent *event )
override;
552 void contextMenuEvent( QContextMenuEvent *event )
override;
553 bool eventFilter( QObject *watched, QEvent *event )
override;
562 virtual void initializeLexer();
576 QFont lexerFont()
const;
583 void runPostLexerConfigurationTasks();
590 void updateSoftHistory();
610 virtual void populateContextMenu( QMenu *menu );
619 virtual QString reformatCodeString(
const QString &
string );
628 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
633 void updateFolding();
634 bool readHistoryFile();
635 void syncSoftHistory();
636 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
638 QString mWidgetTitle;
639 bool mMargin =
false;
643 bool mUseDefaultSettings =
true;
645 bool mOverrideColors =
false;
646 QString mColorScheme;
647 QMap< QgsCodeEditorColorScheme::ColorRole, QColor > mCustomColors;
651 QVector< int > mWarningLines;
654 QStringList mHistory;
655 QStringList mSoftHistory;
656 int mSoftHistoryIndex = 0;
657 QString mHistoryFilePath;
661 static QMap< QgsCodeEditorColorScheme::ColorRole, QString > sColorRoleToSettingsKey;
663 static constexpr int MARKER_NUMBER = 6;
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)