class Prose
A read-only, theme-coloured surface for a document body.
A stock QTextEdit is not this: it brings the platform's frame, its own text colour, a blinking caret and a selection the page never asked for. The text layout is Qt's, because a document engine is not this library's work; the surface around it is the theme's.
Inherits from QTextEdit
Functions
Prose
public Prose(QWidget * parent)
applyTypography
public void applyTypography()
Rebuilds the document stylesheet from the theme. Called on a theme change and on a font change, so a caller never maintains it.
headingLevels
public QList<int> headingLevels()
The heading levels the document exposes, in order, for a caller that needs the structure rather than the text.
headings
public QStringList headings()
The text of each heading block, in order, for a table of contents.
readerMode
public bool readerMode()
True when the surface cannot be typed into. Text stays selectable in this mode, because a reader has to be able to copy from the lesson.
setReaderMode
public void setReaderMode(bool reader)
event
protected bool event(QEvent * event)
changeEvent
protected void changeEvent(QEvent * event)