Qwt User's Guide
svn
|
Public Types | |
enum | MmlFont { NormalFont, FrakturFont, SansSerifFont, ScriptFont, MonospaceFont, DoublestruckFont } |
Public Member Functions | |
int | baseFontPointSize () const |
void | clear () |
QString | fontName (MmlFont type) const |
void | paint (QPainter *p, const QPoint &pos) const |
QwtMathMLDocument () | |
void | setBaseFontPointSize (int size) |
bool | setContent (QString text, QString *errorMsg=0, int *errorLine=0, int *errorColumn=0) |
void | setFontName (MmlFont type, const QString &name) |
QSize | size () const |
~QwtMathMLDocument () |
The QwtMathMLDocument class renders mathematical formulas written in MathML 2.0.
QwtMathMLDocument::QwtMathMLDocument | ( | ) |
Constructs an empty MML document.
QwtMathMLDocument::~QwtMathMLDocument | ( | ) |
Destroys the MML document.
int QwtMathMLDocument::baseFontPointSize | ( | ) | const |
Returns the point size of the font used to render expressions whose scriptlevel is 0.
void QwtMathMLDocument::clear | ( | ) |
Clears the contents of this MML document.
QString QwtMathMLDocument::fontName | ( | QwtMathMLDocument::MmlFont | type | ) | const |
Returns the name of the font used to render the font type.
void QwtMathMLDocument::paint | ( | QPainter * | p, |
const QPoint & | pos | ||
) | const |
Renders this MML document with the painter p at position pos.
void QwtMathMLDocument::setBaseFontPointSize | ( | int | size | ) |
Sets the point size of the font used to render expressions whose scriptlevel is 0.
bool QwtMathMLDocument::setContent | ( | QString | text, |
QString * | errorMsg = 0 , |
||
int * | errorLine = 0 , |
||
int * | errorColumn = 0 |
||
) |
Sets the MathML expression to be rendered. The expression is given in the string text. If the expression is successfully parsed, this method returns true; otherwise it returns false. If an error occured errorMsg is set to a diagnostic message, while errorLine and errorColumn contain the location of the error. Any of errorMsg, errorLine and errorColumn 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::MmlFont | type, |
const QString & | name | ||
) |
Sets the name of the font used to render the font type to name.
QSize QwtMathMLDocument::size | ( | ) | const |
Returns the size of this MML document, as rendered, in pixels.