KItinerary::PriceUtil
#include <priceutil.h>
Static Public Member Functions | |
static Q_INVOKABLE bool | canHavePrice (const QVariant &item) |
static Q_INVOKABLE QString | currency (const QVariant &item) |
static Q_INVOKABLE int | decimalCount (const QString ¤cy) |
static int | decimalCount (QStringView currency) |
static Q_INVOKABLE bool | hasPrice (const QVariant &item) |
static Q_INVOKABLE double | price (const QVariant &item) |
static Q_INVOKABLE void | setPrice (QVariant &item, double price, const QString ¤cy) |
Detailed Description
Utilities for dealing with price/currency information of items.
Definition at line 20 of file priceutil.h.
Member Function Documentation
◆ canHavePrice()
|
static |
Returns true
if item
can have price/currency information.
Definition at line 33 of file priceutil.cpp.
◆ currency()
Returns the currency value from item
.
Definition at line 52 of file priceutil.cpp.
◆ decimalCount() [1/2]
|
static |
Definition at line 106 of file priceutil.cpp.
◆ decimalCount() [2/2]
|
static |
Returns the number of decimals to represent the sub-unit of currency
.
- Parameters
-
currency ISO 4217 currency code
Definition at line 92 of file priceutil.cpp.
◆ hasPrice()
|
static |
Returns true
if item
has valid price and currency information.
Definition at line 16 of file priceutil.cpp.
◆ price()
|
static |
Returns the price value from item
.
Definition at line 38 of file priceutil.cpp.
◆ setPrice()
Sets price
and currency
on item
.
Definition at line 66 of file priceutil.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:59 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.