24#ifndef JKQTMATHTEXTMODIFYTEXTPROPSINSTRUCTIONNODE_H
25#define JKQTMATHTEXTMODIFYTEXTPROPSINSTRUCTIONNODE_H
26#include "jkqtmathtext/jkqtmathtext_imexport.h"
27#include "jkqtmathtext/jkqtmathtexttools.h"
28#include "jkqtmathtext/nodes/jkqtmathtextnode.h"
29#include "jkqtmathtext/nodes/jkqtmathtextinstructionnode.h"
66 static void modifyInMathEnvironment(
const QString& instructionName,
bool& insideMath,
bool &insideMathTextStyle,
const QStringList ¶ms=QStringList());
89 static const QHash<QString, InstructionProperties>&
instructions();
this class parses a mathematical markup string and can then draw the contained text/equation onto a Q...
Definition jkqtmathtext.h:192
subclass representing an instruction node with exactly one argument and possibly additional parameter...
Definition jkqtmathtextinstructionnode.h:45
subclass representing an instruction node which modify the current JKQTMathTextEnvironment,...
Definition jkqtmathtextmodifyenvironmentnode.h:103
static const QHash< QString, InstructionProperties > & instructions()
defines all implemented instructions in this node
static bool supportsInstructionName(const QString &instructionName)
returns true, if the given instructionName can be represented by this node
JKQTMathTextModifiedEnvironmentInstructionNode(JKQTMathText *parent_, const QString &instructionName_, const QStringList ¶meters_=QStringList())
const QStringList & getParameters() const
additional string-parameters
virtual ~JKQTMathTextModifiedEnvironmentInstructionNode() override
virtual void modifyEnvironment(JKQTMathTextEnvironment ¤tEv) const override
modifies the fiven JKQTMathTextEnvironment currrentEv
QStringList parameters
additional string-parameters
Definition jkqtmathtextmodifyenvironmentnode.h:132
QString instructionName
instruction name
Definition jkqtmathtextmodifyenvironmentnode.h:130
const QString & getInstructionName() const
instruction name
virtual QString getTypeName() const override
return the name of this class as a string
static void modifyInMathTextStyleEnvironment(const QString &instructionName, bool &insideMathTextStyle, JKQTMathText *parentMathText, const QStringList ¶ms=QStringList())
sets insideMathTextStyle to true if textstyle is set inside math
static size_t countParametersOfInstruction(const QString &instructionName)
returns the number of additional string parameters, required for the given instructionName
subclass representing an instruction node which modifies the current font (as defined in JKQTMathText...
Definition jkqtmathtextmodifyenvironmentnode.h:44
virtual bool toHtml(QString &html, JKQTMathTextEnvironment currentEv, JKQTMathTextEnvironment defaultEv) const override
convert node to HTML and returns true on success
virtual JKQTMathTextNodeSize getSizeInternal(QPainter &painter, JKQTMathTextEnvironment currentEv) const override
determine the size of the node, overwrite this function in derived classes
virtual ~JKQTMathTextModifiedTextPropsInstructionNode() override
static const QHash< QString, InstructionProperties > & instructions()
defines all implemented instructions in this node
JKQTMathTextModifiedTextPropsInstructionNode(JKQTMathText *parent, const QString &name, JKQTMathTextNode *child, const QStringList ¶meters=QStringList())
static size_t countParametersOfInstruction(const QString &instructionName)
returns the number of additional string parameters, required for the given instructionName
static void modifyInMathEnvironment(const QString &instructionName, bool &insideMath, bool &insideMathTextStyle, const QStringList ¶ms=QStringList())
sets insideMath to true if inside the node is to be parsed in math mode and false else
void executeInstruction(JKQTMathTextEnvironment &ev) const
executes the instruction on ev
static bool supportsInstructionName(const QString &instructionName)
returns true, if the given instructionName can be represented by this node
virtual QString getTypeName() const override
return the name of this class as a string
virtual double draw(QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
draw the contents at the designated position
mixin extending a node that does not produce any output, but provides a function modifyEnvironment() ...
Definition jkqtmathtextnode.h:322
subclass representing one node in the syntax tree
Definition jkqtmathtextnode.h:37
base class for all derived classes that do not draw anything
Definition jkqtmathtextnode.h:296
#define JKQTMATHTEXT_LIB_EXPORT
Definition jkqtmathtext_imexport.h:108
describes the current drawing environment (base fontname ...)
Definition jkqtmathtexttools.h:304
defines the implementation of an instruction represented by JKQTMathTextModifiedTextPropsInstructionN...
Definition jkqtmathtextmodifyenvironmentnode.h:134
InstructionProperties(const ModifyEnvironmentFunctor &_modifier, size_t _NParams=0)
constructor which gets a functor _modifier and a number of required parameters _NParams
InstructionProperties()
default constructor, creates a NOP-instruction that does nothing
std::function< void(JKQTMathTextEnvironment &ev, const QStringList ¶meters, JKQTMathText *parentMathText)> ModifyEnvironmentFunctor
this functor implements the instruction
Definition jkqtmathtextmodifyenvironmentnode.h:136
size_t NParams
number of parameters for this node
Definition jkqtmathtextmodifyenvironmentnode.h:142
ModifyEnvironmentFunctor modifier
functor that modifies a JKQTMathTextEnvironment
Definition jkqtmathtextmodifyenvironmentnode.h:144
defines the implementation of an instruction represented by JKQTMathTextModifiedTextPropsInstructionN...
Definition jkqtmathtextmodifyenvironmentnode.h:72
ModifyEnvironmentFunctor modifier
functor that modifies a JKQTMathTextEnvironment
Definition jkqtmathtextmodifyenvironmentnode.h:82
InstructionProperties(const ModifyEnvironmentFunctor &_modifier, size_t _NParams=0)
constructor which gets a functor _modifier and a number of required parameters _NParams
std::function< void(JKQTMathTextEnvironment &ev, const QStringList ¶meters)> ModifyEnvironmentFunctor
this functor implements the instruction
Definition jkqtmathtextmodifyenvironmentnode.h:74
size_t NParams
number of parameters for this node
Definition jkqtmathtextmodifyenvironmentnode.h:80
InstructionProperties()
default constructor, creates a NOP-instruction that does nothing
beschreibt die Größe(n) eines Knotens
Definition jkqtmathtexttools.h:393