JKQTPlotter trunk/v5.0.0
an extensive Qt5+Qt6 Plotter framework (including a feature-richt plotter widget, a speed-optimized, but limited variant and a LaTeX equation renderer!), written fully in C/C++ and without external dependencies
Loading...
Searching...
No Matches

subclass representing a node in the syntax tree, that has two children More...

#include <jkqtmathtextnode.h>

Inheritance diagram for JKQTMathTextMultiChildNode:
[legend]
Collaboration diagram for JKQTMathTextMultiChildNode:
[legend]

Public Member Functions

 JKQTMathTextMultiChildNode (JKQTMathText *parentMathText)
virtual ~JKQTMathTextMultiChildNode () override
virtual int childCount () const =0
 returns the number of child nodes
virtual void clearChildren (bool deleteChildren=true)=0
 clear all children, deleting them if deleteChildren==true
virtual void deleteChild (int i)=0
 delete the i-th child
virtual const JKQTMathTextNodegetChild (int i) const =0
 returns the i-th child node
virtual JKQTMathTextNodegetChild (int i)=0
 returns the i-th child node
virtual QList< JKQTMathTextNode * > getChildren ()
 returns a list of all child node
virtual QList< const JKQTMathTextNode * > getChildren () const
 returns a list of all child node
virtual JKQTMathTextNodegetFirstChild ()
 returns the first child node
virtual const JKQTMathTextNodegetFirstChild () const
 returns the first child node
virtual JKQTMathTextNodegetLastChild ()
 returns the last child node
virtual const JKQTMathTextNodegetLastChild () const
 returns the last child node
bool hasChildren () const
 returns true if children exist
bool isEmpty () const
 returns true if there are no children
virtual void replaceAndDeleteChild (int i, JKQTMathTextNode *newChild)
 replaces the i-th child node with the node newChild , deletes the replaced old node
virtual JKQTMathTextNodereplaceChild (int i, JKQTMathTextNode *newChild)=0
 replaces the i-th child node with the node newChild , returns the replaced old node
virtual void setDrawBoxes (bool draw) override
 enables the drawing of colored boxes (for DEBUGGING) around the actual output of the node
Public Member Functions inherited from JKQTMathTextNode
 JKQTMathTextNode (const JKQTMathTextNode &)=delete
 JKQTMathTextNode (JKQTMathText *parentMathText)
virtual ~JKQTMathTextNode ()
virtual double draw (QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const =0
 draw the contents at the designated position
bool getDrawBoxes () const
 returns the drawing of colored boxes (for DEBUGGING) around the actual output of the node is enabled
JKQTMathTextNodegetParentNode ()
 parent node of this node (i.e. one level up, ode nullptr )
const JKQTMathTextNodegetParentNode () const
 parent node of this node (i.e. one level up, ode nullptr )
JKQTMathTextNodeSize getSize (QPainter &painter, JKQTMathTextEnvironment currentEv) const
 determine the size of the node, calls getSizeInternal() implementation of the actual type
virtual QString getTypeName () const
 return the name of this class as a string
bool isSubSuperscriptAboveBelowNode () const
 if true then following sub- and/or superscripts are placed below and above the node, not besides it. This is activated when \sum\limits_{sub}^{sup} is used in LaTeX instead of simply \sum_{sub}^{sup}
JKQTMathTextNodeoperator= (const JKQTMathTextNode &)=delete
void setParentNode (JKQTMathTextNode *node)
 parent node of this node (i.e. one level up, ode nullptr )
void setSubSuperscriptAboveBelowNode (bool __value)
 if true then following sub- and/or superscripts are placed below and above the node, not besides it. This is activated when \sum\limits_{sub}^{sup} is used in LaTeX instead of simply \sum_{sub}^{sup}
virtual bool toHtml (QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const
 convert node to HTML and returns true on success

Additional Inherited Members

Static Public Member Functions inherited from JKQTMathTextNode
static double getNonItalicXCorretion (QPainter &painter, double width_potentiallyitalic, const JKQTMathTextEnvironment &ev_potentiallyitalic, const JKQTMathTextNode *child)
 calculates the x-size-difference between the given (probably) italic (width externally calculated: width_potentiallyitalic, ev_potentiallyitalic) and the non-italic version of child
Protected Member Functions inherited from JKQTMathTextNode
void addToErrorList (const QString &error)
 adds a new error to the JKQTMathText referenced by parentMathText
void doDrawBoxes (QPainter &painter, double x, double y, const JKQTMathTextNodeSize &size) const
 draws colored boxes (for DEBUGGING) around the actual output of the node
void doDrawBoxes (QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const
 draws colored boxes (for DEBUGGING) around the actual output of the node
template<class T>
QList< T * > getParents ()
 returns the list of parent, parent-of-parent, ... that can be cast to type T
template<class T>
QList< const T * > getParents () const
 returns the list of parent, parent-of-parent, ... that can be cast to type T
virtual JKQTMathTextNodeSize getSizeInternal (QPainter &painter, JKQTMathTextEnvironment currentEv) const =0
 determine the size of the node, overwrite this function in derived classes
Protected Attributes inherited from JKQTMathTextNode
bool drawBoxes
 enables the drawing of colored boxes (for DEBUGGING) around the actual output of the node
JKQTMathTextparentMathText
 parent JKQTMathText object (required for several drawing operations
JKQTMathTextNodeparentNode
 parent node of this node (i.e. one level up, ode nullptr )
bool subSuperscriptAboveBelowNode
 if true then following sub- and/or superscripts are placed below and above the node, not besides it. This is activated when \sum\limits_{sub}^{sup} is used in LaTeX instead of simply \sum_{sub}^{sup}

Detailed Description

subclass representing a node in the syntax tree, that has two children

Constructor & Destructor Documentation

◆ JKQTMathTextMultiChildNode()

JKQTMathTextMultiChildNode::JKQTMathTextMultiChildNode ( JKQTMathText * parentMathText)
explicit

◆ ~JKQTMathTextMultiChildNode()

virtual JKQTMathTextMultiChildNode::~JKQTMathTextMultiChildNode ( )
overridevirtual

Member Function Documentation

◆ childCount()

virtual int JKQTMathTextMultiChildNode::childCount ( ) const
pure virtual

◆ clearChildren()

virtual void JKQTMathTextMultiChildNode::clearChildren ( bool deleteChildren = true)
pure virtual

clear all children, deleting them if deleteChildren==true

Implemented in JKQTMathTextDualChildNode, JKQTMathTextHorizontalListNode, JKQTMathTextMatrixNode, JKQTMathTextSqrtNode, and JKQTMathTextVerticalListNode.

◆ deleteChild()

virtual void JKQTMathTextMultiChildNode::deleteChild ( int i)
pure virtual

◆ getChild() [1/2]

virtual const JKQTMathTextNode * JKQTMathTextMultiChildNode::getChild ( int i) const
pure virtual

◆ getChild() [2/2]

virtual JKQTMathTextNode * JKQTMathTextMultiChildNode::getChild ( int i)
pure virtual

◆ getChildren() [1/2]

virtual QList< JKQTMathTextNode * > JKQTMathTextMultiChildNode::getChildren ( )
virtual

returns a list of all child node

Reimplemented in JKQTMathTextHorizontalListNode, JKQTMathTextMatrixNode, and JKQTMathTextVerticalListNode.

◆ getChildren() [2/2]

virtual QList< const JKQTMathTextNode * > JKQTMathTextMultiChildNode::getChildren ( ) const
virtual

returns a list of all child node

◆ getFirstChild() [1/2]

virtual JKQTMathTextNode * JKQTMathTextMultiChildNode::getFirstChild ( )
virtual

returns the first child node

◆ getFirstChild() [2/2]

virtual const JKQTMathTextNode * JKQTMathTextMultiChildNode::getFirstChild ( ) const
virtual

returns the first child node

◆ getLastChild() [1/2]

virtual JKQTMathTextNode * JKQTMathTextMultiChildNode::getLastChild ( )
virtual

returns the last child node

◆ getLastChild() [2/2]

virtual const JKQTMathTextNode * JKQTMathTextMultiChildNode::getLastChild ( ) const
virtual

returns the last child node

◆ hasChildren()

bool JKQTMathTextMultiChildNode::hasChildren ( ) const

returns true if children exist

◆ isEmpty()

bool JKQTMathTextMultiChildNode::isEmpty ( ) const

returns true if there are no children

◆ replaceAndDeleteChild()

virtual void JKQTMathTextMultiChildNode::replaceAndDeleteChild ( int i,
JKQTMathTextNode * newChild )
virtual

replaces the i-th child node with the node newChild , deletes the replaced old node

◆ replaceChild()

virtual JKQTMathTextNode * JKQTMathTextMultiChildNode::replaceChild ( int i,
JKQTMathTextNode * newChild )
pure virtual

replaces the i-th child node with the node newChild , returns the replaced old node

Implemented in JKQTMathTextDualChildNode, JKQTMathTextHorizontalListNode, JKQTMathTextMatrixNode, JKQTMathTextSqrtNode, and JKQTMathTextVerticalListNode.

◆ setDrawBoxes()

virtual void JKQTMathTextMultiChildNode::setDrawBoxes ( bool draw)
overridevirtual

enables the drawing of colored boxes (for DEBUGGING) around the actual output of the node

Reimplemented from JKQTMathTextNode.

Reimplemented in JKQTMathTextMatrixNode.


The documentation for this class was generated from the following file: