Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QSvgHandler Class Reference

#include <qsvghandler_p.h>

+ Collaboration diagram for QSvgHandler:

Public Types

enum  LengthType {
  LT_PERCENT , LT_PX , LT_PC , LT_PT ,
  LT_MM , LT_CM , LT_IN , LT_OTHER
}
 

Public Member Functions

 QSvgHandler (QIODevice *device, QtSvg::Options options={})
 
 QSvgHandler (const QByteArray &data, QtSvg::Options options={})
 
 QSvgHandler (QXmlStreamReader *const data, QtSvg::Options options={})
 
 ~QSvgHandler ()
 
QIODevicedevice () const
 
QSvgTinyDocumentdocument () const
 
bool ok () const
 
QString errorString () const
 
int lineNumber () const
 
void setDefaultCoordinateSystem (LengthType type)
 
LengthType defaultCoordinateSystem () const
 
void pushColor (const QColor &color)
 
void pushColorCopy ()
 
void popColor ()
 
QColor currentColor () const
 
void setInStyle (bool b)
 
bool inStyle () const
 
QSvgStyleSelectorselector () const
 
void setAnimPeriod (int start, int end)
 
int animationDuration () const
 
void parseCSStoXMLAttrs (const QString &css, QList< QSvgCssAttribute > *attributes)
 
QPen defaultPen () const
 
QtSvg::Options options () const
 
bool trustedSourceMode () const
 
bool startElement (const QString &localName, const QXmlStreamAttributes &attributes)
 
bool endElement (QStringView localName)
 
bool characters (QStringView str)
 
bool processingInstruction (const QString &target, const QString &data)
 

Detailed Description

Definition at line 47 of file qsvghandler_p.h.

Member Enumeration Documentation

◆ LengthType

Enumerator
LT_PERCENT 
LT_PX 
LT_PC 
LT_PT 
LT_MM 
LT_CM 
LT_IN 
LT_OTHER 

Definition at line 50 of file qsvghandler_p.h.

Constructor & Destructor Documentation

◆ QSvgHandler() [1/3]

QSvgHandler::QSvgHandler ( QIODevice * device,
QtSvg::Options options = {} )

Definition at line 4485 of file qsvghandler.cpp.

◆ QSvgHandler() [2/3]

QSvgHandler::QSvgHandler ( const QByteArray & data,
QtSvg::Options options = {} )

Definition at line 4493 of file qsvghandler.cpp.

◆ QSvgHandler() [3/3]

QSvgHandler::QSvgHandler ( QXmlStreamReader *const data,
QtSvg::Options options = {} )

Definition at line 4501 of file qsvghandler.cpp.

◆ ~QSvgHandler()

QSvgHandler::~QSvgHandler ( )

Definition at line 5102 of file qsvghandler.cpp.

Member Function Documentation

◆ animationDuration()

int QSvgHandler::animationDuration ( ) const

Definition at line 5097 of file qsvghandler.cpp.

Referenced by QSvgTinyDocument::load(), QSvgTinyDocument::load(), and QSvgTinyDocument::load().

+ Here is the caller graph for this function:

◆ characters()

bool QSvgHandler::characters ( QStringView str)

Definition at line 4951 of file qsvghandler.cpp.

References addText(), QList< T >::isEmpty(), QCss::Parser::parse(), str, QCss::StyleSelector::styleSheets, QSvgNode::Text, QSvgNode::Textarea, QStack< T >::top(), QSvgNode::Tspan, and QSvgNode::type().

+ Here is the call graph for this function:

◆ currentColor()

QColor QSvgHandler::currentColor ( ) const

Definition at line 5018 of file qsvghandler.cpp.

References QList< T >::isEmpty(), and QStack< T >::top().

Referenced by resolveColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ defaultCoordinateSystem()

QSvgHandler::LengthType QSvgHandler::defaultCoordinateSystem ( ) const

Definition at line 4984 of file qsvghandler.cpp.

Referenced by parseLength().

+ Here is the caller graph for this function:

◆ defaultPen()

QPen QSvgHandler::defaultPen ( ) const
inline

Definition at line 99 of file qsvghandler_p.h.

◆ device()

QIODevice * QSvgHandler::device ( ) const

Definition at line 4974 of file qsvghandler.cpp.

Referenced by createImageNode().

+ Here is the caller graph for this function:

◆ document()

QSvgTinyDocument * QSvgHandler::document ( ) const

Definition at line 4979 of file qsvghandler.cpp.

Referenced by createPatternNode(), QSvgTinyDocument::load(), QSvgTinyDocument::load(), QSvgTinyDocument::load(), parseBaseGradient(), and parseSymbolLikeAttributes().

+ Here is the caller graph for this function:

◆ endElement()

bool QSvgHandler::endElement ( QStringView localName)

Definition at line 4843 of file qsvghandler.cpp.

References QList< T >::isEmpty(), QStack< T >::pop(), popColor(), Q_UNUSED, and QStack< T >::top().

+ Here is the call graph for this function:

◆ errorString()

QString QSvgHandler::errorString ( ) const
inline

Definition at line 74 of file qsvghandler_p.h.

References xml.

Referenced by QSvgTinyDocument::load().

+ Here is the caller graph for this function:

◆ inStyle()

bool QSvgHandler::inStyle ( ) const

Definition at line 5033 of file qsvghandler.cpp.

◆ lineNumber()

int QSvgHandler::lineNumber ( ) const
inline

Definition at line 75 of file qsvghandler_p.h.

References xml.

Referenced by QSvgTinyDocument::load().

+ Here is the caller graph for this function:

◆ ok()

bool QSvgHandler::ok ( ) const
inline

Definition at line 70 of file qsvghandler_p.h.

References xml.

Referenced by QSvgTinyDocument::load(), QSvgTinyDocument::load(), and QSvgTinyDocument::load().

+ Here is the caller graph for this function:

◆ options()

QtSvg::Options QSvgHandler::options ( ) const

Definition at line 2084 of file qsvghandler.cpp.

Referenced by QSvgAttributes::QSvgAttributes(), createSvgNode(), parseExtendedAttributes(), and startElement().

+ Here is the caller graph for this function:

◆ parseCSStoXMLAttrs()

void QSvgHandler::parseCSStoXMLAttrs ( const QString & css,
QList< QSvgCssAttribute > * attributes )

Definition at line 1989 of file qsvghandler.cpp.

References QList< T >::at(), QCss::COLON, QCss::Parser::hasEscapeSequences, QCss::Parser::hasNext(), i, QCss::Parser::index, QCss::Parser::init(), QCss::Symbol::len, Symbol::len, QCss::Parser::lexem(), Symbol::lexem(), QString::mid(), QCss::Parser::next(), QCss::SEMICOLON, QCss::Parser::skipSpace(), QCss::Symbol::start, QCss::Parser::symbol(), QCss::Parser::symbols, QCss::Parser::test(), and QCss::Symbol::text.

Referenced by QSvgAttributes::QSvgAttributes().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ popColor()

void QSvgHandler::popColor ( )

Definition at line 5008 of file qsvghandler.cpp.

References QStack< T >::pop(), QList< T >::size(), and QStack< T >::top().

Referenced by endElement(), parseBaseGradient(), and parseColor().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ processingInstruction()

bool QSvgHandler::processingInstruction ( const QString & target,
const QString & data )

Definition at line 5045 of file qsvghandler.cpp.

References file, QString::fromUtf8(), QRegularExpression::InvertedGreedinessOption, iter, match(), QFile::open(), QCss::Parser::parse(), Q_UNUSED, QIODevice::readAll(), QIODeviceBase::ReadOnly, rx(), QCss::StyleSelector::styleSheets, and QIODeviceBase::Text.

+ Here is the call graph for this function:

◆ pushColor()

void QSvgHandler::pushColor ( const QColor & color)

Definition at line 4994 of file qsvghandler.cpp.

References QStack< T >::push().

Referenced by parseBaseGradient(), parseColor(), and pushColorCopy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ pushColorCopy()

void QSvgHandler::pushColorCopy ( )

Definition at line 5000 of file qsvghandler.cpp.

References Qt::black, pushColor(), QList< T >::size(), and QStack< T >::top().

Referenced by startElement().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ selector()

QSvgStyleSelector * QSvgHandler::selector ( ) const

Definition at line 5038 of file qsvghandler.cpp.

Referenced by parseStopNode().

+ Here is the caller graph for this function:

◆ setAnimPeriod()

void QSvgHandler::setAnimPeriod ( int start,
int end )

Definition at line 5091 of file qsvghandler.cpp.

References Q_UNUSED, and qMax().

Referenced by parseAnimateColorNode(), and parseAnimateTransformNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDefaultCoordinateSystem()

void QSvgHandler::setDefaultCoordinateSystem ( LengthType type)

Definition at line 4989 of file qsvghandler.cpp.

Referenced by createSvgNode().

+ Here is the caller graph for this function:

◆ setInStyle()

void QSvgHandler::setInStyle ( bool b)

Definition at line 5028 of file qsvghandler.cpp.

Referenced by parseStyleNode().

+ Here is the caller graph for this function:

◆ startElement()

◆ trustedSourceMode()

bool QSvgHandler::trustedSourceMode ( ) const

Definition at line 2089 of file qsvghandler.cpp.

References qEnvironmentVariableIsSet().

Referenced by createImageNode(), and createPathNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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