24#ifndef JKQTMATHTEXTVERBATIMNODE_H
25#define JKQTMATHTEXTVERBATIMNODE_H
26#include "jkqtmathtext/jkqtmathtext_imexport.h"
27#include "jkqtmathtext/jkqtmathtexttools.h"
28#include "jkqtmathtext/nodes/jkqtmathtextnode.h"
29#include "jkqtmathtext/nodes/jkqtmathtexttextnode.h"
this class parses a mathematical markup string and can then draw the contained text/equation onto a Q...
Definition jkqtmathtext.h:192
base class for nodes representing text in the syntax tree
Definition jkqtmathtexttextnode.h:44
subclass representing a verbatim (plain-text) node with support for line-breaks in the syntax tree
Definition jkqtmathtextverbatimnode.h:48
size_t getTabSize() const
number of whitespaces, each tab character stands for
double lineSpacingFactor
spacing of the separate lines, as factor of the default line-spacing [Default: 1].
Definition jkqtmathtextverbatimnode.h:79
double getLineSpacingFactor() const
spacing of the separate lines, as factor of the default line-spacing [Default: 1].
virtual QString getTypeName() const override
return the name of this class as a string
JKQTMathTextVerticalOrientation verticalOrientation
vertical orientation of the baseline of the whole block (with respect to the single lines)
Definition jkqtmathtextverbatimnode.h:84
virtual QString textTransform(const QString &text, const JKQTMathTextEnvironment ¤tEv) const override
transforms the text before sizing/drawing (may e.g. exchange special letters for other unicode symbol...
virtual bool toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override
convert node to HTML and returns true on success
size_t tabSize
number of whitespaces, each tab character stands for
Definition jkqtmathtextverbatimnode.h:88
bool visibleWhitespace
when true, whitespaces are displayed with a visible character
Definition jkqtmathtextverbatimnode.h:86
virtual JKQTMathTextNodeSize getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv) const override
determine the size of the node, overwrite this function in derived classes
JKQTMathTextHorizontalAlignment getAlignment() const
alignment scheme used to lay out all lines
JKQTMathTextVerticalOrientation getVerticalOrientation() const
vertical orientation of the baseline of the whole block (with respect to the single lines)
LayoutInfo calcLayout(QPainter &painter, const JKQTMathTextEnvironment ¤tEv) const
calclates the layout of the whole block/node
JKQTMathTextHorizontalAlignment alignment
alignment scheme used to lay out all lines
Definition jkqtmathtextverbatimnode.h:72
virtual double draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
draw the contents at the designated position
virtual void transformEnvironment(JKQTMathTextEnvironment ¤tEv) const
sets all necessary settings in currentEv for drawing this node
JKQTMathTextVerbatimNode(JKQTMathText *parent, const QString &text, bool visibleWhitespace=false, JKQTMathTextHorizontalAlignment _alignment=MTHALeft, double _linespacingFactor=1.0, JKQTMathTextVerticalOrientation _verticalOrientation=MTVOFirstLine, size_t tabSize_=4)
bool getVisibleWhitespace() const
when true, whitespaces are displayed with a visible character
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
JKQTMathTextVerticalOrientation
type of ffractions represented by JKQTMathTextFracNode
Definition jkqtmathtexttools.h:682
JKQTMathTextHorizontalAlignment
types of horizontal alignment
Definition jkqtmathtexttools.h:661
@ MTVOFirstLine
baseline of the whole block is at the baseline of the first line
Definition jkqtmathtexttools.h:684
@ MTHALeft
align left
Definition jkqtmathtexttools.h:662
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393
describes the layout of the whole node
Definition jkqtmathtextverbatimnode.h:96
QStringList lines
the text from JKQTMathTextVerbatimNode::text, split into lines
Definition jkqtmathtextverbatimnode.h:99
QList< QPointF > X
drawing position for each line
Definition jkqtmathtextverbatimnode.h:101