Qt 6.x
The Qt SDK
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)
 
 QSvgHandler (const QByteArray &data)
 
 QSvgHandler (QXmlStreamReader *const data)
 
 ~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
 
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)

Definition at line 3588 of file qsvghandler.cpp.

◆ QSvgHandler() [2/3]

QSvgHandler::QSvgHandler ( const QByteArray data)

Definition at line 3594 of file qsvghandler.cpp.

◆ QSvgHandler() [3/3]

QSvgHandler::QSvgHandler ( QXmlStreamReader *const  data)

Definition at line 3600 of file qsvghandler.cpp.

◆ ~QSvgHandler()

QSvgHandler::~QSvgHandler ( )

Definition at line 4069 of file qsvghandler.cpp.

Member Function Documentation

◆ animationDuration()

int QSvgHandler::animationDuration ( ) const

Definition at line 4064 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 3918 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 3985 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 3951 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 3941 of file qsvghandler.cpp.

Referenced by createImageNode().

+ Here is the caller graph for this function:

◆ document()

QSvgTinyDocument * QSvgHandler::document ( ) const

Definition at line 3946 of file qsvghandler.cpp.

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

+ Here is the caller graph for this function:

◆ endElement()

bool QSvgHandler::endElement ( QStringView  localName)

Definition at line 3825 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 4000 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:

◆ parseCSStoXMLAttrs()

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

Definition at line 1944 of file qsvghandler.cpp.

References QList< T >::append(), QList< T >::at(), QCss::COLON, QCss::Parser::hasEscapeSequences, QCss::Parser::hasNext(), i, QCss::Parser::index, QCss::Parser::init(), QCss::Symbol::len, QCss::Symbol::lexem(), QCss::Parser::lexem(), QString::mid(), QCss::Parser::next(), QList< T >::reserve(), 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 3975 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 4012 of file qsvghandler.cpp.

References QFileInfo::absoluteFilePath(), QFileInfo::exists(), fi, 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 3961 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 3967 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 4005 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 4058 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 3956 of file qsvghandler.cpp.

Referenced by createSvgNode().

+ Here is the caller graph for this function:

◆ setInStyle()

void QSvgHandler::setInStyle ( bool  b)

Definition at line 3995 of file qsvghandler.cpp.

Referenced by parseStyleNode().

+ Here is the caller graph for this function:

◆ startElement()


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