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 one symbol (e.g. \alpha , \cdot ...) node in the syntax tree More...

#include <jkqtmathtextsymbolnode.h>

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

Classes

struct  NodeSize
 return type for getSymbolSize(), extends JKQTMathTextNodeSize with information about x-correction for sub- and superscript More...
 
struct  SymbolFullProps
 properties of the symbol, extends SymbolProps with font... More...
 
struct  SymbolProps
 properties of the symbol More...
 

Public Member Functions

 JKQTMathTextSymbolNode (JKQTMathText *parent, const QString &name)
 
virtual ~JKQTMathTextSymbolNode () override
 
virtual double draw (QPainter &painter, double x, double y, JKQTMathTextEnvironment currentEv) const override
 draw the contents at the designated position
 
QString getSymbolName () const
 this string will be sent to the drawText method with properly set fonts
 
NodeSize getSymbolSize (QPainter &painter, JKQTMathTextEnvironment currentEv) const
 determine the size of the node, calls getSizeInternal() implementation of the actual type
 
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
 
- Public Member Functions inherited from JKQTMathTextNode
 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
 
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
 
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
 
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}
 

Static Public Member Functions

static int getSymbolLength (const QString &symbolName)
 returns the length of the symbol string for the given symbol
 
static QStringList getSymbols ()
 return a list of all defined symbols
 
static bool hasSymbol (const QString &symbolName)
 checks whether the given symbol name can be prepresented by this type of node
 
static bool isExtendedWidthSymbol (const QString &symbolName)
 checks whether the given symbol has global flags SymbolFullProps::ExtendWidthInMathmode or SymbolFullProps::SmallExtendWidthInMathmode defined
 
static bool isSubSuperscriptBelowAboveSymbol (const QString &symbolName)
 checks whether the given symbol name codes for an instruction that has SymbolFullProps::SubSuperscriptBelowAboveSymbol , does not neccessarily return the same value as JKQTMathTextNode::isSubSuperscriptAboveBelowNode()
 
- 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 Types

enum  GlobalSymbolFlags : uint64_t {
  NoGLobalSymbolFlags = 0 ,
  ExtendWidthInMathmode = 1 << 0 ,
  SmallExtendWidthInMathmode = 1 << 1 ,
  MakeWhitespaceHalf = 1 << 2 ,
  IntLikeSymbolCorrection = 1 << 3 ,
  SubSuperscriptBelowAboveSymbol = 1 << 4 ,
  SubscriptCorrection = 1 << 5
}
 flags specifying additional symbol features More...
 
enum  SymbolFlags : uint64_t {
  AsOutside = 0 ,
  ItalicOn = 1 << 0 ,
  ItalicOff = 1 << 1 ,
  BoldOn = 1 << 2 ,
  BoldOff = 1 << 3 ,
  DrawLeftHBar = 1 << 4 ,
  DrawRightHBar = 1 << 5 ,
  FlipSymbolUpDown =1 << 6 ,
  FlipSymbolLeftRight =1 << 7 ,
  RotateSymbol90 =1 << 8 ,
  DrawSlash =1 << 9 ,
  DrawBackSlash =1 << 10 ,
  DrawVertLine =1 << 11 ,
  HeightIsAscent = 1 << 12 ,
  Upright =ItalicOff ,
  NormalWeight =BoldOff
}
 flags specifying additional symbol features More...
 

Protected Member Functions

virtual JKQTMathTextNodeSize getSizeInternal (QPainter &painter, JKQTMathTextEnvironment currentEv) const override
 determine the size of the node, overwrite this function in derived classes
 
SymbolFullProps getSymbolProp (const QString &symName, const JKQTMathTextEnvironment &currentEv) const
 retrieve the properties to render the given symbol symName in the current environment currentEv
 
- 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
 

Static Protected Member Functions

static void addGreekLetterVariants_WinSymbol_Unicode_Html (QHash< QString, JKQTMathTextSymbolNode::SymbolFullProps > &symbols, const QString &baseInstructionName, const QString &letterWinSymbol, const QString &letterUnicode, const QString &html)
 insert GreekLetter_WinSymbol_Unicode_Html() as baseInstructionName and UprightGreekLetter_WinSymbol_Unicode_Html and "up"+letterWinSymbol into symbols
 
static SymbolFullProps AsOutsiudeGreekLetter_WinSymbol_Unicode_Html (const QString &letterWinSymbol, const QString &letterUnicode, const QString &html)
 constructs a SymbolProps for a greek letter with the format from outside with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol
 
static void drawText (QPainter &p, const QString &text, GlobalSymbolFlags globalFlags, SymbolFlags symflags)
 draw text at (0,0) using QPainter p and taking the flags from globalFlags into account
 
static QRectF getBoundingRect (const QFont &fm, const QString &text, GlobalSymbolFlags globalFlags, QPaintDevice *pd)
 calculates the bounding rect of text using fm and taking the flags from globalFlags into account
 
static QRectF getTightBoundingRect (const QFont &fm, const QString &text, GlobalSymbolFlags globalFlags, QPaintDevice *pd)
 calculates the tight bounding rect of text using fm and taking the flags from globalFlags into account
 
static SymbolFullProps MathGreekLetter_WinSymbol_Unicode_Html (const QString &letterWinSymbol, const QString &letterUnicode, const QString &html)
 constructs a SymbolProps for an italic greek letter with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol
 
static SymbolFullProps MathOperatorSymbol (const QString &op)
 constructs a SymbolProps for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, ExtendWidthInMathmode
 
static SymbolFullProps MathOperatorSymbol (const QString &op, const QString &ophtml)
 constructs a SymbolProps with explicit HTML for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, ExtendWidthInMathmode
 
static SymbolFullProps MathOperatorSymbolUnicode (const QString &unicode)
 constructs a SymbolProps for a math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, ExtendWidthInMathmode
 
static SymbolFullProps MathOperatorText (const QString &op)
 constructs a SymbolProps for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode
 
static SymbolFullProps MathOperatorText (const QString &op, const QString &ophtml)
 constructs a SymbolProps with explicit HTML for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode
 
static SymbolFullProps NarrowMathOperatorSymbolStd (const QString &symbol)
 constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode
 
static SymbolFullProps NarrowMathOperatorSymbolStd (const QString &symbol, const QString &symbolHTML)
 constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode
 
static SymbolFullProps NarrowMathOperatorSymbolUnicode (const QString &unicode)
 constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode
 
static SymbolFullProps NarrowMathOperatorText (const QString &op)
 constructs a SymbolProps for a narrow math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode
 
static SymbolFullProps NarrowMathOperatorText (const QString &op, const QString &ophtml)
 constructs a SymbolProps with explicit HTML for a narrow math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode
 
static SymbolFullProps SimpleTextSymbol (const QString &symbol, const QString &html)
 creates a SymbolFullProps object for a symbol that can be typeset in any font, a special html-string is given
 
static SymbolFullProps SimpleTextSymbol (const QString &symbol, SymbolFlags _flags=AsOutside, double _fontScalingFactor=1.0, double _yShiftFactor=0.0)
 creates a SymbolFullProps object for a symbol that can be typeset in any font, for SymbolFullProps::html the same text as asymbol is used
 
static SymbolFullProps SimpleUprightTextSymbol (const QString &symbol)
 creates a SymbolFullProps object for a symbol that can be typeset in any font, for SymbolFullProps::html the same text as asymbol is used
 
static SymbolFullProps SimpleUprightTextSymbol (const QString &symbol, const QString &html)
 creates a SymbolFullProps object for a symbol that can be typeset in any font, a special html-string is given
 
static SymbolFullProps StdSymbol (const QString &symbol, const QString &html)
 constructs a SymbolProps for a symbol with encoding in Standard-fonts a
 
static SymbolFullProps StdSymbol (const QString &symbol, SymbolFlags _flags=AsOutside, double _fontScalingFactor=1.0, double _yShiftFactor=0.0)
 constructs a SymbolProps for a symbol with encoding in Standard-fonts a
 
static const QHash< QString, SymbolFullProps > & symbols ()
 symbols that can be generated in any standard-font
 
static SymbolFullProps UnicodeSymbol (const QString &symbol, const QString &html)
 constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a
 
static SymbolFullProps UnicodeSymbol (const QString &symbol, SymbolFlags _flags=AsOutside, double _fontScalingFactor=1.0, double _yShiftFactor=0.0)
 constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a
 
static SymbolFullProps UprightGreekLetter_WinSymbol_Unicode_Html (const QString &letterWinSymbol, const QString &letterUnicode, const QString &html)
 constructs a SymbolProps for an upright greek letter with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol
 
static SymbolFullProps UprightSymbolStd (const QString &symbol)
 constructs a SymbolProps for a symbol with encoding in Standard-fonts a
 
static SymbolFullProps UprightSymbolStd (const QString &symbol, const QString &html)
 constructs a SymbolProps for a symbol with encoding in Standard-fonts a
 
static SymbolFullProps UprightSymbolUnicode (const QString &symbol)
 constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a
 
static SymbolFullProps UprightSymbolUnicode (const QString &symbol, const QString &html)
 constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a
 

Protected Attributes

QString symbolName
 this string will be sent to the drawText method with properly set fonts
 
- 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}
 

Friends

bool has (GlobalSymbolFlags a, GlobalSymbolFlags b)
 
bool has (SymbolFlags a, SymbolFlags b)
 
GlobalSymbolFlags operator& (GlobalSymbolFlags a, GlobalSymbolFlags b)
 
SymbolFlags operator& (SymbolFlags a, SymbolFlags b)
 
GlobalSymbolFlagsoperator&= (GlobalSymbolFlags &a, GlobalSymbolFlags b)
 
SymbolFlagsoperator&= (SymbolFlags &a, SymbolFlags b)
 
GlobalSymbolFlags operator^ (GlobalSymbolFlags a, GlobalSymbolFlags b)
 
SymbolFlags operator^ (SymbolFlags a, SymbolFlags b)
 
GlobalSymbolFlagsoperator^= (GlobalSymbolFlags &a, GlobalSymbolFlags b)
 
SymbolFlagsoperator^= (SymbolFlags &a, SymbolFlags b)
 
GlobalSymbolFlags operator| (GlobalSymbolFlags a, GlobalSymbolFlags b)
 
SymbolFlags operator| (SymbolFlags a, SymbolFlags b)
 
GlobalSymbolFlagsoperator|= (GlobalSymbolFlags &a, GlobalSymbolFlags b)
 
SymbolFlagsoperator|= (SymbolFlags &a, SymbolFlags b)
 
GlobalSymbolFlags operator~ (GlobalSymbolFlags a)
 
SymbolFlags operator~ (SymbolFlags a)
 

Detailed Description

subclass representing one symbol (e.g. \alpha , \cdot ...) node in the syntax tree

All supported symbols are stored in the static table symbols, which is filled by fillSymbolTable(). The latter function is also the customization point for new symbols:

  • For each symbol, the instruction name is stored as key, e.g. for \alpha the key "alpha" is stored.
  • for each instruction a SymbolFullProps describes the symbol and stores how to draw it.
  • Each symbol has global properties (GlobalSymbolFlags, e.g. how to treat it's with etz.) and a set of representations. Each representation is for one font-encoding (JKQTMathTextFontEncoding, i.e. Unicode, WinSymbol or Standard)
  • each encoding representation SymbolProps specifies a text to represent the symol in SymbolProps::symbol and can have additional flags, properties etc.

Font Lookup for symbols works as follows in JKQTMathTextSymbolNode:

  • if a character is found in the current (or to be used) font, it is taken from there (the font is specified in SymbolFullProps::fontType)
  • if the character is not found, it is looked for in the fallback fonts MTEFallbackGreek and MTEFallbackSymbols
  • as a last resort, some symbols can be created otherwise, so if neither of the two options above contain the required symbol, the symbol might be synthesized otherwise, or a rectangle with the size of "X" is drawn instead

Member Enumeration Documentation

◆ GlobalSymbolFlags

enum JKQTMathTextSymbolNode::GlobalSymbolFlags : uint64_t
protected

flags specifying additional symbol features

Enumerator
NoGLobalSymbolFlags 

indicates that no properties are activated

ExtendWidthInMathmode 

this symbol has an extended width, when used within a moth-environment/in math-mode

SmallExtendWidthInMathmode 

like ExtendWidthInMathmode but adds a smaller whitespace

MakeWhitespaceHalf 

symbol uses whitespaces in its text (SymbolProps::symbol). These should be typeset as half-spaces

IntLikeSymbolCorrection 

symbols, like \int,\iint,... require a correction in x-direction for subsequent sub-/superscripts ... this flag marks such symbols

SubSuperscriptBelowAboveSymbol 

symbols, like \int,\iint,... if appearing in math-mode cause typesetting following sub-/superscripts below/above the symbol, not besides it.

SubscriptCorrection 

symbols, like \nabla,... require a subscript correction in x-direction for subsequent subscripts ... this flag marks such symbols

◆ SymbolFlags

enum JKQTMathTextSymbolNode::SymbolFlags : uint64_t
protected

flags specifying additional symbol features

Enumerator
AsOutside 

indicates that no properties are activated

ItalicOn 

make font italic in any case

ItalicOff 

make font non-italic (i.e. upright) in any case

BoldOn 

make font bold in any case

BoldOff 

make font non-bold (i,,e, normal weight) in any case

DrawLeftHBar 

indicates whether to draw a bar on the left half of the character, above the xHeight (like for \hbar ), implements an italic-correction

DrawRightHBar 

indicates whether to draw a bar on the right half of the character, above the xHeight, implements an italic-correction

FlipSymbolUpDown 

indicates to flip the given symbol upside-down

FlipSymbolLeftRight 

indicates to flip the given symbol left-right

RotateSymbol90 

indicates to rotate the symbol 90 degree

DrawSlash 

indicates to overdraw a slash (e.g. to combine 0 and / to form \varnothing )

DrawBackSlash 

indicates to overdraw a backslash

DrawVertLine 

indicates to overdraw a centered vertical line (slightly tilted if italic)

HeightIsAscent 

if true, the height of the symbol equals the ascent of the font

Upright 
NormalWeight 

Constructor & Destructor Documentation

◆ JKQTMathTextSymbolNode()

JKQTMathTextSymbolNode::JKQTMathTextSymbolNode ( JKQTMathText parent,
const QString &  name 
)
explicit

◆ ~JKQTMathTextSymbolNode()

virtual JKQTMathTextSymbolNode::~JKQTMathTextSymbolNode ( )
overridevirtual

Member Function Documentation

◆ addGreekLetterVariants_WinSymbol_Unicode_Html()

static void JKQTMathTextSymbolNode::addGreekLetterVariants_WinSymbol_Unicode_Html ( QHash< QString, JKQTMathTextSymbolNode::SymbolFullProps > &  symbols,
const QString &  baseInstructionName,
const QString &  letterWinSymbol,
const QString &  letterUnicode,
const QString &  html 
)
staticprotected

insert GreekLetter_WinSymbol_Unicode_Html() as baseInstructionName and UprightGreekLetter_WinSymbol_Unicode_Html and "up"+letterWinSymbol into symbols

◆ AsOutsiudeGreekLetter_WinSymbol_Unicode_Html()

static SymbolFullProps JKQTMathTextSymbolNode::AsOutsiudeGreekLetter_WinSymbol_Unicode_Html ( const QString &  letterWinSymbol,
const QString &  letterUnicode,
const QString &  html 
)
staticprotected

constructs a SymbolProps for a greek letter with the format from outside with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol

◆ draw()

virtual double JKQTMathTextSymbolNode::draw ( QPainter &  painter,
double  x,
double  y,
JKQTMathTextEnvironment  currentEv 
) const
overridevirtual

draw the contents at the designated position

Parameters
painterQPainter to use
xx-position, where the drawing starts [Pixel]
yY-position of the baseline, where the drawing starts [Pixel]
currentEvJKQTMathTextEnvironment object describing the current drawing environment/settings
Returns
the x position which to use for the next part of the text

Implements JKQTMathTextNode.

◆ drawText()

static void JKQTMathTextSymbolNode::drawText ( QPainter &  p,
const QString &  text,
GlobalSymbolFlags  globalFlags,
SymbolFlags  symflags 
)
staticprotected

draw text at (0,0) using QPainter p and taking the flags from globalFlags into account

◆ getBoundingRect()

static QRectF JKQTMathTextSymbolNode::getBoundingRect ( const QFont &  fm,
const QString &  text,
GlobalSymbolFlags  globalFlags,
QPaintDevice *  pd 
)
staticprotected

calculates the bounding rect of text using fm and taking the flags from globalFlags into account

◆ getSizeInternal()

virtual JKQTMathTextNodeSize JKQTMathTextSymbolNode::getSizeInternal ( QPainter &  painter,
JKQTMathTextEnvironment  currentEv 
) const
overrideprotectedvirtual

determine the size of the node, overwrite this function in derived classes

Parameters
painterpainter to use for determining the size
currentEvcurrent environment object
Returns
all important box size parameters packed as JKQTMathTextNodeSize

Implements JKQTMathTextNode.

◆ getSymbolLength()

static int JKQTMathTextSymbolNode::getSymbolLength ( const QString &  symbolName)
static

returns the length of the symbol string for the given symbol

◆ getSymbolName()

QString JKQTMathTextSymbolNode::getSymbolName ( ) const

this string will be sent to the drawText method with properly set fonts

◆ getSymbolProp()

SymbolFullProps JKQTMathTextSymbolNode::getSymbolProp ( const QString &  symName,
const JKQTMathTextEnvironment currentEv 
) const
protected

retrieve the properties to render the given symbol symName in the current environment currentEv

◆ getSymbols()

static QStringList JKQTMathTextSymbolNode::getSymbols ( )
static

return a list of all defined symbols

◆ getSymbolSize()

NodeSize JKQTMathTextSymbolNode::getSymbolSize ( QPainter &  painter,
JKQTMathTextEnvironment  currentEv 
) const

determine the size of the node, calls getSizeInternal() implementation of the actual type

See also
getSizeInternal()
Parameters
painterpainter to use for determining the size
currentEvcurrent environment object
Returns
all important size properties, packed into a NodeSize struct

◆ getTightBoundingRect()

static QRectF JKQTMathTextSymbolNode::getTightBoundingRect ( const QFont &  fm,
const QString &  text,
GlobalSymbolFlags  globalFlags,
QPaintDevice *  pd 
)
staticprotected

calculates the tight bounding rect of text using fm and taking the flags from globalFlags into account

◆ getTypeName()

virtual QString JKQTMathTextSymbolNode::getTypeName ( ) const
overridevirtual

return the name of this class as a string

Reimplemented from JKQTMathTextNode.

◆ hasSymbol()

static bool JKQTMathTextSymbolNode::hasSymbol ( const QString &  symbolName)
static

checks whether the given symbol name can be prepresented by this type of node

◆ isExtendedWidthSymbol()

static bool JKQTMathTextSymbolNode::isExtendedWidthSymbol ( const QString &  symbolName)
static

checks whether the given symbol has global flags SymbolFullProps::ExtendWidthInMathmode or SymbolFullProps::SmallExtendWidthInMathmode defined

◆ isSubSuperscriptBelowAboveSymbol()

static bool JKQTMathTextSymbolNode::isSubSuperscriptBelowAboveSymbol ( const QString &  symbolName)
static

checks whether the given symbol name codes for an instruction that has SymbolFullProps::SubSuperscriptBelowAboveSymbol , does not neccessarily return the same value as JKQTMathTextNode::isSubSuperscriptAboveBelowNode()

◆ MathGreekLetter_WinSymbol_Unicode_Html()

static SymbolFullProps JKQTMathTextSymbolNode::MathGreekLetter_WinSymbol_Unicode_Html ( const QString &  letterWinSymbol,
const QString &  letterUnicode,
const QString &  html 
)
staticprotected

constructs a SymbolProps for an italic greek letter with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol

◆ MathOperatorSymbol() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::MathOperatorSymbol ( const QString &  op)
staticprotected

constructs a SymbolProps for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, ExtendWidthInMathmode

◆ MathOperatorSymbol() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::MathOperatorSymbol ( const QString &  op,
const QString &  ophtml 
)
staticprotected

constructs a SymbolProps with explicit HTML for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, ExtendWidthInMathmode

◆ MathOperatorSymbolUnicode()

static SymbolFullProps JKQTMathTextSymbolNode::MathOperatorSymbolUnicode ( const QString &  unicode)
staticprotected

constructs a SymbolProps for a math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, ExtendWidthInMathmode

◆ MathOperatorText() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::MathOperatorText ( const QString &  op)
staticprotected

constructs a SymbolProps for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode

◆ MathOperatorText() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::MathOperatorText ( const QString &  op,
const QString &  ophtml 
)
staticprotected

constructs a SymbolProps with explicit HTML for a math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode

◆ NarrowMathOperatorSymbolStd() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::NarrowMathOperatorSymbolStd ( const QString &  symbol)
staticprotected

constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode

◆ NarrowMathOperatorSymbolStd() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::NarrowMathOperatorSymbolStd ( const QString &  symbol,
const QString &  symbolHTML 
)
staticprotected

constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode

◆ NarrowMathOperatorSymbolUnicode()

static SymbolFullProps JKQTMathTextSymbolNode::NarrowMathOperatorSymbolUnicode ( const QString &  unicode)
staticprotected

constructs a SymbolProps for a narrow math-operator symbol like \pm ... in unicode-full-encoding, i.e. ItalicOff, BoldOff, SmallExtendWidthInMathmode

◆ NarrowMathOperatorText() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::NarrowMathOperatorText ( const QString &  op)
staticprotected

constructs a SymbolProps for a narrow math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode

◆ NarrowMathOperatorText() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::NarrowMathOperatorText ( const QString &  op,
const QString &  ophtml 
)
staticprotected

constructs a SymbolProps with explicit HTML for a narrow math-operator like \sin ..., i.e. ItalicOff, BoldOff, HeightIsAscent, ExtendWidthInMathmode

◆ SimpleTextSymbol() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::SimpleTextSymbol ( const QString &  symbol,
const QString &  html 
)
staticprotected

creates a SymbolFullProps object for a symbol that can be typeset in any font, a special html-string is given

◆ SimpleTextSymbol() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::SimpleTextSymbol ( const QString &  symbol,
SymbolFlags  _flags = AsOutside,
double  _fontScalingFactor = 1.0,
double  _yShiftFactor = 0.0 
)
staticprotected

creates a SymbolFullProps object for a symbol that can be typeset in any font, for SymbolFullProps::html the same text as asymbol is used

◆ SimpleUprightTextSymbol() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::SimpleUprightTextSymbol ( const QString &  symbol)
staticprotected

creates a SymbolFullProps object for a symbol that can be typeset in any font, for SymbolFullProps::html the same text as asymbol is used

◆ SimpleUprightTextSymbol() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::SimpleUprightTextSymbol ( const QString &  symbol,
const QString &  html 
)
staticprotected

creates a SymbolFullProps object for a symbol that can be typeset in any font, a special html-string is given

◆ StdSymbol() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::StdSymbol ( const QString &  symbol,
const QString &  html 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in Standard-fonts a

◆ StdSymbol() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::StdSymbol ( const QString &  symbol,
SymbolFlags  _flags = AsOutside,
double  _fontScalingFactor = 1.0,
double  _yShiftFactor = 0.0 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in Standard-fonts a

◆ symbols()

static const QHash< QString, SymbolFullProps > & JKQTMathTextSymbolNode::symbols ( )
staticprotected

symbols that can be generated in any standard-font

◆ toHtml()

virtual bool JKQTMathTextSymbolNode::toHtml ( QString &  html,
JKQTMathTextEnvironment  currentEv,
JKQTMathTextEnvironment  defaultEv 
) const
overridevirtual

convert node to HTML and returns true on success

Parameters
[out]htmlnew HTML code is APPENDED to this string
currentEvJKQTMathTextEnvironment object describing the current drawing environment/settings
defaultEvJKQTMathTextEnvironment object describing the default drawing environment/settings when starting to interpret a node tree
Returns
true on success

Reimplemented from JKQTMathTextNode.

◆ UnicodeSymbol() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::UnicodeSymbol ( const QString &  symbol,
const QString &  html 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a

◆ UnicodeSymbol() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::UnicodeSymbol ( const QString &  symbol,
SymbolFlags  _flags = AsOutside,
double  _fontScalingFactor = 1.0,
double  _yShiftFactor = 0.0 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a

◆ UprightGreekLetter_WinSymbol_Unicode_Html()

static SymbolFullProps JKQTMathTextSymbolNode::UprightGreekLetter_WinSymbol_Unicode_Html ( const QString &  letterWinSymbol,
const QString &  letterUnicode,
const QString &  html 
)
staticprotected

constructs a SymbolProps for an upright greek letter with the symbol in unicode-encoding letterUnicode and in WinSymbol-encoding letterWinWsymbol

◆ UprightSymbolStd() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::UprightSymbolStd ( const QString &  symbol)
staticprotected

constructs a SymbolProps for a symbol with encoding in Standard-fonts a

◆ UprightSymbolStd() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::UprightSymbolStd ( const QString &  symbol,
const QString &  html 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in Standard-fonts a

◆ UprightSymbolUnicode() [1/2]

static SymbolFullProps JKQTMathTextSymbolNode::UprightSymbolUnicode ( const QString &  symbol)
staticprotected

constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a

◆ UprightSymbolUnicode() [2/2]

static SymbolFullProps JKQTMathTextSymbolNode::UprightSymbolUnicode ( const QString &  symbol,
const QString &  html 
)
staticprotected

constructs a SymbolProps for a symbol with encoding in UnicodeFull-fonts a

Friends And Related Symbol Documentation

◆ has [1/2]

bool has ( GlobalSymbolFlags  a,
GlobalSymbolFlags  b 
)
friend

◆ has [2/2]

bool has ( SymbolFlags  a,
SymbolFlags  b 
)
friend

◆ operator& [1/2]

GlobalSymbolFlags operator& ( GlobalSymbolFlags  a,
GlobalSymbolFlags  b 
)
friend

◆ operator& [2/2]

SymbolFlags operator& ( SymbolFlags  a,
SymbolFlags  b 
)
friend

◆ operator&= [1/2]

GlobalSymbolFlags & operator&= ( GlobalSymbolFlags a,
GlobalSymbolFlags  b 
)
friend

◆ operator&= [2/2]

SymbolFlags & operator&= ( SymbolFlags a,
SymbolFlags  b 
)
friend

◆ operator^ [1/2]

GlobalSymbolFlags operator^ ( GlobalSymbolFlags  a,
GlobalSymbolFlags  b 
)
friend

◆ operator^ [2/2]

SymbolFlags operator^ ( SymbolFlags  a,
SymbolFlags  b 
)
friend

◆ operator^= [1/2]

GlobalSymbolFlags & operator^= ( GlobalSymbolFlags a,
GlobalSymbolFlags  b 
)
friend

◆ operator^= [2/2]

SymbolFlags & operator^= ( SymbolFlags a,
SymbolFlags  b 
)
friend

◆ operator| [1/2]

GlobalSymbolFlags operator| ( GlobalSymbolFlags  a,
GlobalSymbolFlags  b 
)
friend

◆ operator| [2/2]

SymbolFlags operator| ( SymbolFlags  a,
SymbolFlags  b 
)
friend

◆ operator|= [1/2]

GlobalSymbolFlags & operator|= ( GlobalSymbolFlags a,
GlobalSymbolFlags  b 
)
friend

◆ operator|= [2/2]

SymbolFlags & operator|= ( SymbolFlags a,
SymbolFlags  b 
)
friend

◆ operator~ [1/2]

GlobalSymbolFlags operator~ ( GlobalSymbolFlags  a)
friend

◆ operator~ [2/2]

SymbolFlags operator~ ( SymbolFlags  a)
friend

Member Data Documentation

◆ symbolName

QString JKQTMathTextSymbolNode::symbolName
protected

this string will be sent to the drawText method with properly set fonts


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