edbee - Qt Editor Library
Public Slots | Signals | Public Member Functions | Protected Slots | Protected Member Functions | List of all members
edbee::TextEditorWidget Class Reference

This is the general edbee widget This core functionality of this widget is divided in several seperate compnents. (TextEditorComponent: the main editor, TextMarginComponent: the sidebar with line numbers) More...

#include <texteditorwidget.h>

+ Inheritance diagram for edbee::TextEditorWidget:
+ Collaboration diagram for edbee::TextEditorWidget:

Public Slots

void scrollTopToLine (int line)
 this method scrolls the top position to the given line More...
 
virtual void updateLineAtOffset (int offset)
 updates the given line so it will be repainted offset the offset of the line that needs repainting More...
 
virtual void updateAreaAroundOffset (int offset, int width=8)
 updates the character before and at the given offest More...
 
virtual void updateLine (int line, int length=1)
 This method repaints the given lines. More...
 
virtual void updateComponents ()
 Calls update on all components. More...
 
virtual void updateGeometryComponents ()
 Updates the geometry for all components. More...
 
virtual void updateRendererViewport ()
 Updates the renderer viewport. More...
 

Signals

void focusIn (QWidget *event)
 
void focusOut (QWidget *event)
 
void verticalScrollBarChanged (QScrollBar *newScrollBar)
 
void horizontalScrollBarChanged (QScrollBar *newScrollBar)
 

Public Member Functions

 TextEditorWidget (QWidget *parent=0)
 The default TextEditor widget constructor. More...
 
virtual ~TextEditorWidget ()
 The editor constructor. More...
 
void scrollPositionVisible (int xPosIn, int yPosIn)
 This method makes sure the given position is visible. More...
 
TextEditorControllercontroller () const
 returns the controller for this editor More...
 
TextEditorConfigconfig () const
 Returns the confirguation object for this widget. More...
 
TextEditorCommandMapcommandMap () const
 Return the associated commandmap. More...
 
TextEditorKeyMapkeyMap () const
 return the associated keymap More...
 
TextDocumenttextDocument () const
 Returns the textdocument for this widget. More...
 
TextRenderertextRenderer () const
 Returns the text-renderer. More...
 
TextSelectiontextSelection () const
 Return the textselection. More...
 
TextEditorComponenttextEditorComponent () const
 Returns the editor component-part of the editor. More...
 
TextMarginComponenttextMarginComponent () const
 Returns the active margin component. More...
 
TextEditorScrollAreatextScrollArea () const
 Returns the active scroll area. More...
 
void resetCaretTime ()
 This method resets the caret time. More...
 
void fullUpdate ()
 This method performs a full update. Which means it callibirates the scrollbars invalidates all caches, redraws the screen and updates the scrollbars. More...
 
QScrollBar * horizontalScrollBar () const
 Return the horizontal scrollbar. More...
 
QScrollBar * verticalScrollBar () const
 returns the vertical scrollbar More...
 
void 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. More...
 
void 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. More...
 

Protected Slots

void connectVerticalScrollBar ()
 Connects the vertical scrollbar so it updates the rendering viewport. More...
 
void connectHorizontalScrollBar ()
 Connects the horizontal scrollbar so it updates the rendering viewport. More...
 

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event)
 This mehtod is called when a resize happens. More...
 
bool eventFilter (QObject *obj, QEvent *event)
 a basic event-filter for recieving focus-events of the editor More...
 

Detailed Description

This is the general edbee widget This core functionality of this widget is divided in several seperate compnents. (TextEditorComponent: the main editor, TextMarginComponent: the sidebar with line numbers)

Constructor & Destructor Documentation

◆ TextEditorWidget()

edbee::TextEditorWidget::TextEditorWidget ( QWidget *  parent = 0)
explicit

The default TextEditor widget constructor.

◆ ~TextEditorWidget()

edbee::TextEditorWidget::~TextEditorWidget ( )
virtual

The editor constructor.

Member Function Documentation

◆ commandMap()

TextEditorCommandMap * edbee::TextEditorWidget::commandMap ( ) const

Return the associated commandmap.

◆ config()

TextEditorConfig * edbee::TextEditorWidget::config ( ) const

Returns the confirguation 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()

TextEditorController * edbee::TextEditorWidget::controller ( ) const

returns the controller for this editor

Returns
the active TextEditorController

◆ eventFilter()

bool edbee::TextEditorWidget::eventFilter ( QObject *  obj,
QEvent *  event 
)
protected

a basic event-filter for recieving focus-events of the editor

Parameters
objthe object to filter the events for
eventthe 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 callibirates 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()

TextEditorKeyMap * edbee::TextEditorWidget::keyMap ( ) const

return the associated keymap

◆ resetCaretTime()

void edbee::TextEditorWidget::resetCaretTime ( )

This method resets the caret time.

◆ resizeEvent()

void edbee::TextEditorWidget::resizeEvent ( QResizeEvent *  event)
protectedvirtual

This mehtod is called when a resize happens.

Parameters
eventthe event of the editor widget

◆ scrollPositionVisible()

void edbee::TextEditorWidget::scrollPositionVisible ( int  xPosIn,
int  yPosIn 
)

This method makes sure the given position is visible.

Parameters
xposInthe position in text-editor 'coordinates'
yPosInthe position in text-editor 'coordinates'

◆ scrollTopToLine

void edbee::TextEditorWidget::scrollTopToLine ( int  line)
slot

this method scrolls the top position to the given line

Parameters
linethe line to scroll to

◆ 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
scrollBarthe scrollbar to use

◆ 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
scrollBarthe scrollbar to use

◆ textDocument()

TextDocument * edbee::TextEditorWidget::textDocument ( ) const

Returns the textdocument for this widget.

◆ textEditorComponent()

TextEditorComponent * edbee::TextEditorWidget::textEditorComponent ( ) const

Returns the editor component-part of the editor.

◆ textMarginComponent()

TextMarginComponent * edbee::TextEditorWidget::textMarginComponent ( ) const

Returns the active margin component.

◆ textRenderer()

TextRenderer * edbee::TextEditorWidget::textRenderer ( ) const

Returns the text-renderer.

◆ textScrollArea()

TextEditorScrollArea * edbee::TextEditorWidget::textScrollArea ( ) const

Returns the active scroll area.

◆ textSelection()

TextSelection * edbee::TextEditorWidget::textSelection ( ) const

Return the textselection.

◆ updateAreaAroundOffset

void edbee::TextEditorWidget::updateAreaAroundOffset ( int  offset,
int  width = 8 
)
virtualslot

updates the character before and at the given offest

Parameters
offsetthe offset of the area to repaint.
widththe 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
linethe line that updates the given line
lengththe 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 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: