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 JKQTMathTextDualChildNode:
[legend]
Collaboration diagram for JKQTMathTextDualChildNode:
[legend]

Public Member Functions

 JKQTMathTextDualChildNode (JKQTMathTextNode *_child1, JKQTMathTextNode *_child2, JKQTMathText *parentMathText)
 
virtual ~JKQTMathTextDualChildNode () override
 
virtual int childCount () const override
 returns the i-th child node
 
virtual void clearChildren (bool deleteChildren=true) override
 returns the i-th child node
 
virtual void deleteChild (int i) override
 delete the i-th child
 
virtual const JKQTMathTextNodegetChild (int i) const override
 returns the i-th child node
 
virtual JKQTMathTextNodegetChild (int i) override
 returns the i-th child node
 
JKQTMathTextNodegetChild1 ()
 first child node of this node
 
const JKQTMathTextNodegetChild1 () const
 first child node of this node
 
JKQTMathTextNodegetChild2 ()
 second child node of this node
 
const JKQTMathTextNodegetChild2 () const
 second child node of this node
 
virtual JKQTMathTextNodereplaceChild (int i, JKQTMathTextNode *newChild) override
 returns the i-th child node
 
- Public Member Functions inherited from JKQTMathTextMultiChildNode
 JKQTMathTextMultiChildNode (JKQTMathText *parentMathText)
 
virtual ~JKQTMathTextMultiChildNode () override
 
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 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
 

Protected Attributes

JKQTMathTextNodechild1
 first child node of this node
 
JKQTMathTextNodechild2
 second child node of this node
 
- 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}
 

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ JKQTMathTextDualChildNode()

JKQTMathTextDualChildNode::JKQTMathTextDualChildNode ( JKQTMathTextNode _child1,
JKQTMathTextNode _child2,
JKQTMathText parentMathText 
)
explicit

◆ ~JKQTMathTextDualChildNode()

virtual JKQTMathTextDualChildNode::~JKQTMathTextDualChildNode ( )
overridevirtual

Member Function Documentation

◆ childCount()

virtual int JKQTMathTextDualChildNode::childCount ( ) const
overridevirtual

returns the i-th child node

Implements JKQTMathTextMultiChildNode.

◆ clearChildren()

virtual void JKQTMathTextDualChildNode::clearChildren ( bool  deleteChildren = true)
overridevirtual

returns the i-th child node

Implements JKQTMathTextMultiChildNode.

◆ deleteChild()

virtual void JKQTMathTextDualChildNode::deleteChild ( int  i)
overridevirtual

delete the i-th child

Implements JKQTMathTextMultiChildNode.

◆ getChild() [1/2]

virtual const JKQTMathTextNode * JKQTMathTextDualChildNode::getChild ( int  i) const
overridevirtual

returns the i-th child node

Implements JKQTMathTextMultiChildNode.

◆ getChild() [2/2]

virtual JKQTMathTextNode * JKQTMathTextDualChildNode::getChild ( int  i)
overridevirtual

returns the i-th child node

Implements JKQTMathTextMultiChildNode.

◆ getChild1() [1/2]

JKQTMathTextNode * JKQTMathTextDualChildNode::getChild1 ( )

first child node of this node

◆ getChild1() [2/2]

const JKQTMathTextNode * JKQTMathTextDualChildNode::getChild1 ( ) const

first child node of this node

◆ getChild2() [1/2]

JKQTMathTextNode * JKQTMathTextDualChildNode::getChild2 ( )

second child node of this node

◆ getChild2() [2/2]

const JKQTMathTextNode * JKQTMathTextDualChildNode::getChild2 ( ) const

second child node of this node

◆ replaceChild()

virtual JKQTMathTextNode * JKQTMathTextDualChildNode::replaceChild ( int  i,
JKQTMathTextNode newChild 
)
overridevirtual

returns the i-th child node

Implements JKQTMathTextMultiChildNode.

Member Data Documentation

◆ child1

JKQTMathTextNode* JKQTMathTextDualChildNode::child1
protected

first child node of this node

◆ child2

JKQTMathTextNode* JKQTMathTextDualChildNode::child2
protected

second child node of this node


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