24#ifndef JKQTMATHTEXTBRACENODE_H
25#define JKQTMATHTEXTBRACENODE_H
26#include "jkqtmathtext/jkqtmathtext_imexport.h"
27#include "jkqtmathtext/jkqtmathtexttools.h"
28#include "jkqtmathtext/nodes/jkqtmathtextnode.h"
subclass representing a brace node
Definition jkqtmathtextbracenode.h:45
JKQTMathTextBraceType openbrace
opening brace
Definition jkqtmathtextbracenode.h:85
NodeSize getSizeInternalAndBrace(QPainter &painter, JKQTMathTextEnvironment currentEv) const
void calcBraceSizes(NodeSize &out, QPainter &painter, const JKQTMathTextEnvironment ¤tEv, const JKQTMathTextNodeSize &childSize) const
calculate the width of the braces, fills JKQTMathTextBraceNode::NodeSize::openBraceWidth/JKQTMathText...
JKQTMathTextBraceType closebrace
closing brace
Definition jkqtmathtextbracenode.h:87
virtual JKQTMathTextNodeSize getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv) const override
determine the size of the node, overwrite this function in derived classes
virtual QString getTypeName() const override
return the name of this class as a string
virtual bool toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override
convert node to HTML and returns true on success
QSizeF calcBraceSize(const QFont &fm, QPaintDevice *pd, JKQTMathTextBraceType bracetype, const JKQTMathTextNodeSize &childSize) const
calculate the width and height of a brace, based on childSize
virtual ~JKQTMathTextBraceNode() override
JKQTMathTextBraceNode(JKQTMathText *parent, JKQTMathTextBraceType openbrace, JKQTMathTextBraceType closebrace, JKQTMathTextNode *child)
JKQTMathTextBraceType getClosebrace() const
closing brace
virtual double draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
draw the contents at the designated position
JKQTMathTextBraceType getOpenbrace() const
opening brace
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
subclass representing a node in the syntax tree, that has one child
Definition jkqtmathtextnode.h:174
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
JKQTMathTextBraceType
types of available braces
Definition jkqtmathtexttools.h:222
defines the size of the node (JKQTMathTextNodeSize) and additional information
Definition jkqtmathtextbracenode.h:62
double openBraceHeight
height of the opening brace
Definition jkqtmathtextbracenode.h:71
double openBraceWidth
width of the opening brace
Definition jkqtmathtextbracenode.h:69
NodeSize(const JKQTMathTextNodeSize &other)
double closeBraceWidth
width of the closing brace
Definition jkqtmathtextbracenode.h:73
double closeBraceHeight
height of the closing brace
Definition jkqtmathtextbracenode.h:75
NodeSize & operator=(const JKQTMathTextNodeSize &other)
NodeSize(const NodeSize &other)
NodeSize & operator=(const NodeSize &other)
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393