143 CodeFolding = 1 << 0,
144 ImmediatelyUpdateHistory = 1 << 1,
157 static constexpr
int SEARCH_RESULT_INDICATOR = QsciScintilla::INDIC_MAX - 1;
175 void setTitle( const QString &title );
182 virtual
Qgis::ScriptLanguage language() const;
189 virtual
Qgis::ScriptLanguageCapabilities languageCapabilities() const;
196 static QString languageToString(
Qgis::ScriptLanguage language );
203 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
219 void setLineNumbersVisible(
bool visible );
227 bool lineNumbersVisible()
const;
233 void setFoldingVisible(
bool folding );
239 bool foldingVisible();
246 void insertText(
const QString &text );
290 static QFont getMonospaceFont();
299 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;
307 void addWarning(
int lineNumber, const QString &warning );
315 void clearWarnings();
329 bool isCursorOnLastLine()
const;
339 void setHistoryFilePath(
const QString &path );
348 QStringList history()
const;
372 int linearPosition()
const;
379 void setLinearPosition(
int position );
388 int selectionStart()
const;
397 int selectionEnd()
const;
404 void setLinearSelection(
int start,
int end );
407 virtual void callTip()
override;
416 int wrapPosition(
int line = -1 );
430 void runCommand(
const QString &command,
bool skipHistory =
false );
438 virtual void moveCursorToStart();
446 virtual void moveCursorToEnd();
455 void showPreviousCommand();
464 void showNextCommand();
480 void removeHistoryCommand(
int index );
489 void clearSessionHistory();
498 void clearPersistentHistory();
505 bool writeHistoryFile();
523 virtual bool checkSyntax();
532 virtual void toggleComment();
562 static bool isFixedPitch(
const QFont &font );
564 void focusOutEvent( QFocusEvent *event )
override;
565 void keyPressEvent( QKeyEvent *event )
override;
566 void contextMenuEvent( QContextMenuEvent *event )
override;
567 bool eventFilter( QObject *watched, QEvent *event )
override;
576 virtual void initializeLexer();
590 QFont lexerFont()
const;
597 void runPostLexerConfigurationTasks();
604 void updateSoftHistory();
624 virtual void populateContextMenu( QMenu *menu );
633 virtual QString reformatCodeString(
const QString &
string );
642 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
646 void updateFolding();
647 bool readHistoryFile();
648 void syncSoftHistory();
649 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
650 char getCharacter(
int &pos )
const;
652 QString mWidgetTitle;
653 bool mMargin =
false;
657 bool mUseDefaultSettings =
true;
659 bool mOverrideColors =
false;
660 QString mColorScheme;
661 QMap<QgsCodeEditorColorScheme::ColorRole, QColor> mCustomColors;
665 QVector<int> mWarningLines;
668 QStringList mHistory;
669 QStringList mSoftHistory;
670 int mSoftHistoryIndex = 0;
671 QString mHistoryFilePath;
675 static QMap<QgsCodeEditorColorScheme::ColorRole, QString> sColorRoleToSettingsKey;
677 static constexpr int MARKER_NUMBER = 6;
A boolean settings entry.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)