Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QSvgText Class Reference

#include <qsvggraphics_p.h>

+ Inheritance diagram for QSvgText:
+ Collaboration diagram for QSvgText:

Public Types

enum  WhitespaceMode { Default , Preserve }
 
- Public Types inherited from QSvgNode
enum  Type {
  DOC , G , DEFS , SWITCH ,
  ANIMATION , ARC , CIRCLE , ELLIPSE ,
  IMAGE , LINE , PATH , POLYGON ,
  POLYLINE , RECT , TEXT , TEXTAREA ,
  TSPAN , USE , VIDEO
}
 
enum  DisplayMode {
  InlineMode , BlockMode , ListItemMode , RunInMode ,
  CompactMode , MarkerMode , TableMode , InlineTableMode ,
  TableRowGroupMode , TableHeaderGroupMode , TableFooterGroupMode , TableRowMode ,
  TableColumnGroupMode , TableColumnMode , TableCellMode , TableCaptionMode ,
  NoneMode , InheritMode
}
 

Public Member Functions

 QSvgText (QSvgNode *parent, const QPointF &coord)
 
 ~QSvgText ()
 
void setTextArea (const QSizeF &size)
 
void draw (QPainter *p, QSvgExtraStates &states) override
 
Type type () const override
 
void addTspan (QSvgTspan *tspan)
 
void addText (const QString &text)
 
void addLineBreak ()
 
void setWhitespaceMode (WhitespaceMode mode)
 
QRectF fastBounds (QPainter *p, QSvgExtraStates &states) const override
 
QRectF bounds (QPainter *p, QSvgExtraStates &states) const override
 
- Public Member Functions inherited from QSvgNode
 QSvgNode (QSvgNode *parent=0)
 
virtual ~QSvgNode ()
 
virtual void draw (QPainter *p, QSvgExtraStates &states)=0
 
QSvgNodeparent () const
 
bool isDescendantOf (const QSvgNode *parent) const
 
void appendStyleProperty (QSvgStyleProperty *prop, const QString &id)
 
void applyStyle (QPainter *p, QSvgExtraStates &states) const
 
void revertStyle (QPainter *p, QSvgExtraStates &states) const
 
QSvgStylePropertystyleProperty (QSvgStyleProperty::Type type) const
 
QSvgFillStylePropertystyleProperty (const QString &id) const
 
QSvgTinyDocumentdocument () const
 
virtual Type type () const =0
 
virtual QRectF fastBounds (QPainter *p, QSvgExtraStates &states) const
 
virtual QRectF bounds (QPainter *p, QSvgExtraStates &states) const
 
virtual QRectF transformedBounds (QPainter *p, QSvgExtraStates &states) const
 
QRectF transformedBounds () const
 
void setRequiredFeatures (const QStringList &lst)
 
const QStringListrequiredFeatures () const
 
void setRequiredExtensions (const QStringList &lst)
 
const QStringListrequiredExtensions () const
 
void setRequiredLanguages (const QStringList &lst)
 
const QStringListrequiredLanguages () const
 
void setRequiredFormats (const QStringList &lst)
 
const QStringListrequiredFormats () const
 
void setRequiredFonts (const QStringList &lst)
 
const QStringListrequiredFonts () const
 
void setVisible (bool visible)
 
bool isVisible () const
 
void setDisplayMode (DisplayMode display)
 
DisplayMode displayMode () const
 
QString nodeId () const
 
void setNodeId (const QString &i)
 
QString xmlClass () const
 
void setXmlClass (const QString &str)
 
bool shouldDrawNode (QPainter *p, QSvgExtraStates &states) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from QSvgNode
static qreal strokeWidth (QPainter *p)
 
- Protected Attributes inherited from QSvgNode
QSvgStyle m_style
 

Detailed Description

Definition at line 149 of file qsvggraphics_p.h.

Member Enumeration Documentation

◆ WhitespaceMode

Enumerator
Default 
Preserve 

Definition at line 152 of file qsvggraphics_p.h.

Constructor & Destructor Documentation

◆ QSvgText()

QSvgText::QSvgText ( QSvgNode parent,
const QPointF coord 
)

Definition at line 293 of file qsvggraphics.cpp.

◆ ~QSvgText()

QSvgText::~QSvgText ( )

Definition at line 302 of file qsvggraphics.cpp.

References i, and QList< T >::size().

+ Here is the call graph for this function:

Member Function Documentation

◆ addLineBreak()

void QSvgText::addLineBreak ( )
inline

Definition at line 167 of file qsvggraphics_p.h.

◆ addText()

void QSvgText::addText ( const QString text)

Definition at line 556 of file qsvggraphics.cpp.

References QSvgTspan::addText(), QList< T >::append(), QList< T >::back(), QSvgTspan::setWhitespaceMode(), and text.

+ Here is the call graph for this function:

◆ addTspan()

void QSvgText::addTspan ( QSvgTspan tspan)
inline

Definition at line 165 of file qsvggraphics_p.h.

◆ bounds()

QRectF QSvgText::bounds ( QPainter p,
QSvgExtraStates states 
) const
overridevirtual

Reimplemented from QSvgNode.

Definition at line 332 of file qsvggraphics.cpp.

References boundingRect().

+ Here is the call graph for this function:

◆ draw()

void QSvgText::draw ( QPainter p,
QSvgExtraStates states 
)
overridevirtual

Implements QSvgNode.

Definition at line 369 of file qsvggraphics.cpp.

References QT_SVG_TIMING_ENTER, and QT_SVG_TIMING_EXIT.

◆ fastBounds()

QRectF QSvgText::fastBounds ( QPainter p,
QSvgExtraStates states 
) const
overridevirtual

Reimplemented from QSvgNode.

Definition at line 316 of file qsvggraphics.cpp.

References QList< T >::at(), QFontMetricsF::averageCharWidth(), font, QFontMetricsF::height(), i, QString::size(), QList< T >::size(), QSvgTspan::text(), QPointF::x(), and QPointF::y().

+ Here is the call graph for this function:

◆ setTextArea()

void QSvgText::setTextArea ( const QSizeF size)

Definition at line 310 of file qsvggraphics.cpp.

References QSvgNode::TEXTAREA.

Referenced by createTextAreaNode().

+ Here is the caller graph for this function:

◆ setWhitespaceMode()

void QSvgText::setWhitespaceMode ( WhitespaceMode  mode)
inline

Definition at line 168 of file qsvggraphics_p.h.

◆ type()

QSvgNode::Type QSvgText::type ( ) const
overridevirtual

Implements QSvgNode.

Definition at line 661 of file qsvggraphics.cpp.


The documentation for this class was generated from the following files: