subclass representing a simple instruction node which only accepts string arguments, not LaTeX arguments i.e. it represents instructions like \unicode{
...}, ...
More...
#include <jkqtmathtextinstructionnode.h>
|
| JKQTMathTextSimpleInstructionNode (JKQTMathText *parent, const QString &name, const QStringList ¶meters=QStringList()) |
|
virtual | ~JKQTMathTextSimpleInstructionNode () override |
|
virtual double | draw (QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override |
| draw the contents at the designated position
|
|
const QString & | getInstructionName () const |
| instruction name
|
|
const QStringList & | getParameters () const |
| additional string-parameters
|
|
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
|
|
| JKQTMathTextNode (const JKQTMathTextNode &)=delete |
|
| JKQTMathTextNode (JKQTMathText *parentMathText) |
|
virtual | ~JKQTMathTextNode () |
|
bool | getDrawBoxes () const |
| returns the drawing of colored boxes (for DEBUGGING) around the actual output of the node is enabled
|
|
JKQTMathTextNode * | getParentNode () |
| parent node of this node (i.e. one level up, ode nullptr )
|
|
const JKQTMathTextNode * | getParentNode () 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
|
|
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}
|
|
JKQTMathTextNode & | operator= (const JKQTMathTextNode &)=delete |
|
virtual void | setDrawBoxes (bool draw) |
| enables the drawing of colored boxes (for DEBUGGING) around the actual output of the node
|
|
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}
|
|
|
QString | executeInstruction () const |
| executes the instruction on ev
|
|
virtual JKQTMathTextNodeSize | getSizeInternal (QPainter &painter, JKQTMathTextEnvironment currentEv) const override |
| determine the size of the node, overwrite this function in derived classes
|
|
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
|
|
subclass representing a simple instruction node which only accepts string arguments, not LaTeX arguments i.e. it represents instructions like \unicode{
...}, ...
◆ JKQTMathTextSimpleInstructionNode()
JKQTMathTextSimpleInstructionNode::JKQTMathTextSimpleInstructionNode |
( |
JKQTMathText * |
parent, |
|
|
const QString & |
name, |
|
|
const QStringList & |
parameters = QStringList() |
|
) |
| |
|
explicit |
◆ ~JKQTMathTextSimpleInstructionNode()
virtual JKQTMathTextSimpleInstructionNode::~JKQTMathTextSimpleInstructionNode |
( |
| ) |
|
|
overridevirtual |
◆ countParametersOfInstruction()
static size_t JKQTMathTextSimpleInstructionNode::countParametersOfInstruction |
( |
const QString & |
instructionName | ) |
|
|
static |
returns the number of additional string parameters, required for the given instructionName
- See also
- instructions
◆ draw()
virtual double JKQTMathTextSimpleInstructionNode::draw |
( |
QPainter & |
painter, |
|
|
double |
x, |
|
|
double |
y, |
|
|
JKQTMathTextEnvironment |
currentEv |
|
) |
| const |
|
overridevirtual |
draw the contents at the designated position
- Parameters
-
painter | QPainter to use |
x | x-position, where the drawing starts [Pixel] |
y | Y-position of the baseline, where the drawing starts [Pixel] |
currentEv | JKQTMathTextEnvironment object describing the current drawing environment/settings |
- Returns
- the x position which to use for the next part of the text
Implements JKQTMathTextNode.
◆ executeInstruction()
QString JKQTMathTextSimpleInstructionNode::executeInstruction |
( |
| ) |
const |
|
protected |
executes the instruction on ev
◆ getInstructionName()
const QString & JKQTMathTextSimpleInstructionNode::getInstructionName |
( |
| ) |
const |
◆ getParameters()
const QStringList & JKQTMathTextSimpleInstructionNode::getParameters |
( |
| ) |
const |
additional string-parameters
◆ getSizeInternal()
determine the size of the node, overwrite this function in derived classes
- Parameters
-
painter | painter to use for determining the size |
currentEv | current environment object |
- Returns
- all important box size parameters packed as JKQTMathTextNodeSize
Implements JKQTMathTextNode.
◆ getTypeName()
virtual QString JKQTMathTextSimpleInstructionNode::getTypeName |
( |
| ) |
const |
|
overridevirtual |
◆ instructions()
static const QHash< QString, InstructionProperties > & JKQTMathTextSimpleInstructionNode::instructions |
( |
| ) |
|
|
staticprotected |
defines all implemented instructions in this node
- Note
- this is the customization point for new instructions!
◆ supportsInstructionName()
static bool JKQTMathTextSimpleInstructionNode::supportsInstructionName |
( |
const QString & |
instructionName | ) |
|
|
static |
returns true, if the given instructionName can be represented by this node
- See also
- instructions
◆ toHtml()
convert node to HTML and returns true
on success
- Parameters
-
[out] | html | new HTML code is APPENDED to this string |
| currentEv | JKQTMathTextEnvironment object describing the current drawing environment/settings |
| defaultEv | JKQTMathTextEnvironment object describing the default drawing environment/settings when starting to interpret a node tree |
- Returns
true
on success
Reimplemented from JKQTMathTextNode.
◆ instructionName
QString JKQTMathTextSimpleInstructionNode::instructionName |
|
protected |
◆ parameters
QStringList JKQTMathTextSimpleInstructionNode::parameters |
|
protected |
additional string-parameters
The documentation for this class was generated from the following file: