141 CodeFolding = 1 << 0,
142 ImmediatelyUpdateHistory = 1 << 1,
151 Q_DECLARE_FLAGS( Flags, Flag )
171 void setTitle(
const QString & title );
185 virtual Qgis::ScriptLanguageCapabilities languageCapabilities()
const;
199 Q_DECL_DEPRECATED
void setMarginVisible(
bool margin )
SIP_DEPRECATED;
215 void setLineNumbersVisible(
bool visible );
223 bool lineNumbersVisible()
const;
229 void setFoldingVisible(
bool folding );
235 bool foldingVisible();
242 void insertText(
const QString & text );
286 static QFont getMonospaceFont();
295 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;
303 void addWarning(
int lineNumber, const QString & warning );
311 void clearWarnings();
325 bool isCursorOnLastLine()
const;
335 void setHistoryFilePath(
const QString &path );
344 QStringList history()
const;
375 void runCommand(
const QString &command,
bool skipHistory =
false );
383 virtual void moveCursorToStart();
391 virtual void moveCursorToEnd();
400 void showPreviousCommand();
409 void showNextCommand();
425 void removeHistoryCommand(
int index );
434 void clearSessionHistory();
443 void clearPersistentHistory();
450 bool writeHistoryFile();
468 virtual bool checkSyntax();
477 virtual void toggleComment();
500 static bool isFixedPitch(
const QFont &font );
502 void focusOutEvent( QFocusEvent *event )
override;
503 void keyPressEvent( QKeyEvent *event )
override;
504 void contextMenuEvent( QContextMenuEvent *event )
override;
505 bool eventFilter( QObject *watched, QEvent *event )
override;
514 virtual void initializeLexer();
528 QFont lexerFont()
const;
535 void runPostLexerConfigurationTasks();
542 void updateSoftHistory();
562 virtual void populateContextMenu( QMenu *menu );
571 virtual QString reformatCodeString(
const QString &
string );
580 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
585 void updateFolding();
586 bool readHistoryFile();
587 void syncSoftHistory();
588 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
590 QString mWidgetTitle;
591 bool mMargin =
false;
592 QgsCodeEditor::Flags mFlags;
595 bool mUseDefaultSettings =
true;
597 bool mOverrideColors =
false;
598 QString mColorScheme;
599 QMap< QgsCodeEditorColorScheme::ColorRole, QColor > mCustomColors;
603 QVector< int > mWarningLines;
606 QStringList mHistory;
607 QStringList mSoftHistory;
608 int mSoftHistoryIndex = 0;
609 QString mHistoryFilePath;
613 static QMap< QgsCodeEditorColorScheme::ColorRole, QString > sColorRoleToSettingsKey;
615 static constexpr int MARKER_NUMBER = 6;
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)