KDECore
kcurrencycode.cpp
Go to the documentation of this file.
67 KCurrencyCodePrivate::KCurrencyCodePrivate( const QString &isoCurrencyCode, const QString &language )
69 QFileInfo file( KStandardDirs::locate( "locale", QString::fromLatin1( "currency/%1.desktop" ).arg( isoCurrencyCode.toLower() ) ) );
74 KCurrencyCodePrivate::KCurrencyCodePrivate( const QFileInfo ¤cyCodeFile, const QString &language )
108 void KCurrencyCodePrivate::loadCurrency( const QFileInfo ¤cyCodeFile, const QString &language )
112 // If language is empty, means to stick with the global default, which is the default for any new KConfig
271 bool KCurrencyCode::isValid( const QString &isoCurrencyCode, CurrencyStatusFlags currencyStatusFlags )
281 const QStringList paths = KGlobal::dirs()->findAllResources( "locale", QLatin1String("currency/*.desktop") );
295 QString KCurrencyCode::currencyCodeToName( const QString &isoCurrencyCode, const QString &language )
QString subunitSymbol() const
Return the Currency subunit symbol if it has one e.g.
Definition: kcurrencycode.cpp:246
CurrencyStatus status() const
Return Currency Status for the currency, if Active, Suspended or Obsolete.
Definition: kcurrencycode.cpp:187
QDate dateIntroduced() const
Return the date the currency was introduced.
Definition: kcurrencycode.cpp:198
int subunitsPerUnit() const
Return the number of subunits in every unit, e.g.
Definition: kcurrencycode.cpp:251
static QString currencyCodeToName(const QString ¤cyCode, const QString &language=QString())
Convert a known ISO Currency Code to a human readable, localized form.
Definition: kcurrencycode.cpp:295
bool hasSubunits() const
Return if the Currency has subunits or not, e.g.
Definition: kcurrencycode.cpp:232
static QString locate(const char *type, const QString &filename, const KComponentData &cData=KGlobal::mainComponent())
This function is just for convenience.
Definition: kstandarddirs.cpp:2085
QString unambiguousSymbol() const
Return the unambiguous Symbol for the Currency, e.g.
Definition: kcurrencycode.cpp:223
QDate dateWithdrawn() const
Return the date the currency was withdrawn from circulation.
Definition: kcurrencycode.cpp:208
QString isoName() const
Return untranslated official ISO Currency Code Name.
Definition: kcurrencycode.cpp:182
Currency is not currently in use but has not been replaced.
Definition: kcurrencycode.h:56
Currency is no longer in use and has been replaced.
Definition: kcurrencycode.h:57
Definition: kcurrencycode.h:45
void append(const T &value)
QDate dateSuspended() const
Return the date the currency was suspended.
Definition: kcurrencycode.cpp:203
QString absoluteFilePath() const
bool isEmpty() const
bool hasSubunitsInCirculation() const
Return if the Currency has subunits in circulation, e.g.
Definition: kcurrencycode.cpp:241
KCurrencyCode & operator=(const KCurrencyCode &rhs)
Assignment operator.
Definition: kcurrencycode.cpp:156
QString toLower() const
int decimalPlaces() const
Return the number of decimal places required to display the currency subunits.
Definition: kcurrencycode.cpp:256
QString isoCurrencyCodeNumeric() const
Return the ISO 4217 Currency Code in Numeric 3 format, e.g.
Definition: kcurrencycode.cpp:172
QString isoCurrencyCode() const
Return the ISO 4217 Currency Code in Alpha 3 format, e.g.
Definition: kcurrencycode.cpp:167
QString mid(int position, int n) const
static QStringList allCurrencyCodesList(CurrencyStatusFlags currencyStatus=CurrencyStatusFlags(ActiveCurrency|SuspendedCurrency|ObsoleteCurrency))
Provides list of all known ISO Currency Codes.
Definition: kcurrencycode.cpp:277
bool isValid() const
Return if the currency object loaded/initialised correctly.
Definition: kcurrencycode.cpp:266
int length() const
QStringList symbolList() const
Return a list of valid Symbols for the Currency in order of preference.
Definition: kcurrencycode.cpp:213
QString fromLatin1(const char *str, int size)
QString name() const
Return translated Currency Code Name in a standard display format e.g.
Definition: kcurrencycode.cpp:177
QStringList findAllResources(const char *type, const QString &filter=QString(), SearchOptions options=NoSearchOptions) const
Tries to find all resources with the specified type.
Definition: kstandarddirs.cpp:900
QStringList countriesUsingCurrency() const
Return a list of countries known to be using the currency.
Definition: kcurrencycode.cpp:261
QString defaultSymbol() const
Return the default Symbol for the Currency, e.g.
Definition: kcurrencycode.cpp:218
KCurrencyCode(const QString &isoCurrencyCode, const QString &language=QString())
Constructs a KCurrencyCode for a given ISO Currency Code.
Definition: kcurrencycode.cpp:141
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.