KTextEditor
katetextpreview.cpp
97 const int lastLine = showFoldedLines() ? view()->document()->lines() : view()->textFolding().visibleLines();
107 m_line = qMax(0.0, lastLine - static_cast<qreal>(r.height()) / (lineHeight * m_scale) + floor(lineCount / 2.0) - 1);
136 renderer->paintTextLine(paint, &lineLayout, xStart, xEnd, QRectF{}, nullptr, KateRenderer::SkipDrawFirstInvisibleLineUnderlined);
Handles all of the work of rendering the text (used for the views and printing)
Definition katerenderer.h:56
@ SkipDrawFirstInvisibleLineUnderlined
Skip drawing the dashed underline at the start of a folded block of text?
Definition katerenderer.h:337
KTextEditor::DocumentPrivate * doc() const
Returns the document to which this renderer is bound.
Definition katerenderer.h:89
void layoutLine(KateLineLayout *line, int maxwidth=-1, bool cacheLayout=false) const
Text width & height calculation functions...
Definition katerenderer.cpp:1259
void paintTextLine(QPainter &paint, KateLineLayout *range, int xStart, int xEnd, const QRectF &textClipRect=QRectF(), const KTextEditor::Cursor *cursor=nullptr, PaintTextLineFlags flags=PaintTextLineFlags())
This is the ultimate function to perform painting of a text line.
Definition katerenderer.cpp:685
void setShowFoldedLines(bool on)
Sets whether folded lines are hidden or not.
Definition katetextpreview.cpp:79
void setCenterView(bool center)
Enabled/disable centering the view on the line set with setLine().
Definition katetextpreview.cpp:48
int visibleLineToLine(int visibleLine) const
Convert a visible line number to a line number in the text buffer.
Definition katetextfolding.cpp:322
virtual bool event(QEvent *e) override
virtual void paintEvent(QPaintEvent *) override
qreal height() const const
QPointF topLeft() const const
qreal width() const const
ToolTip
QRect contentsRect() const const
void update()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.