KReport
KReportUtils.cpp
69QColor KReportUtils::attr(const QDomElement &el, const QString &attrName, const QColor &defaultValue)
78qreal KReportUtils::attrPercent(const QDomElement& el, const QString &attrName, qreal defaultValue)
198int KReportUtils::readPercent(const QDomElement& el, const QString &attrName, int defaultPercentValue, bool *ok)
217QString KReportUtils::readSectionTypeNameAttribute(const QDomElement &el, const QString &defaultValue)
232static QFont::Capitalization readFontCapitalization(const QByteArray& fontVariant, const QByteArray& textTransform)
292 const QByteArray strikeOutType(attr(el, QLatin1String("style:text-line-through-type"), QByteArray()));
293 font->setStrikeOut(!strikeOutType.isEmpty() && strikeOutType != "none"); // double or single (we don't recognize them)
378 el->setAttribute(QLatin1String("fo:letter-spacing"), roundValueToString(font.letterSpacing()) + QLatin1Char('%'));
383 // A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
397void KReportUtils::buildXMLTextStyle(QDomDocument *doc, QDomElement *entity, const KReportTextStyleData &ts)
405 element.setAttribute(QLatin1String("fo:background-opacity"), QString::number(ts.backgroundOpacity) + QLatin1Char('%'));
411void KReportUtils::buildXMLLineStyle(QDomDocument *doc, QDomElement *entity, const KReportLineStyle &ls)
511bool KReportUtils::parseReportTextStyleData(const QDomElement & elemSource, KReportTextStyleData *ts)
531bool KReportUtils::parseReportLineStyleData(const QDomElement & elemSource, KReportLineStyle *ls)
535 ls->setColor(QColor(elemSource.attribute(QLatin1String("report:line-color"), QLatin1String("#ffffff"))));
536 ls->setWeight(elemSource.attribute(QLatin1String("report:line-weight"), QLatin1String("0.0")).toDouble());
int type() const
QVariant value() const
bool setValue(const QVariant &value, ValueOptions options=ValueOptions())
QByteArray name() const
The KReportLineStyle class represents line style.
Definition KReportLineStyle.shared.h:27
static qreal parseValue(const QString &value, qreal defaultVal=0.0)
Parses common KReport and ODF values, like "10cm", "5mm" to pt.
Definition KReportUnit.cpp:303
QString name(StandardAction id)
KGuiItem ok()
bool isEmpty() const const
QByteArray toLower() const const
QString name(NameFormat format) const const
QDomElement createElement(const QString &tagName)
QString attribute(const QString &name, const QString &defValue) const const
bool hasAttribute(const QString &name) const const
void setAttribute(const QString &name, const QString &value)
QString tagName() const const
QDomNode appendChild(const QDomNode &newChild)
Capitalization
PercentageSpacing
Bold
Capitalization capitalization() const const
QString family() const const
bool fixedPitch() const const
bool italic() const const
bool kerning() const const
qreal letterSpacing() const const
SpacingType letterSpacingType() const const
int pointSize() const const
qreal pointSizeF() const const
void setCapitalization(Capitalization caps)
void setFamily(const QString &family)
void setFixedPitch(bool enable)
void setItalic(bool enable)
void setKerning(bool enable)
void setLetterSpacing(SpacingType type, qreal spacing)
void setPointSizeF(qreal pointSize)
void setStrikeOut(bool enable)
void setUnderline(bool enable)
void setWeight(Weight weight)
bool strikeOut() const const
bool underline() const const
Weight weight() const const
iterator insert(const Key &key, const T &value)
bool isEmpty() const const
Key key(const T &value) const const
T value(const Key &key) const const
PageSizeId
QString key() const const
qreal x() const const
qreal y() const const
void setSize(const QSizeF &size)
void setX(qreal x)
void setY(qreal y)
QSizeF size() const const
qreal x() const const
qreal y() const const
qreal height() const const
void setHeight(qreal height)
void setWidth(qreal width)
qreal width() const const
QString fromLatin1(QByteArrayView str)
bool isEmpty() const const
QString number(double n, char format, int precision)
QString & setNum(double n, char format, int precision)
QByteArray toLatin1() const const
typedef Alignment
PenStyle
bool convert(QMetaType targetType)
bool toBool() const const
double toDouble(bool *ok) const const
int toInt(bool *ok) const const
qreal toReal(bool *ok) const const
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.