|
Krita Source Code Documentation
|
Namespaces | |
| namespace | Private |
Functions | |
| QDomElement | findElementByAttribute (QDomNode parent, const QString &tag, const QString &attribute, const QString &value) |
| bool | findOnlyElement (const QDomElement &parent, const QString &tag, QDomElement *el, QStringList *errorMessages) |
| template<template< class ... > class Container, typename T , typename E , typename F , typename ... Args> | |
| std::enable_if< KritaUtils::is_appendable_container< Container< T, Args... > >::value, bool >::type | loadValue (const QDomElement &e, Container< T, Args... > *array, const E &env1, const F &env2) |
| template<template< class ... > class Container, typename T , typename E , typename ... Args> | |
| std::enable_if< KritaUtils::is_appendable_container< Container< T, Args... > >::value, bool >::type | loadValue (const QDomElement &e, Container< T, Args... > *array, const E &env=std::tuple<>()) |
| bool | loadValue (const QDomElement &e, double *v) |
| bool | loadValue (const QDomElement &e, float *v) |
| bool | loadValue (const QDomElement &e, KisLazyFillTools::KeyStroke *stroke, const KoColorSpace *colorSpace, const QPoint &offset) |
| bool | loadValue (const QDomElement &e, QColor *value) |
| bool | loadValue (const QDomElement &e, QPoint *pt) |
| bool | loadValue (const QDomElement &e, QPointF *pt) |
| bool | loadValue (const QDomElement &e, QRect *rc) |
| bool | loadValue (const QDomElement &e, QRectF *rc) |
| bool | loadValue (const QDomElement &e, QSize *size) |
| bool | loadValue (const QDomElement &e, QString *value) |
| bool | loadValue (const QDomElement &e, QTransform *t) |
| bool | loadValue (const QDomElement &e, QVector3D *pt) |
| template<typename T > | |
| std::enable_if< std::is_arithmetic< T >::value, bool >::type | loadValue (const QDomElement &e, T *value) |
| bool | loadValue (const QDomElement &parent, const QString &tag, KisTimeSpan *range) |
| template<typename T , typename E , typename F > | |
| bool | loadValue (const QDomElement &parent, const QString &tag, T *value, const E &env1, const F &env2) |
| template<typename T , typename E = std::tuple<>> | |
| bool | loadValue (const QDomElement &parent, const QString &tag, T *value, const E &env=E()) |
| template<typename T , typename E > | |
| std::enable_if< std::is_empty< E >::value, bool >::type | loadValue (const QDomElement &parent, T *value, const E &) |
| QString | qColorToQString (QColor color) |
| QColor | qStringToQColor (QString colorString) |
| bool | removeElements (QDomElement &parent, const QString &tag) |
| template<template< class... > class Container, typename T , typename ... Args> | |
| std::enable_if< KritaUtils::is_container< Container< T, Args... > >::value, void >::type | saveValue (QDomElement *parent, const QString &tag, const Container< T, Args... > &array) |
| void | saveValue (QDomElement *parent, const QString &tag, const KisLazyFillTools::KeyStroke &stroke) |
| void | saveValue (QDomElement *parent, const QString &tag, const KisTimeSpan &range) |
| void | saveValue (QDomElement *parent, const QString &tag, const QColor &c) |
| void | saveValue (QDomElement *parent, const QString &tag, const QPoint &pt) |
| void | saveValue (QDomElement *parent, const QString &tag, const QPointF &pt) |
| void | saveValue (QDomElement *parent, const QString &tag, const QRect &rc) |
| void | saveValue (QDomElement *parent, const QString &tag, const QRectF &rc) |
| void | saveValue (QDomElement *parent, const QString &tag, const QSize &size) |
| void | saveValue (QDomElement *parent, const QString &tag, const QTransform &t) |
| void | saveValue (QDomElement *parent, const QString &tag, const QVector3D &pt) |
| template<typename T > | |
| void | saveValue (QDomElement *parent, const QString &tag, T value) |
| double | toDouble (const QString &str, bool *ok=nullptr) |
| int | toInt (const QString &str, bool *ok=nullptr) |
| QString | toString (const QString &value) |
| QString | toString (double value) |
| QString | toString (float value) |
| template<typename T > | |
| QString | toString (T value) |
| KRITAGLOBAL_EXPORT QDomElement KisDomUtils::findElementByAttribute | ( | QDomNode | parent, |
| const QString & | tag, | ||
| const QString & | attribute, | ||
| const QString & | value ) |
Definition at line 283 of file kis_dom_utils.cpp.
References value().
| bool KRITAGLOBAL_EXPORT KisDomUtils::findOnlyElement | ( | const QDomElement & | parent, |
| const QString & | tag, | ||
| QDomElement * | el, | ||
| QStringList * | errorMessages = 0 ) |
Find an element with tag tag which is a child of parent. The element should be the only element with the provided tag in this parent.
tag is found and it is unique Definition at line 124 of file kis_dom_utils.cpp.
References warnKrita.
| std::enable_if< KritaUtils::is_appendable_container< Container< T, Args... > >::value, bool >::type KisDomUtils::loadValue | ( | const QDomElement & | e, |
| Container< T, Args... > * | array, | ||
| const E & | env1, | ||
| const F & | env2 ) |
Definition at line 285 of file kis_dom_utils.h.
References KisDomUtils::Private::checkType(), loadValue(), and value().
| std::enable_if< KritaUtils::is_appendable_container< Container< T, Args... > >::value, bool >::type KisDomUtils::loadValue | ( | const QDomElement & | e, |
| Container< T, Args... > * | array, | ||
| const E & | env = std::tuple<>() ) |
Load an array from an XML element, which is a child of parent and has a tag tag.
Definition at line 269 of file kis_dom_utils.h.
References KisDomUtils::Private::checkType(), loadValue(), and value().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| double * | v ) |
Definition at line 173 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), toDouble(), and v.
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| float * | v ) |
Load an object from an XML element, which is a child of parent and has a tag tag.
Definition at line 166 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), toDouble(), and v.
| bool KRITALIBKRA_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| KisLazyFillTools::KeyStroke * | stroke, | ||
| const KoColorSpace * | colorSpace, | ||
| const QPoint & | offset ) |
Definition at line 36 of file kis_colorize_dom_utils.cpp.
References KisDomUtils::Private::checkType(), KisLazyFillTools::KeyStroke::color, KisLazyFillTools::KeyStroke::dev, KoColorSpaceRegistry::instance(), KisLazyFillTools::KeyStroke::isTransparent, KisPaintDevice::moveTo(), and toInt().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QColor * | value ) |
Definition at line 276 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and value().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QPoint * | pt ) |
Definition at line 214 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toInt().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QPointF * | pt ) |
Definition at line 224 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toDouble().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QRect * | rc ) |
Definition at line 190 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toInt().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QRectF * | rc ) |
Definition at line 202 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toInt().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QSize * | size ) |
Definition at line 180 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toInt().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QString * | value ) |
Definition at line 269 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and value().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QTransform * | t ) |
Definition at line 245 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toDouble().
| bool KRITAGLOBAL_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | e, |
| QVector3D * | pt ) |
Definition at line 234 of file kis_dom_utils.cpp.
References KisDomUtils::Private::checkType(), and toDouble().
| std::enable_if< std::is_arithmetic< T >::value, bool >::type KisDomUtils::loadValue | ( | const QDomElement & | e, |
| T * | value ) |
Load a scalar value from an XML element, which is a child of parent and has a tag tag.
Definition at line 239 of file kis_dom_utils.h.
References KisDomUtils::Private::checkType(), v, and value().
| bool KRITAIMAGE_EXPORT KisDomUtils::loadValue | ( | const QDomElement & | parent, |
| const QString & | tag, | ||
| KisTimeSpan * | range ) |
Definition at line 115 of file kis_time_span.cpp.
References KisDomUtils::Private::checkType(), findOnlyElement(), KisTimeSpan::fromTimeToTime(), KisTimeSpan::infinite(), and toInt().
| bool KisDomUtils::loadValue | ( | const QDomElement & | parent, |
| const QString & | tag, | ||
| T * | value, | ||
| const E & | env1, | ||
| const F & | env2 ) |
Definition at line 309 of file kis_dom_utils.h.
References findOnlyElement(), loadValue(), and value().
| bool KisDomUtils::loadValue | ( | const QDomElement & | parent, |
| const QString & | tag, | ||
| T * | value, | ||
| const E & | env = E() ) |
Definition at line 300 of file kis_dom_utils.h.
References findOnlyElement(), loadValue(), and value().
| std::enable_if< std::is_empty< E >::value, bool >::type KisDomUtils::loadValue | ( | const QDomElement & | parent, |
| T * | value, | ||
| const E & | ) |
A special adapter method that makes vector- and tag-based methods work with environment parameter uniformly.
Definition at line 254 of file kis_dom_utils.h.
References loadValue(), and value().
|
inline |
Definition at line 116 of file kis_dom_utils.h.
|
inline |
| KRITAGLOBAL_EXPORT bool KisDomUtils::removeElements | ( | QDomElement & | parent, |
| const QString & | tag ) |
Definition at line 142 of file kis_dom_utils.cpp.
References KIS_SAFE_ASSERT_RECOVER_NOOP.
| std::enable_if< KritaUtils::is_container< Container< T, Args... > >::value, void >::type KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const Container< T, Args... > & | array ) |
Save a vector of values into an XML tree. A child for parent is created and assigned a tag tag. The values in the array should have a type supported by saveValue() overrides. The corresponding vector can be fetched from the XML using loadValue() later.
Definition at line 180 of file kis_dom_utils.h.
References saveValue(), and v.
| void KRITALIBKRA_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const KisLazyFillTools::KeyStroke & | stroke ) |
Definition at line 16 of file kis_colorize_dom_utils.cpp.
References KisLazyFillTools::KeyStroke::color, KoColor::colorSpace(), KoColor::data(), KisLazyFillTools::KeyStroke::isTransparent, and KoColorSpace::pixelSize().
| void KRITAIMAGE_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const KisTimeSpan & | range ) |
Definition at line 97 of file kis_time_span.cpp.
References KisTimeSpan::end(), KisTimeSpan::isInfinite(), KisTimeSpan::isValid(), KisTimeSpan::start(), and toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QColor & | c ) |
Definition at line 114 of file kis_dom_utils.cpp.
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QPoint & | pt ) |
Definition at line 56 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QPointF & | pt ) |
Definition at line 68 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QRect & | rc ) |
Save a value of type QRect into an XML tree. A child for parent is created and assigned a tag tag. The corresponding value can be fetched from the XML using loadValue() later.
Definition at line 28 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QRectF & | rc ) |
Definition at line 42 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QSize & | size ) |
Definition at line 16 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QTransform & | t ) |
Definition at line 93 of file kis_dom_utils.cpp.
References toString().
| void KRITAGLOBAL_EXPORT KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| const QVector3D & | pt ) |
Definition at line 80 of file kis_dom_utils.cpp.
References toString().
| void KisDomUtils::saveValue | ( | QDomElement * | parent, |
| const QString & | tag, | ||
| T | value ) |
Save a value of a scalar type into an XML tree. A child for parent is created and assigned a tag tag. The corresponding value can be fetched from the XML using loadValue() later.
Definition at line 160 of file kis_dom_utils.h.
References toString(), and value().
|
inline |
A special workaround to handle ','/'.' decimal point in different locales. Added for backward compatibility, because we used to save qreals directly using
e.setAttribute("w", (qreal)value),
which did local-aware conversion.
Definition at line 82 of file kis_dom_utils.h.
|
inline |
Definition at line 59 of file kis_dom_utils.h.
|
inline |
|
inline |
Definition at line 49 of file kis_dom_utils.h.
References KisPortingUtils::setUtf8OnStream(), and value().
|
inline |
Definition at line 39 of file kis_dom_utils.h.
References KisPortingUtils::setUtf8OnStream(), and value().
|
inline |
Definition at line 35 of file kis_dom_utils.h.
References value().