51 TextEditor(QWidget* _parent = (QWidget*)
nullptr);
57 virtual void setupFromConfig(
const TextEditorCfg& _config,
bool _isUpdate);
59 int lineNumberAreaWidth(
void)
const;
60 void lineNumberAreaPaintEvent(QPaintEvent * _event);
62 void setContentChanged(
void);
63 void setContentSaved(
void);
64 bool getContentChanged(
void)
const;
66 void setCode(
const QString& _text);
67 void setCode(
const QStringList& _lines);
69 bool saveToFile(
const QString& _fileName);
71 QStringList code(
void)
const;
102 void slotSaveRequested(
void);
105 virtual void keyPressEvent(QKeyEvent* _event)
override;
106 virtual void resizeEvent(QResizeEvent * _event)
override;
107 virtual void wheelEvent(QWheelEvent* _event)
override;
110 void slotUpdateLineNumberAreaWidth(
int _newBlockCount);
111 void slotHighlightCurrentLine();
112 void slotUpdateLineNumberArea(
const QRect & _rect,
int _dy);
113 void slotFindRequested(
void);
114 void slotFindClosing(
void);
115 void slotDuplicateLine(
void);
117 void slotSelectionChanged(
void);
122 void getCurrentLineSelection(QList<QTextEdit::ExtraSelection>& _selections);
123 void addAdditionalSelections(QList<QTextEdit::ExtraSelection>& _selections);
128 bool m_newLineSamePrefix;
129 bool m_enableDuplicateLineShortcut;
130 bool m_enableSameTextHighlighting;
131 int m_sameTextHighlightingMinimum;
#define OT_DECL_NOCOPY(___class)
Removes the default copy constructor and assignment operator.
Definition OTClassHelper.h:14
Definition PlainTextEdit.h:17
Definition TextEditorCfg.h:19
Definition TextEditor.h:47
bool isSameTextHighlightingEnabled(void) const
Definition TextEditor.h:96
bool newLineWithSamePrefix(void) const
Definition TextEditor.h:90
void setEnableSameTextHighlighting(bool _enabled)
Definition TextEditor.h:95
void setDuplicateLineShortcutEnabled(bool _enabled)
Definition TextEditor.h:92
int tabSpaces(void) const
Definition TextEditor.h:87
void setNewLineWithSamePrefix(bool _enabled)
Definition TextEditor.h:89
void setTabSpaces(int _spaces)
Definition TextEditor.h:86
bool isDuplicateLineShortcutEnabled(void) const
Definition TextEditor.h:93
SyntaxHighlighter * getSyntaxHighlighter(void)
Returns the current syntax highlighter. The TextEditor keeps ownership of the highlighter.
Definition TextEditor.h:80
Definition TextEditor.h:27