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

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?
 

Detailed Description

describes the current drawing environment (base fontname ...)

Member Enumeration Documentation

◆ FontSizeUnit

units for the property JKQTMathTextEnvironment::fontSize (Points/PT or Pixels)

Enumerator
POINTS 
PIXELS 

Constructor & Destructor Documentation

◆ JKQTMathTextEnvironment()

JKQTMathTextEnvironment::JKQTMathTextEnvironment ( )

Member Function Documentation

◆ beginMathMode()

void JKQTMathTextEnvironment::beginMathMode ( bool  displaystyle = true)

sets insideMath =true and insideMathForceDigitsUpright =true and insideMathUseTextStyle=!displaystyle

◆ endMathMode()

void JKQTMathTextEnvironment::endMathMode ( )

sets insideMath =false

◆ exchangedFontFor()

JKQTMathTextEnvironment JKQTMathTextEnvironment::exchangedFontFor ( JKQTMathTextEnvironmentFont  font) const

return a copy of this object with the font exchanged for font

◆ exchangedFontForRoman()

JKQTMathTextEnvironment JKQTMathTextEnvironment::exchangedFontForRoman ( ) const

return a copy of this object with the font exchanged for the matching roman font

◆ FontSizeUnit2String()

static QString JKQTMathTextEnvironment::FontSizeUnit2String ( FontSizeUnit  unit)
static

convert a FontSizeUnit to a string

See also
FontSizeUnit,String2FontSizeUnit()

◆ getFont()

QFont JKQTMathTextEnvironment::getFont ( const JKQTMathText parent) const

build a QFont object from the settings in this object

◆ getFontEncoding()

JKQTMathTextFontEncoding JKQTMathTextEnvironment::getFontEncoding ( JKQTMathText parent) const

return the encoding of the given Font

◆ isMathDisplayStyle()

bool JKQTMathTextEnvironment::isMathDisplayStyle ( ) const

determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x

◆ isMathTextStyle()

bool JKQTMathTextEnvironment::isMathTextStyle ( ) const

determines whether to use displaystyle or textstyle for math-instructions like \frace{}{} or \int_x

◆ String2FontSizeUnit()

static FontSizeUnit JKQTMathTextEnvironment::String2FontSizeUnit ( QString  unit)
static

convert a string into a FontSizeUnit

See also
FontSizeUnit,FontSizeUnit2String()

◆ toHtmlAfter()

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

Parameters
defaultEvenvironment before applying the current object (to detect changes)
parentMathTextthe JKQTMathText object currently in use (used to e.g. look up font names)
See also
toHtmlAfter()

◆ toHtmlStart()

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

Parameters
defaultEvenvironment before applying the current object (to detect changes)
parentMathTextthe JKQTMathText object currently in use (used to e.g. look up font names)
See also
toHtmlAfter()

Member Data Documentation

◆ bold

bool JKQTMathTextEnvironment::bold

is the text currently bold?

◆ capitalization

QFont::Capitalization JKQTMathTextEnvironment::capitalization

is the text currently in small caps?

◆ color

QColor JKQTMathTextEnvironment::color

current font color

◆ customFontName

QString JKQTMathTextEnvironment::customFontName

custom font, when font==MTECustomFont

◆ font

JKQTMathTextEnvironmentFont JKQTMathTextEnvironment::font

current font

◆ fontSize

double JKQTMathTextEnvironment::fontSize

current font size the unit is determined by fontSizeUnit

◆ fontSizeUnit

FontSizeUnit JKQTMathTextEnvironment::fontSizeUnit

the unit of the font size fontSize

◆ insideMath

bool JKQTMathTextEnvironment::insideMath

is the text currently are we inside a math environment?

◆ insideMathForceDigitsUpright

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

◆ insideMathUseTextStyle

bool JKQTMathTextEnvironment::insideMathUseTextStyle

if true the commands like \frac{}{} are executes as \tfrac{}{} . This implements \textstyle or if false \displaystyle

◆ italic

bool JKQTMathTextEnvironment::italic

is the text currently italic?

◆ overline

bool JKQTMathTextEnvironment::overline

is the text currently overlined?

◆ strike

bool JKQTMathTextEnvironment::strike

is the text currently stroke through?

◆ underlined

bool JKQTMathTextEnvironment::underlined

is the text currently underlined?


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