#include "TextEditor.h"
 
  
| Signals | |
| void | saveRequested (void) | 
| Public Member Functions | |
| TextEditor (QWidget *_parent=(QWidget *) nullptr) | |
| virtual | ~TextEditor () | 
| virtual void | setupFromConfig (const TextEditorCfg &_config, bool _isUpdate) | 
| Setup the TextEditor. | |
| int | lineNumberAreaWidth (void) const | 
| void | lineNumberAreaPaintEvent (QPaintEvent *_event) | 
| void | setContentChanged (void) | 
| void | setContentSaved (void) | 
| bool | getContentChanged (void) const | 
| void | setCode (const QString &_text) | 
| void | setCode (const QStringList &_lines) | 
| QStringList | code (void) const | 
| void | storeSyntaxHighlighter (SyntaxHighlighter *_highlighter) | 
| Stores the syntax highlighter. An existing syntax highlighter will be replaced. The TextEditor takes ownership of the highlighter. | |
| SyntaxHighlighter * | getSyntaxHighlighter (void) | 
| Returns the current syntax highlighter. The TextEditor keeps ownership of the highlighter. | |
| SyntaxHighlighter * | takeSyntaxHighlighter (void) | 
| Returns the current syntax highlighter and sets it to 0 internally. The caller takes ownership of the highlighter. | |
| void | setTabSpaces (int _spaces) | 
| int | tabSpaces (void) const | 
| void | setNewLineWithSamePrefix (bool _enabled) | 
| bool | newLineWithSamePrefix (void) const | 
| void | setDuplicateLineShortcutEnabled (bool _enabled) | 
| bool | isDuplicateLineShortcutEnabled (void) const | 
| void | setEnableSameTextHighlighting (bool _enabled) | 
| bool | isSameTextHighlightingEnabled (void) const | 
|  Public Member Functions inherited from ot::PlainTextEdit | |
| PlainTextEdit (QWidget *_parent=(QWidget *) nullptr) | |
| virtual | ~PlainTextEdit () | 
| virtual QWidget * | getQWidget (void) override | 
| Returns a pointer to the root widget of this object. | |
| void | setAutoScrollToBottomEnabled (bool _enabled) | 
| bool | isAutoScrollToBottomEnabled (void) const | 
| void | scrollToBottom (void) | 
|  Public Member Functions inherited from ot::QWidgetInterface | |
| QWidgetInterface () | |
| virtual | ~QWidgetInterface () | 
| void | setOTWidgetFlags (const WidgetFlags &_flags) | 
| const WidgetFlags & | otWidgetFlags (void) const | 
| virtual void | otWidgetFlagsChanged (const WidgetFlags &_flags) | 
| void | centerOnParent (const QWidget *const _parentWidget) | 
| Centers this widget on the parent. If no parent is provided the widget will center on the screen. | |
| QPoint | calculateCenterOnParentPos (const QWidget *const _parentWidget) | 
| Calculates the top left corner of this widget centered on the parent widget. If no parent is provided the widget will center on the screen. | |
| Protected Member Functions | |
| virtual void | contentSaved (void) | 
| virtual void | contentChanged (void) | 
| virtual void | keyPressEvent (QKeyEvent *_event) override | 
| virtual void | resizeEvent (QResizeEvent *_event) override | 
| virtual void | wheelEvent (QWheelEvent *_event) override | 
| Friends | |
| class | TextEditorSearchPopup | 
| Additional Inherited Members | |
|  Public Slots inherited from ot::PlainTextEdit | |
| void | slotTextChanged (void) | 
|  Protected Attributes inherited from ot::QWidgetInterface | |
| WidgetFlags | m_widgetFlags | 
| ot::TextEditor::TextEditor | ( | QWidget * | _parent = (QWidget*)nullptr | ) | 
| 
 | virtual | 
| QStringList ot::TextEditor::code | ( | void | ) | const | 
| 
 | inlineprotectedvirtual | 
Reimplemented in ot::TextEditorView.
| 
 | inlineprotectedvirtual | 
Reimplemented in ot::TextEditorView.
| bool ot::TextEditor::getContentChanged | ( | void | ) | const | 
| 
 | inline | 
Returns the current syntax highlighter. The TextEditor keeps ownership of the highlighter.
| 
 | inline | 
| 
 | inline | 
| 
 | overrideprotectedvirtual | 
| void ot::TextEditor::lineNumberAreaPaintEvent | ( | QPaintEvent * | _event | ) | 
| int ot::TextEditor::lineNumberAreaWidth | ( | void | ) | const | 
| 
 | inline | 
| 
 | overrideprotectedvirtual | 
| 
 | signal | 
| void ot::TextEditor::setCode | ( | const QString & | _text | ) | 
| void ot::TextEditor::setCode | ( | const QStringList & | _lines | ) | 
| void ot::TextEditor::setContentChanged | ( | void | ) | 
| void ot::TextEditor::setContentSaved | ( | void | ) | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | inline | 
| 
 | virtual | 
Setup the TextEditor.
| _config | The config. | 
| _isUpdate | If true the text, name and title won't be set. | 
Reimplemented in ot::TextEditorView.
| void ot::TextEditor::storeSyntaxHighlighter | ( | SyntaxHighlighter * | _highlighter | ) | 
Stores the syntax highlighter. An existing syntax highlighter will be replaced. The TextEditor takes ownership of the highlighter.
| 
 | inline | 
| ot::SyntaxHighlighter * ot::TextEditor::takeSyntaxHighlighter | ( | void | ) | 
Returns the current syntax highlighter and sets it to 0 internally. The caller takes ownership of the highlighter.
| 
 | overrideprotectedvirtual | 
| 
 | friend |