lib
glyphelement.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef GLYPHELEMENT_H
00021 #define GLYPHELEMENT_H
00022
00023 #include "textelement.h"
00024
00025 KFORMULA_NAMESPACE_BEGIN
00026
00027 class GlyphElement : public TextElement {
00028 typedef TextElement inherited;
00029 public:
00030 GlyphElement( BasicElement* parent = 0 );
00031
00036 virtual void calcSizes( const ContextStyle& cstyle,
00037 ContextStyle::TextStyle tstyle,
00038 ContextStyle::IndexStyle istyle,
00039 StyleAttributes& style );
00040
00046 virtual void draw( QPainter& painter, const LuPixelRect& r,
00047 const ContextStyle& context,
00048 ContextStyle::TextStyle tstyle,
00049 ContextStyle::IndexStyle istyle,
00050 StyleAttributes& style,
00051 const LuPixelPoint& parentOrigin );
00052
00053 protected:
00054 virtual bool readAttributesFromMathMLDom( const QDomElement &element );
00055
00056 private:
00057 virtual QString getElementName() const { return "mglyph"; }
00058 virtual void writeMathMLAttributes( QDomElement& element ) const ;
00059
00060 QChar m_char;
00061 QString m_fontFamily;
00062 QString m_alt;
00063 bool m_hasFont;
00064 };
00065
00066 KFORMULA_NAMESPACE_END
00067
00068 #endif // GLYPHELEMENT_H
|