edbee - Qt Editor Library
Public Member Functions | List of all members
edbee::TextMarginComponentDelegate Class Reference

The textmargin component delegate You can override the methods in the class for adding functionality to the text-margin component. More...

#include <textmargincomponent.h>

+ Collaboration diagram for edbee::TextMarginComponentDelegate:

Public Member Functions

 TextMarginComponentDelegate ()
 The default constructor. More...
 
virtual ~TextMarginComponentDelegate ()
 
virtual QString lineText (int line)
 The default text (of course) is the line-number. More...
 
virtual int widthBeforeLineNumber ()
 The extra space required before the line-number The default implemenation returns 0. More...
 
virtual void renderBefore (QPainter *painter, int startLine, int endLine, int width)
 Custom rendering before the line-numbers etc are drawn. More...
 
virtual void renderAfter (QPainter *painter, int startLine, int endLine, int width)
 The delegate can berform custom rendering on a given line. More...
 
virtual bool requiresMouseTracking ()
 Make this method return true to enable mouse tracking. More...
 
virtual void mouseMoveEvent (int line, QMouseEvent *event)
 This method is called when the mouse is moved over a certain line To use it you MUST manually call setMouseTracking() on the TextMarginComponent. More...
 
virtual void mousePressEvent (int line, QMouseEvent *event)
 
virtual void leaveEvent (QEvent *event)
 
TextMarginComponentmarginComponent ()
 
void setMarginCompenent (TextMarginComponent *comp)
 

Detailed Description

The textmargin component delegate You can override the methods in the class for adding functionality to the text-margin component.

Constructor & Destructor Documentation

◆ TextMarginComponentDelegate()

edbee::TextMarginComponentDelegate::TextMarginComponentDelegate ( )

The default constructor.

◆ ~TextMarginComponentDelegate()

virtual edbee::TextMarginComponentDelegate::~TextMarginComponentDelegate ( )
inlinevirtual

Member Function Documentation

◆ leaveEvent()

void edbee::TextMarginComponentDelegate::leaveEvent ( QEvent *  event)
virtual

◆ lineText()

QString edbee::TextMarginComponentDelegate::lineText ( int  line)
virtual

The default text (of course) is the line-number.

◆ marginComponent()

TextMarginComponent* edbee::TextMarginComponentDelegate::marginComponent ( )
inline

◆ mouseMoveEvent()

void edbee::TextMarginComponentDelegate::mouseMoveEvent ( int  line,
QMouseEvent *  event 
)
virtual

This method is called when the mouse is moved over a certain line To use it you MUST manually call setMouseTracking() on the TextMarginComponent.

◆ mousePressEvent()

void edbee::TextMarginComponentDelegate::mousePressEvent ( int  line,
QMouseEvent *  event 
)
virtual

◆ renderAfter()

void edbee::TextMarginComponentDelegate::renderAfter ( QPainter *  painter,
int  startLine,
int  endLine,
int  width 
)
virtual

The delegate can berform custom rendering on a given line.

◆ renderBefore()

void edbee::TextMarginComponentDelegate::renderBefore ( QPainter *  painter,
int  startLine,
int  endLine,
int  width 
)
virtual

Custom rendering before the line-numbers etc are drawn.

◆ requiresMouseTracking()

bool edbee::TextMarginComponentDelegate::requiresMouseTracking ( )
virtual

Make this method return true to enable mouse tracking.

◆ setMarginCompenent()

void edbee::TextMarginComponentDelegate::setMarginCompenent ( TextMarginComponent comp)
inline

◆ widthBeforeLineNumber()

int edbee::TextMarginComponentDelegate::widthBeforeLineNumber ( )
virtual

The extra space required before the line-number The default implemenation returns 0.


The documentation for this class was generated from the following files: