6#ifndef CSSQMLUNITCONVERTER_H
7#define CSSQMLUNITCONVERTER_H
100 void setDpi(qreal newDpi);
148 const QScopedPointer<Private>
d;
float value(const T *src, size_t ch)
The CssQmlUnitConverter class.
QString symbol
The symbol.
void setPercentageReference(qreal newPercentageReference)
@ Ic
average full-width advance
@ Lines
Used by lineHeight.
@ Px
Pixels, dpi relative.
@ Ch
average proportional advance
Q_INVOKABLE void setFontMetricsFromTextPropertiesModel(KoSvgTextPropertiesModel *textPropertiesModel, bool isFontSize=false, bool isLineHeight=false)
setFontMetricsFromTextPropertiesModel Set the current font metrics from the text properties model.
qreal convertToRelativeValue(const qreal value, const UserUnits type) const
const QScopedPointer< Private > d
qreal percentageReference
value to represent 100%
void setDataMultiplier(qreal newDataMultiplier)
QVariantList userUnitModel
A model for the available user units.
void userUnitModelChanged()
void dataMultiplierChanged()
void setDataUnit(int newDataUnit)
void setUserUnit(int newUserUnit)
qreal convertFromRelativeValue(const qreal value, const UserUnits type) const
void setDpi(qreal newDpi)
void setUserValue(qreal newUserValue)
qreal dpi
The DPI used to calculate pixel to physical properties.
void setDataValue(qreal newDataValue)
void percentageReferenceChanged()
Q_INVOKABLE void setDataUnitMap(const QVariantList &unitMap)
setDataUnitMap
Q_INVOKABLE void setFromNormalLineHeight()
setFromNormalLineHeight set the current value from line-height:normal metrics.
qreal userValue
userValue and userUnit represent the user-visible data. This can include synthetic units like px and ...
qreal dataMultiplier
Data multiplier is used if for some reason the user-value needs to be multiplied by a certain factor.
Q_INVOKABLE void setDataValueAndUnit(const qreal value, const int unit)
setDataValueAndUnit set data unit and value in one go.
qreal dataValue
dataValue and dataUnit represent the data as used by the text properties.
The KoSvgTextPropertiesModel class.