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 );
422 void runCommand(
const QString &command,
bool skipHistory =
false );
430 virtual void moveCursorToStart();
438 virtual void moveCursorToEnd();
447 void showPreviousCommand();
456 void showNextCommand();
472 void removeHistoryCommand(
int index );
481 void clearSessionHistory();
490 void clearPersistentHistory();
497 bool writeHistoryFile();
515 virtual bool checkSyntax();
524 virtual void toggleComment();
547 static bool isFixedPitch(
const QFont &font );
549 void focusOutEvent( QFocusEvent *event )
override;
550 void keyPressEvent( QKeyEvent *event )
override;
551 void contextMenuEvent( QContextMenuEvent *event )
override;
552 bool eventFilter( QObject *watched, QEvent *event )
override;
561 virtual void initializeLexer();
575 QFont lexerFont()
const;
582 void runPostLexerConfigurationTasks();
589 void updateSoftHistory();
609 virtual void populateContextMenu( QMenu *menu );
618 virtual QString reformatCodeString(
const QString &
string );
627 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
632 void updateFolding();
633 bool readHistoryFile();
634 void syncSoftHistory();
635 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
637 QString mWidgetTitle;
638 bool mMargin =
false;
642 bool mUseDefaultSettings =
true;
644 bool mOverrideColors =
false;
645 QString mColorScheme;
646 QMap< QgsCodeEditorColorScheme::ColorRole, QColor > mCustomColors;
650 QVector< int > mWarningLines;
653 QStringList mHistory;
654 QStringList mSoftHistory;
655 int mSoftHistoryIndex = 0;
656 QString mHistoryFilePath;
660 static QMap< QgsCodeEditorColorScheme::ColorRole, QString > sColorRoleToSettingsKey;
662 static constexpr int MARKER_NUMBER = 6;
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)