149 CodeFolding = 1 << 0,
150 ImmediatelyUpdateHistory = 1 << 1,
163 static constexpr
int SEARCH_RESULT_INDICATOR = QsciScintilla::INDIC_MAX - 1;
181 void setTitle( const QString &title );
188 virtual
Qgis::ScriptLanguage language() const;
195 virtual
Qgis::ScriptLanguageCapabilities languageCapabilities() const;
202 static QString languageToString(
Qgis::ScriptLanguage language );
209 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
225 void setLineNumbersVisible(
bool visible );
233 bool lineNumbersVisible()
const;
239 void setFoldingVisible(
bool folding );
245 bool foldingVisible();
252 void insertText(
const QString &text );
296 static QFont getMonospaceFont();
305 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;
313 void addWarning(
int lineNumber, const QString &warning );
321 void clearWarnings();
335 bool isCursorOnLastLine()
const;
345 void setHistoryFilePath(
const QString &path );
354 QStringList history()
const;
378 int linearPosition()
const;
385 void setLinearPosition(
int position );
394 int selectionStart()
const;
403 int selectionEnd()
const;
410 void setLinearSelection(
int start,
int end );
413 virtual void callTip()
override;
422 int wrapPosition(
int line = -1 );
436 void runCommand(
const QString &command,
bool skipHistory =
false );
444 virtual void moveCursorToStart();
452 virtual void moveCursorToEnd();
461 void showPreviousCommand();
470 void showNextCommand();
486 void removeHistoryCommand(
int index );
495 void clearSessionHistory();
504 void clearPersistentHistory();
511 bool writeHistoryFile();
529 virtual bool checkSyntax();
538 virtual void toggleComment();
569 static bool isFixedPitch(
const QFont &font );
571 void focusOutEvent( QFocusEvent *event )
override;
572 void keyPressEvent( QKeyEvent *event )
override;
573 void contextMenuEvent( QContextMenuEvent *event )
override;
574 bool eventFilter( QObject *watched, QEvent *event )
override;
583 virtual void initializeLexer();
597 QFont lexerFont()
const;
604 void runPostLexerConfigurationTasks();
611 void updateSoftHistory();
631 virtual void populateContextMenu( QMenu *menu );
640 virtual QString reformatCodeString(
const QString &
string );
649 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
654 void updateFolding();
655 bool readHistoryFile();
656 void syncSoftHistory();
657 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
658 char getCharacter(
int &pos )
const;
660 QString mWidgetTitle;
661 bool mMargin =
false;
665 bool mUseDefaultSettings =
true;
667 bool mOverrideColors =
false;
668 QString mColorScheme;
669 QMap< QgsCodeEditorColorScheme::ColorRole, QColor > mCustomColors;
673 QVector< int > mWarningLines;
676 QStringList mHistory;
677 QStringList mSoftHistory;
678 int mSoftHistoryIndex = 0;
679 QString mHistoryFilePath;
683 static QMap< QgsCodeEditorColorScheme::ColorRole, QString > sColorRoleToSettingsKey;
685 static constexpr int MARKER_NUMBER = 6;
A boolean settings entry.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)