KReport
KReportUnit.cpp
343 kreportWarning() << "KReportUnit::parseValue: Unit" << symbol << "is not supported, please report.";
383 qreal KReportUnit::convertFromUnitToUnit(qreal value, const KReportUnit &fromUnit, const KReportUnit &toUnit, qreal factor)
static qreal toCicero(qreal ptValue)
Prepare ptValue to be displayed in cicero This method will round to 0.00001 precision,...
Definition: KReportUnit.h:216
qreal toReal(bool *ok) const const
void append(const T &value)
void truncate(int position)
qreal height() const const
KCALENDARCORE_EXPORT QDataStream & operator<<(QDataStream &out, const KCalendarCore::Alarm::Ptr &)
Type type(const QSqlDatabase &db)
static qreal ptToUnit(qreal ptValue, const KReportUnit &unit)
Convert the value ptValue to a given unit unit Unlike KReportUnit::ptToUnit the return value remains ...
Definition: KReportUnit.cpp:198
static KReportUnit::Type symbolToType(const QString &symbol)
Returns a unit symbol string to type.
Definition: KReportUnit.cpp:356
QDebug & nospace()
QDebug & space()
QByteArray toLatin1() const const
bool isLetter() const const
QString simplified() const const
QString symbol() const
Returns the symbol string of the unit Symbol for Invalid type is empty string.
Definition: KReportUnit.cpp:455
static qreal toCentimeter(qreal ptValue)
Prepare ptValue to be displayed in cm This method will round to 0.0001 precision, use POINT_TO_CM() f...
Definition: KReportUnit.h:178
QLocale system()
static qreal toDecimeter(qreal ptValue)
Prepare ptValue to be displayed in dm This method will round to 0.0001 precision, use POINT_TO_DM() f...
Definition: KReportUnit.h:187
static QStringList descriptions(const QList< Type > &types)
Returns the list of (translated) description strings for given list of types.
Definition: KReportUnit.cpp:163
qreal toUserValue(qreal ptValue) const
This method is the one to use to display a value in a dialog.
Definition: KReportUnit.cpp:172
static qreal toPoint(qreal ptValue)
Prepare ptValue to be displayed in pt This method will round to 0.001 precision.
Definition: KReportUnit.h:158
qreal fromUserValue(qreal value) const
Equal to convertToPoint(), use convertToPoint() instead for clarity.
Definition: KReportUnit.h:271
bool isEmpty() const const
int length() const const
QString toUserStringValue(qreal ptValue) const
This method is the one to use to display a value in a dialog.
Definition: KReportUnit.cpp:223
QString toString(qlonglong i) const const
qreal convertFromPoint(qreal ptValue) const
Definition: KReportUnit.cpp:228
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
static QString symbol(KReportUnit::Type type)
Returns the symbol string of given unit type Symbol for Invalid type is empty string.
Definition: KReportUnit.cpp:350
double toDouble(bool *ok) const const
QString & remove(int position, int n)
static qreal toMillimeter(qreal ptValue)
Prepare ptValue to be displayed in mm This method will round to 0.0001 precision, use POINT_TO_MM() f...
Definition: KReportUnit.h:168
qreal x() const const
qreal y() const const
QString arg(qlonglong a, int fieldWidth, int base, QChar fillChar) const const
static QStringList symbols(const QList< Type > &types)
Returns the list of unit symbols for the given types.
Definition: KReportUnit.cpp:374
QString fromLatin1(const char *str, int size)
const QChar at(int position) const const
static qreal convertFromUnitToUnit(qreal value, const KReportUnit &fromUnit, const KReportUnit &toUnit, qreal factor=1.0)
convert the given value directly from one unit to another with high accuracy
Definition: KReportUnit.cpp:383
static qreal toPica(qreal ptValue)
Prepare ptValue to be displayed in pica This method will round to 0.00001 precision,...
Definition: KReportUnit.h:206
QString mid(int position, int n) const const
KReportUnit & operator=(Type type)
Assigns specified type and factor 1.0 to the object.
Definition: KReportUnit.cpp:111
QString description() const
Returns (translated) description string for type of this unit.
Definition: KReportUnit.cpp:158
static QList< Type > allTypes()
Returns list of all supported types (without Invalid)
Definition: KReportUnit.cpp:126
static qreal toInch(qreal ptValue)
Prepare ptValue to be displayed in inch This method will round to 0.00001 precision,...
Definition: KReportUnit.h:196
qreal width() const const
static qreal parseAngle(const QString &value, qreal defaultVal=0.0)
parse an angle to its value in degrees defaultVal is in degrees
Definition: KReportUnit.cpp:460
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:08:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 23 2023 04:08:47 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.