12 class QLinearGradient;
18 class TextEditorWidget;
19 class TextMarginComponent;
30 virtual QString
lineText(
int line );
33 virtual void renderBefore( QPainter* painter,
int startLine,
int endLine,
int width );
34 virtual void renderAfter( QPainter* painter,
int startLine,
int endLine,
int width );
61 int widthHint()
const;
62 virtual QSize sizeHint()
const;
63 bool isGeometryChangeRequired();
75 virtual void paintEvent( QPaintEvent* event );
76 virtual void renderCaretMarkers( QPainter* painter,
int startLine,
int endLine,
int width );
77 virtual void renderLineNumber( QPainter* painter,
int startLine,
int endLine,
int width );
81 virtual void mouseDoubleClickEvent(QMouseEvent *);
83 virtual void wheelEvent(QWheelEvent* event);
86 virtual void updateLineAtOffset(
int offset);
87 virtual void updateLine(
int line,
int length);
91 virtual void topChanged(
int value);
92 virtual void connectScrollBar();
100 mutable int lastLineCount_;
The textmargin component delegate You can override the methods in the class for adding functionality ...
Definition: textmargincomponent.h:24
A class for rendering the text.
Definition: textrenderer.h:34
virtual void renderBefore(QPainter *painter, int startLine, int endLine, int width)
Custom rendering before the line-numbers etc are drawn.
Definition: textmargincomponent.cpp:50
TextMarginComponent * marginComponent()
Definition: textmargincomponent.h:41
virtual void leaveEvent(QEvent *event)
Definition: textmargincomponent.cpp:97
TextEditorWidget * editorWidget() const
Definition: textmargincomponent.h:66
virtual ~TextMarginComponentDelegate()
Definition: textmargincomponent.h:28
TextMarginComponentDelegate * delegate() const
Definition: textmargincomponent.h:69
void setMarginCompenent(TextMarginComponent *comp)
Definition: textmargincomponent.h:42
virtual bool requiresMouseTracking()
Make this method return true to enable mouse tracking.
Definition: textmargincomponent.cpp:68
virtual void mousePressEvent(int line, QMouseEvent *event)
Definition: textmargincomponent.cpp:87
The margin/line-number component This class is used for rendering line-numbers etc.
Definition: textmargincomponent.h:51
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
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 se...
Definition: textmargincomponent.cpp:75
virtual int widthBeforeLineNumber()
The extra space required before the line-number The default implemenation returns 0...
Definition: textmargincomponent.cpp:44
TextMarginComponentDelegate()
The default constructor.
Definition: textmargincomponent.cpp:31
This is the general edbee widget This core functionality of this widget is divided in several seperat...
Definition: texteditorwidget.h:32
virtual void renderAfter(QPainter *painter, int startLine, int endLine, int width)
The delegate can berform custom rendering on a given line.
Definition: textmargincomponent.cpp:59
virtual QString lineText(int line)
The default text (of course) is the line-number.
Definition: textmargincomponent.cpp:37