SYNOPSIS

Public Types

enum MmlFont { NormalFont, FrakturFont, SansSerifFont, ScriptFont, MonospaceFont, DoublestruckFont }

Public Member Functions

QwtMathMLDocument ()

~QwtMathMLDocument ()

void clear ()

bool setContent (QString text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0)

void paint (QPainter *p, const QPoint &pos) const

QSize size () const

QString fontName (MmlFont type) const

void setFontName (MmlFont type, const QString &name)

int baseFontPointSize () const

void setBaseFontPointSize (int size)

Detailed Description

The QwtMathMLDocument class renders mathematical formulas written in MathML 2.0.

Constructor & Destructor Documentation

QwtMathMLDocument::QwtMathMLDocument () Constructs an empty MML document.

QwtMathMLDocument::~QwtMathMLDocument () Destroys the MML document.

Member Function Documentation

int QwtMathMLDocument::baseFontPointSize () const Returns the point size of the font used to render expressions whose scriptlevel is 0.

See also:

setBaseFontPointSize() fontName() setFontName()

void QwtMathMLDocument::clear () Clears the contents of this MML document.

QString QwtMathMLDocument::fontName (QwtMathMLDocument::MmlFonttype) const Returns the name of the font used to render the font \fItype\fP.

See also:

setFontName() setBaseFontPointSize() baseFontPointSize() QwtMathMLDocument::MmlFont

void QwtMathMLDocument::paint (QPainter *p, const QPoint &pos) const Renders this MML document with the painter \fIp\fP at position \fIpos\fP.

void QwtMathMLDocument::setBaseFontPointSize (intsize) Sets the point \fIsize\fP of the font used to render expressions whose scriptlevel is 0.

See also:

baseFontPointSize() fontName() setFontName()

bool QwtMathMLDocument::setContent (QStringtext, QString *errorMsg = \fC0\fP, int *errorLine = \fC0\fP, int *errorColumn = \fC0\fP) Sets the MathML expression to be rendered. The expression is given in the string \fItext\fP. If the expression is successfully parsed, this method returns true; otherwise it returns false. If an error occured \fIerrorMsg\fP is set to a diagnostic message, while \fIerrorLine\fP and \fIerrorColumn\fP contain the location of the error. Any of \fIerrorMsg\fP, \fIerrorLine\fP and \fIerrorColumn\fP may be 0, in which case they are not set.

text should contain MathML 2.0 presentation markup elements enclosed in a <math> element.

void QwtMathMLDocument::setFontName (QwtMathMLDocument::MmlFonttype, const QString &name) Sets the name of the font used to render the font \fItype\fP to \fIname\fP.

See also:

fontName() setBaseFontPointSize() baseFontPointSize() QwtMathMLDocument::MmlFont

QSize QwtMathMLDocument::size () const Returns the size of this MML document, as rendered, in pixels.

Author

Generated automatically by Doxygen for Qwt User's Guide from the source code.