24#ifndef JKQTMATHTEXTFRACNODE_H
25#define JKQTMATHTEXTFRACNODE_H
26#include "jkqtmathtext/jkqtmathtext_imexport.h"
27#include "jkqtmathtext/jkqtmathtexttools.h"
28#include "jkqtmathtext/nodes/jkqtmathtextnode.h"
subclass representing a node in the syntax tree, that has two children
Definition jkqtmathtextnode.h:251
subclass representing a \frac node
Definition jkqtmathtextfracnode.h:44
JKQTMathTextFracNode::FracType mode
actual display type of fraction object
Definition jkqtmathtextfracnode.h:97
FracType
type of ffractions represented by JKQTMathTextFracNode
Definition jkqtmathtextfracnode.h:50
@ MTFMstackrel
binom/fraction without line
Definition jkqtmathtextfracnode.h:60
@ MTFMstfrac
slanted text fraction
Definition jkqtmathtextfracnode.h:55
@ MTFMunderset
underset text
Definition jkqtmathtextfracnode.h:61
@ MTFMoverbrace
curly overbrace
Definition jkqtmathtextfracnode.h:57
@ MTFMsfrac
slanted fraction
Definition jkqtmathtextfracnode.h:54
@ MTFMtfrac
text fraction (smaller than MTFMfrac)
Definition jkqtmathtextfracnode.h:53
@ MTFMunderbracket
square underbracket
Definition jkqtmathtextfracnode.h:58
@ MTFMdfrac
normal fraction, without scaling of under/over text
Definition jkqtmathtextfracnode.h:52
@ MTFMoverbracket
square overbracket
Definition jkqtmathtextfracnode.h:59
@ MTFMfrac
normal fraction
Definition jkqtmathtextfracnode.h:51
@ MTFMunderbrace
curly underbrace
Definition jkqtmathtextfracnode.h:56
static const QHash< QString, FracType > & instructions()
lists all supported instructions
virtual QString getTypeName() const override
return the name of this class as a string
JKQTMathTextFracNode(JKQTMathText *parent, JKQTMathTextNode *child_top, JKQTMathTextNode *child_bottom, JKQTMathTextFracNode::FracType mode)
static QString FracType2String(FracType mode)
convert a JKQTMathTextFracNode::FracType into a QString
virtual ~JKQTMathTextFracNode() override
virtual bool toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override
convert node to HTML and returns true on success
JKQTMathTextFracNode::FracType getMode() const
actual display type of fraction object
virtual double draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
draw the contents at the designated position
static bool supportsInstructionName(const QString &instructionName)
returns true, if the given instructionName can be converted to a FracType
int getNestingLevel(bool sameType=false) const
returns the nesting level of the node (of same type of sameType ==true)
double getFracScalingFactor() const
determines the scaling factor of the fraction (takes into account the nesting level)
static FracType InstructionName2FracType(const QString &mode)
returns the FracType corresponding to instructionName
virtual JKQTMathTextNodeSize getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv) const override
determine the size of the node, overwrite this function in derived classes
this class parses a mathematical markup string and can then draw the contained text/equation onto a Q...
Definition jkqtmathtext.h:192
subclass representing one node in the syntax tree
Definition jkqtmathtextnode.h:37
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393