The margin/line-number component This class is used for rendering line-numbers etc.
More...
#include <textmargincomponent.h>
|
virtual void | paintEvent (QPaintEvent *event) |
|
virtual void | renderCaretMarkers (QPainter *painter, int startLine, int endLine, int width) |
| Renders the caret markers in the sidebar. More...
|
|
virtual void | renderLineNumber (QPainter *painter, int startLine, int endLine, int width) |
| Renders the line number in the sidebar. More...
|
|
virtual void | mouseMoveEvent (QMouseEvent *event) |
| Can be used to track mouse events This method sends the the mouse movement events to the delegate. More...
|
|
virtual void | mousePressEvent (QMouseEvent *event) |
| Can be used to track mouse events This method sends the the mouse movement events to the delegate. More...
|
|
virtual void | mouseDoubleClickEvent (QMouseEvent *) |
| A double click. More...
|
|
virtual void | leaveEvent (QEvent *event) |
| The mouse leave. More...
|
|
virtual void | wheelEvent (QWheelEvent *event) |
| forward the mouse wheel event to the scrollbar so you can use the mouse wheel on this component More...
|
|
The margin/line-number component This class is used for rendering line-numbers etc.
◆ TextMarginComponent()
edbee::TextMarginComponent::TextMarginComponent |
( |
TextEditorWidget * |
editor, |
|
|
QWidget * |
parent |
|
) |
| |
Constructs the textmarginc compnonent.
- Parameters
-
editor | the editor this component is connceted to |
parent | the parent widget |
◆ ~TextMarginComponent()
edbee::TextMarginComponent::~TextMarginComponent |
( |
| ) |
|
|
virtual |
The margin component destructor.
◆ connectScrollBar
void edbee::TextMarginComponent::connectScrollBar |
( |
| ) |
|
|
protectedvirtualslot |
You must reconnect the scrollbars when scrollbars are changed.
◆ delegate()
◆ editorWidget()
◆ fullUpdate()
void edbee::TextMarginComponent::fullUpdate |
( |
| ) |
|
A slow and full update of the control.
◆ giveDelegate()
◆ init()
void edbee::TextMarginComponent::init |
( |
| ) |
|
initalizes this component
◆ isGeometryChangeRequired()
bool edbee::TextMarginComponent::isGeometryChangeRequired |
( |
| ) |
|
This emthod is called when the text is changed.
◆ leaveEvent()
void edbee::TextMarginComponent::leaveEvent |
( |
QEvent * |
event | ) |
|
|
protectedvirtual |
◆ mouseDoubleClickEvent()
void edbee::TextMarginComponent::mouseDoubleClickEvent |
( |
QMouseEvent * |
| ) |
|
|
protectedvirtual |
◆ mouseMoveEvent()
void edbee::TextMarginComponent::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
Can be used to track mouse events This method sends the the mouse movement events to the delegate.
◆ mousePressEvent()
void edbee::TextMarginComponent::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
protectedvirtual |
Can be used to track mouse events This method sends the the mouse movement events to the delegate.
◆ paintEvent()
void edbee::TextMarginComponent::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
protectedvirtual |
◆ renderCaretMarkers()
void edbee::TextMarginComponent::renderCaretMarkers |
( |
QPainter * |
painter, |
|
|
int |
startLine, |
|
|
int |
endLine, |
|
|
int |
width |
|
) |
| |
|
protectedvirtual |
Renders the caret markers in the sidebar.
- Parameters
-
painter | the Qt Painting context |
startLine | the first line to render |
endLine | the last line to render |
width | the width for rendering |
◆ renderer()
TextRenderer * edbee::TextMarginComponent::renderer |
( |
| ) |
const |
◆ renderLineNumber()
void edbee::TextMarginComponent::renderLineNumber |
( |
QPainter * |
painter, |
|
|
int |
startLine, |
|
|
int |
endLine, |
|
|
int |
width |
|
) |
| |
|
protectedvirtual |
Renders the line number in the sidebar.
- Parameters
-
painter | the Qt Painting context |
startLine | the first line to render |
endLine | the last line to render |
width | the width for rendering |
◆ setDelegate()
This method sets the delegate.
◆ sizeHint()
QSize edbee::TextMarginComponent::sizeHint |
( |
| ) |
const |
|
virtual |
This method returns the size hint.
◆ topChanged
void edbee::TextMarginComponent::topChanged |
( |
int |
value | ) |
|
|
protectedvirtualslot |
◆ updateLine()
void edbee::TextMarginComponent::updateLine |
( |
int |
line, |
|
|
int |
length |
|
) |
| |
|
virtual |
This method repaints the given lines.
◆ updateLineAtOffset()
void edbee::TextMarginComponent::updateLineAtOffset |
( |
int |
offset | ) |
|
|
virtual |
updates the given line so it will be repainted
◆ wheelEvent()
void edbee::TextMarginComponent::wheelEvent |
( |
QWheelEvent * |
event | ) |
|
|
protectedvirtual |
forward the mouse wheel event to the scrollbar so you can use the mouse wheel on this component
◆ widthHint()
int edbee::TextMarginComponent::widthHint |
( |
| ) |
const |
Returns the required width for this control.
The documentation for this class was generated from the following files: