![]() |
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
|
describes the current drawing environment (base fontname ...) More...
#include <jkqtmathtexttools.h>
Public Types | |
| enum | FontSizeUnit { POINTS , PIXELS } |
| units for the property JKQTMathTextEnvironment::fontSize (Points/PT or Pixels) More... | |
Public Member Functions | |
| JKQTMathTextEnvironment () | |
| void | beginMathMode (bool displaystyle=true) |
sets insideMath =true and insideMathForceDigitsUpright =true and insideMathUseTextStyle=!displaystyle | |
| void | endMathMode () |
sets insideMath =false | |
| JKQTMathTextEnvironment | exchangedFontFor (JKQTMathTextEnvironmentFont font) const |
| return a copy of this object with the font exchanged for font | |
| JKQTMathTextEnvironment | exchangedFontForRoman () const |
| return a copy of this object with the font exchanged for the matching roman font | |
| QFont | getFont (const JKQTMathText *parent) const |
| build a QFont object from the settings in this object | |
| JKQTMathTextFontEncoding | getFontEncoding (JKQTMathText *parent) const |
| return the encoding of the given Font | |
| bool | isMathDisplayStyle () const |
determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x | |
| bool | isMathTextStyle () const |
determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x | |
| QString | toHtmlAfter (JKQTMathTextEnvironment defaultEv, JKQTMathText *parentMathText) const |
| generate a HTML postfix that formats the text in front of it according to the settings in this object | |
| QString | toHtmlStart (JKQTMathTextEnvironment defaultEv, JKQTMathText *parentMathText) const |
| generate a HTML prefix that formats the text after it according to the settings in this object | |
Static Public Member Functions | |
| static QString | FontSizeUnit2String (FontSizeUnit unit) |
| convert a FontSizeUnit to a string | |
| static FontSizeUnit | String2FontSizeUnit (QString unit) |
| convert a string into a FontSizeUnit | |
Public Attributes | |
| bool | bold |
| is the text currently bold? | |
| QFont::Capitalization | capitalization |
| is the text currently in small caps? | |
| QColor | color |
| current font color | |
| QString | customFontName |
| custom font, when font==MTECustomFont | |
| JKQTMathTextEnvironmentFont | font |
| current font | |
| double | fontSize |
| current font size the unit is determined by fontSizeUnit | |
| FontSizeUnit | fontSizeUnit |
| the unit of the font size fontSize | |
| bool | insideMath |
| is the text currently are we inside a math environment? | |
| bool | insideMathForceDigitsUpright |
if insideMath ==true and this is true (the default), then digits are forced to be typeset in upright, otherwise they are typeset as defined by the other properties | |
| bool | insideMathUseTextStyle |
if true the commands like \frac{}{} are executes as \tfrac{}{} . This implements \textstyle or if false \displaystyle | |
| bool | italic |
| is the text currently italic? | |
| bool | overline |
| is the text currently overlined? | |
| bool | strike |
| is the text currently stroke through? | |
| bool | underlined |
| is the text currently underlined? | |
describes the current drawing environment (base fontname ...)
units for the property JKQTMathTextEnvironment::fontSize (Points/PT or Pixels)
| Enumerator | |
|---|---|
| POINTS | |
| PIXELS | |
| JKQTMathTextEnvironment::JKQTMathTextEnvironment | ( | ) |
| void JKQTMathTextEnvironment::beginMathMode | ( | bool | displaystyle = true | ) |
sets insideMath =true and insideMathForceDigitsUpright =true and insideMathUseTextStyle=!displaystyle
| void JKQTMathTextEnvironment::endMathMode | ( | ) |
sets insideMath =false
| JKQTMathTextEnvironment JKQTMathTextEnvironment::exchangedFontFor | ( | JKQTMathTextEnvironmentFont | font | ) | const |
return a copy of this object with the font exchanged for font
| JKQTMathTextEnvironment JKQTMathTextEnvironment::exchangedFontForRoman | ( | ) | const |
return a copy of this object with the font exchanged for the matching roman font
|
static |
convert a FontSizeUnit to a string
| QFont JKQTMathTextEnvironment::getFont | ( | const JKQTMathText * | parent | ) | const |
build a QFont object from the settings in this object
| JKQTMathTextFontEncoding JKQTMathTextEnvironment::getFontEncoding | ( | JKQTMathText * | parent | ) | const |
return the encoding of the given Font
| bool JKQTMathTextEnvironment::isMathDisplayStyle | ( | ) | const |
determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x
| bool JKQTMathTextEnvironment::isMathTextStyle | ( | ) | const |
determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x
|
static |
convert a string into a FontSizeUnit
| QString JKQTMathTextEnvironment::toHtmlAfter | ( | JKQTMathTextEnvironment | defaultEv, |
| JKQTMathText * | parentMathText ) const |
generate a HTML postfix that formats the text in front of it according to the settings in this object
| defaultEv | environment before applying the current object (to detect changes) |
| parentMathText | the JKQTMathText object currently in use (used to e.g. look up font names) |
| QString JKQTMathTextEnvironment::toHtmlStart | ( | JKQTMathTextEnvironment | defaultEv, |
| JKQTMathText * | parentMathText ) const |
generate a HTML prefix that formats the text after it according to the settings in this object
| defaultEv | environment before applying the current object (to detect changes) |
| parentMathText | the JKQTMathText object currently in use (used to e.g. look up font names) |
| bool JKQTMathTextEnvironment::bold |
is the text currently bold?
| QFont::Capitalization JKQTMathTextEnvironment::capitalization |
is the text currently in small caps?
| QColor JKQTMathTextEnvironment::color |
current font color
| QString JKQTMathTextEnvironment::customFontName |
custom font, when font==MTECustomFont
| JKQTMathTextEnvironmentFont JKQTMathTextEnvironment::font |
current font
| double JKQTMathTextEnvironment::fontSize |
current font size the unit is determined by fontSizeUnit
| FontSizeUnit JKQTMathTextEnvironment::fontSizeUnit |
the unit of the font size fontSize
| bool JKQTMathTextEnvironment::insideMath |
is the text currently are we inside a math environment?
| bool JKQTMathTextEnvironment::insideMathForceDigitsUpright |
if insideMath ==true and this is true (the default), then digits are forced to be typeset in upright, otherwise they are typeset as defined by the other properties
| bool JKQTMathTextEnvironment::insideMathUseTextStyle |
if true the commands like \frac{}{} are executes as \tfrac{}{} . This implements \textstyle or if false \displaystyle
| bool JKQTMathTextEnvironment::italic |
is the text currently italic?
| bool JKQTMathTextEnvironment::overline |
is the text currently overlined?
| bool JKQTMathTextEnvironment::strike |
is the text currently stroke through?
| bool JKQTMathTextEnvironment::underlined |
is the text currently underlined?