![]() |
Qt 6.x
The Qt SDK
|
#include <qsvghandler_p.h>
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 () | |
QIODevice * | device () const |
QSvgTinyDocument * | document () 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 |
QSvgStyleSelector * | selector () 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) |
Definition at line 47 of file qsvghandler_p.h.
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.
QSvgHandler::QSvgHandler | ( | QIODevice * | device | ) |
Definition at line 3588 of file qsvghandler.cpp.
QSvgHandler::QSvgHandler | ( | const QByteArray & | data | ) |
Definition at line 3594 of file qsvghandler.cpp.
QSvgHandler::QSvgHandler | ( | QXmlStreamReader *const | data | ) |
Definition at line 3600 of file qsvghandler.cpp.
QSvgHandler::~QSvgHandler | ( | ) |
Definition at line 4069 of file qsvghandler.cpp.
int QSvgHandler::animationDuration | ( | ) | const |
Definition at line 4064 of file qsvghandler.cpp.
Referenced by QSvgTinyDocument::load(), QSvgTinyDocument::load(), and QSvgTinyDocument::load().
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().
QColor QSvgHandler::currentColor | ( | ) | const |
Definition at line 3985 of file qsvghandler.cpp.
References QList< T >::isEmpty(), and QStack< T >::top().
Referenced by resolveColor().
QSvgHandler::LengthType QSvgHandler::defaultCoordinateSystem | ( | ) | const |
Definition at line 3951 of file qsvghandler.cpp.
Referenced by parseLength().
|
inline |
Definition at line 99 of file qsvghandler_p.h.
QIODevice * QSvgHandler::device | ( | ) | const |
Definition at line 3941 of file qsvghandler.cpp.
Referenced by createImageNode().
QSvgTinyDocument * QSvgHandler::document | ( | ) | const |
Definition at line 3946 of file qsvghandler.cpp.
Referenced by QSvgTinyDocument::load(), QSvgTinyDocument::load(), QSvgTinyDocument::load(), and parseBaseGradient().
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().
|
inline |
Definition at line 74 of file qsvghandler_p.h.
References xml.
Referenced by QSvgTinyDocument::load().
bool QSvgHandler::inStyle | ( | ) | const |
Definition at line 4000 of file qsvghandler.cpp.
|
inline |
Definition at line 75 of file qsvghandler_p.h.
References xml.
Referenced by QSvgTinyDocument::load().
|
inline |
Definition at line 70 of file qsvghandler_p.h.
References xml.
Referenced by QSvgTinyDocument::load(), QSvgTinyDocument::load(), and QSvgTinyDocument::load().
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().
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().
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.
Definition at line 3961 of file qsvghandler.cpp.
References QStack< T >::push().
Referenced by parseBaseGradient(), parseColor(), and 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().
QSvgStyleSelector * QSvgHandler::selector | ( | ) | const |
Definition at line 4005 of file qsvghandler.cpp.
Referenced by parseStopNode().
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().
void QSvgHandler::setDefaultCoordinateSystem | ( | LengthType | type | ) |
Definition at line 3956 of file qsvghandler.cpp.
Referenced by createSvgNode().
void QSvgHandler::setInStyle | ( | bool | b | ) |
Definition at line 3995 of file qsvghandler.cpp.
Referenced by parseStyleNode().
bool QSvgHandler::startElement | ( | const QString & | localName, |
const QXmlStreamAttributes & | attributes | ||
) |
Definition at line 3669 of file qsvghandler.cpp.
References QSvgStructureNode::addChild(), QList< T >::append(), QSvgNode::appendStyleProperty(), cssStyleLookup(), QSvgText::Default, QSvgNode::DEFS, QSvgNode::DOC, findGraphicsFactory(), findGroupFactory(), findStyleFactoryMethod(), findStyleUtilFactoryMethod(), findUtilFactory(), QSvgNode::G, QList< T >::isEmpty(), QStringView::isNull(), method, msgProblemParsing(), parseCoreNode(), parseStyle(), prefixMessage(), QSvgText::Preserve, QStack< T >::push(), pushColorCopy(), Q_ASSERT, QByteArrayLiteral, qCWarning, someId(), QSvgNode::SWITCH, QSvgNode::TEXT, QSvgNode::TEXTAREA, QString::toLocal8Bit(), QStack< T >::top(), QStringView::toString(), QSvgNode::TSPAN, QSvgNode::type(), QSvgNode::USE, and QXmlStreamAttributes::value().