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 );
427 int editingTimeoutInterval()
const;
442 void runCommand(
const QString &command,
bool skipHistory =
false );
450 virtual void moveCursorToStart();
458 virtual void moveCursorToEnd();
467 void showPreviousCommand();
476 void showNextCommand();
492 void removeHistoryCommand(
int index );
501 void clearSessionHistory();
510 void clearPersistentHistory();
517 bool writeHistoryFile();
535 virtual bool checkSyntax();
544 virtual void toggleComment();
551 void adjustScrollWidth();
554 void setText(
const QString &text )
override;
565 void setEditingTimeoutInterval(
int timeout );
609 static bool isFixedPitch(
const QFont &font );
611 void focusOutEvent( QFocusEvent *event )
override;
612 void keyPressEvent( QKeyEvent *event )
override;
613 void contextMenuEvent( QContextMenuEvent *event )
override;
614 bool eventFilter( QObject *watched, QEvent *event )
override;
622 virtual void initializeLexer();
636 QFont lexerFont()
const;
643 void runPostLexerConfigurationTasks();
650 void updateSoftHistory();
670 virtual void populateContextMenu( QMenu *menu );
679 virtual QString reformatCodeString(
const QString &
string );
688 virtual void showMessage(
const QString &title,
const QString &message,
Qgis::MessageLevel level );
691 void onLastEditTimeout();
695 void updateFolding();
696 bool readHistoryFile();
697 void syncSoftHistory();
698 void updateHistory(
const QStringList &commands,
bool skipSoftHistory =
false );
699 char getCharacter(
int &pos )
const;
701 QString mWidgetTitle;
702 bool mMargin =
false;
706 bool mUseDefaultSettings =
true;
708 bool mOverrideColors =
false;
709 QString mColorScheme;
710 QMap<QgsCodeEditorColorScheme::ColorRole, QColor> mCustomColors;
714 QVector<int> mWarningLines;
717 QStringList mHistory;
718 QStringList mSoftHistory;
719 int mSoftHistoryIndex = 0;
720 QString mHistoryFilePath;
724 static QMap<QgsCodeEditorColorScheme::ColorRole, QString> sColorRoleToSettingsKey;
726 static constexpr int MARKER_NUMBER = 6;
728 QTimer *mLastEditTimer =
nullptr;
A boolean settings entry.
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)