This is the general edbee widget The core functionality of this widget is divided in several separate components. (TextEditorComponent: the main editor, TextMarginComponent: the sidebar with line numbers)
More...
#include <texteditorwidget.h>
|
void | scrollTopToLine (int line) |
| this method scrolls the top position to the given line
|
|
virtual void | updateLineAtOffset (int offset) |
| updates the given line so it will be repainted @Param offset the offset of the line that needs repainting
|
|
virtual void | updateAreaAroundOffset (int offset, int width=8) |
| updates the character before and at the given offset
|
|
virtual void | updateLine (int line, int length=1) |
| This method repaints the given lines.
|
|
virtual void | updateComponents () |
| Calls update on all components.
|
|
virtual void | updateGeometryComponents () |
| Updates the geometry for all components.
|
|
virtual void | updateRendererViewport () |
| Updates the renderer viewport.
|
|
|
virtual void | resizeEvent (QResizeEvent *event) |
| This method is called when a resize happens.
|
|
bool | eventFilter (QObject *obj, QEvent *event) |
| a basic event-filter for receiving focus-events of the editor
|
|
This is the general edbee widget The core functionality of this widget is divided in several separate components. (TextEditorComponent: the main editor, TextMarginComponent: the sidebar with line numbers)
◆ TextEditorWidget() [1/4]
edbee::TextEditorWidget::TextEditorWidget |
( |
TextEditorController * | controller, |
|
|
QWidget * | parent = 0 ) |
|
explicit |
The default TextEditor widget constructor.
- Todo
- : Check if this works.. It could be possible the layout screws this If I add this before the setLayout everything hangs :S ...
◆ TextEditorWidget() [2/4]
edbee::TextEditorWidget::TextEditorWidget |
( |
TextDocument * | document, |
|
|
QWidget * | parent = 0 ) |
|
explicit |
◆ TextEditorWidget() [3/4]
edbee::TextEditorWidget::TextEditorWidget |
( |
TextEditorConfig * | config, |
|
|
QWidget * | parent = 0 ) |
|
explicit |
◆ TextEditorWidget() [4/4]
edbee::TextEditorWidget::TextEditorWidget |
( |
QWidget * | parent = 0 | ) |
|
|
explicit |
◆ ~TextEditorWidget()
edbee::TextEditorWidget::~TextEditorWidget |
( |
| ) |
|
|
virtual |
◆ autoScrollMargin()
int edbee::TextEditorWidget::autoScrollMargin |
( |
| ) |
const |
Returns the auto scroll margin.
◆ commandMap()
Return the associated commandmap.
◆ config()
Returns the configuration object for this widget.
◆ connectHorizontalScrollBar
void edbee::TextEditorWidget::connectHorizontalScrollBar |
( |
| ) |
|
|
protectedslot |
Connects the horizontal scrollbar so it updates the rendering viewport.
◆ connectVerticalScrollBar
void edbee::TextEditorWidget::connectVerticalScrollBar |
( |
| ) |
|
|
protectedslot |
Connects the vertical scrollbar so it updates the rendering viewport.
◆ controller()
◆ eventFilter()
bool edbee::TextEditorWidget::eventFilter |
( |
QObject * | obj, |
|
|
QEvent * | event ) |
|
protected |
a basic event-filter for receiving focus-events of the editor
- Parameters
-
obj | the object to filter the events for |
event | the event to filter |
◆ focusIn
void edbee::TextEditorWidget::focusIn |
( |
QWidget * | event | ) |
|
|
signal |
◆ focusOut
void edbee::TextEditorWidget::focusOut |
( |
QWidget * | event | ) |
|
|
signal |
◆ fullUpdate()
void edbee::TextEditorWidget::fullUpdate |
( |
| ) |
|
This method performs a full update. Which means it calibrates the scrollbars invalidates all caches, redraws the screen and updates the scrollbars.
◆ horizontalScrollBar()
QScrollBar * edbee::TextEditorWidget::horizontalScrollBar |
( |
| ) |
const |
Return the horizontal scrollbar.
◆ horizontalScrollBarChanged
void edbee::TextEditorWidget::horizontalScrollBarChanged |
( |
QScrollBar * | newScrollBar | ) |
|
|
signal |
◆ keyMap()
return the associated keymap
◆ readonly()
bool edbee::TextEditorWidget::readonly |
( |
| ) |
const |
|
virtual |
Return the readonly status.
◆ resetCaretTime()
void edbee::TextEditorWidget::resetCaretTime |
( |
| ) |
|
This method resets the caret time.
◆ resizeEvent()
void edbee::TextEditorWidget::resizeEvent |
( |
QResizeEvent * | event | ) |
|
|
protectedvirtual |
This method is called when a resize happens.
- Parameters
-
event | the event of the editor widget |
◆ scrollPositionVisible()
void edbee::TextEditorWidget::scrollPositionVisible |
( |
int | xPosIn, |
|
|
int | yPosIn ) |
This method makes sure the given position is visible.
- Parameters
-
xposIn | the position in text-editor 'coordinates' |
yPosIn | the position in text-editor 'coordinates' |
◆ scrollTopToLine
void edbee::TextEditorWidget::scrollTopToLine |
( |
int | line | ) |
|
|
slot |
this method scrolls the top position to the given line
- Parameters
-
line | the line to scroll to |
◆ setAutoScrollMargin()
void edbee::TextEditorWidget::setAutoScrollMargin |
( |
int | amount = 50 | ) |
|
Sets the auto scrollmargin.
◆ setHorizontalScrollBar()
void edbee::TextEditorWidget::setHorizontalScrollBar |
( |
QScrollBar * | scrollBar | ) |
|
Use this method to change the horizontal scrollbar. By using this method listeners of the scrollbar well be informed the scrollbar has been changed.
- Parameters
-
scrollBar | the scrollbar to use |
◆ setPlaceholderText()
void edbee::TextEditorWidget::setPlaceholderText |
( |
const QString & | text | ) |
|
◆ setReadonly()
void edbee::TextEditorWidget::setReadonly |
( |
bool | readonly | ) |
|
◆ setVerticalScrollBar()
void edbee::TextEditorWidget::setVerticalScrollBar |
( |
QScrollBar * | scrollBar | ) |
|
Use this method to change a scrollbar. By using this method listeners of the scrollbar well be informed the scrollbar has been changed.
- Parameters
-
scrollBar | the scrollbar to use |
◆ textDocument()
TextDocument * edbee::TextEditorWidget::textDocument |
( |
| ) |
const |
Returns the textdocument for this widget.
◆ textEditorComponent()
Returns the editor component-part of the editor.
◆ textMarginComponent()
Returns the active margin component.
◆ textRenderer()
TextRenderer * edbee::TextEditorWidget::textRenderer |
( |
| ) |
const |
Returns the text-renderer.
◆ textScrollArea()
Returns the active scroll area.
◆ textSelection()
Return the textselection.
◆ updateAreaAroundOffset
void edbee::TextEditorWidget::updateAreaAroundOffset |
( |
int | offset, |
|
|
int | width = 8 ) |
|
virtualslot |
updates the character before and at the given offset
- Parameters
-
offset | the offset of the area to repaint. |
width | the width of the area to update (default is 8 pixels) |
◆ updateComponents
void edbee::TextEditorWidget::updateComponents |
( |
| ) |
|
|
virtualslot |
Calls update on all components.
◆ updateGeometryComponents
void edbee::TextEditorWidget::updateGeometryComponents |
( |
| ) |
|
|
virtualslot |
Updates the geometry for all components.
◆ updateLine
void edbee::TextEditorWidget::updateLine |
( |
int | line, |
|
|
int | length = 1 ) |
|
virtualslot |
This method repaints the given lines.
- Parameters
-
line | the line that updates the given line |
length | the number of lines to update. (default is 1 line) |
◆ updateLineAtOffset
void edbee::TextEditorWidget::updateLineAtOffset |
( |
int | offset | ) |
|
|
virtualslot |
updates the given line so it will be repainted @Param offset the offset of the line that needs repainting
◆ updateRendererViewport
void edbee::TextEditorWidget::updateRendererViewport |
( |
| ) |
|
|
virtualslot |
Updates the renderer viewport.
◆ verticalScrollBar()
QScrollBar * edbee::TextEditorWidget::verticalScrollBar |
( |
| ) |
const |
returns the vertical scrollbar
◆ verticalScrollBarChanged
void edbee::TextEditorWidget::verticalScrollBarChanged |
( |
QScrollBar * | newScrollBar | ) |
|
|
signal |
The documentation for this class was generated from the following files: