• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDECore

  • sources
  • kde-4.14
  • kdelibs
  • kdecore
  • localization
kcurrencycode.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2009 John Layt <john@layt.net>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #ifndef KCURRENCYCODE_H
21 #define KCURRENCYCODE_H
22 
23 #include <kdecore_export.h>
24 
25 #include <QtCore/QSharedDataPointer>
26 #include <QtCore/QString>
27 
28 class QDate;
29 class QStringList;
30 class QFileInfo;
31 
32 class KCurrencyCodePrivate;
33 
45 class KDECORE_EXPORT KCurrencyCode
46 {
47 public:
54  enum CurrencyStatus {
55  ActiveCurrency = 0x01,
56  SuspendedCurrency = 0x02,
57  ObsoleteCurrency = 0x04
58  };
59  Q_DECLARE_FLAGS( CurrencyStatusFlags, CurrencyStatus )
60 
61 
70  explicit KCurrencyCode( const QString &isoCurrencyCode, const QString &language = QString() );
71 
83  explicit KCurrencyCode( const QFileInfo &currencyCodeFile, const QString &language = QString() );
84 
91  KCurrencyCode( const KCurrencyCode &rhs );
92 
96  virtual ~KCurrencyCode();
97 
104  KCurrencyCode& operator=( const KCurrencyCode &rhs );
105 
113  QString isoCurrencyCode() const;
114 
122  QString isoCurrencyCodeNumeric() const;
123 
132  QString name() const;
133 
144  QString isoName() const;
145 
153  CurrencyStatus status() const;
154 
164  QDate dateIntroduced() const;
165 
175  QDate dateSuspended() const;
176 
186  QDate dateWithdrawn() const;
187 
198  QStringList symbolList() const;
199 
208  QString defaultSymbol() const;
209 
218  QString unambiguousSymbol() const;
219 
231  bool hasSubunits() const;
232 
241  bool hasSubunitsInCirculation() const;
242 
251  QString subunitSymbol() const;
252 
260  int subunitsPerUnit() const;
261 
267  int decimalPlaces() const;
268 
274  QStringList countriesUsingCurrency() const;
275 
281  bool isValid() const;
282 
292  static bool isValid( const QString &currencyCode, CurrencyStatusFlags currencyStatus =
293  CurrencyStatusFlags( ActiveCurrency |
294  SuspendedCurrency |
295  ObsoleteCurrency ) );
296 
311  static QStringList allCurrencyCodesList( CurrencyStatusFlags currencyStatus =
312  CurrencyStatusFlags( ActiveCurrency |
313  SuspendedCurrency |
314  ObsoleteCurrency ) );
315 
331  static QString currencyCodeToName( const QString &currencyCode, const QString &language = QString() );
332 
333 
334 private:
335  QSharedDataPointer<KCurrencyCodePrivate> d;
336 };
337 
338 Q_DECLARE_OPERATORS_FOR_FLAGS( KCurrencyCode::CurrencyStatusFlags )
339 
340 
341 #endif // KCURRENCYCODE_H
kdecore_export.h
KCurrencyCode
Definition: kcurrencycode.h:45
QDate
QString
QStringList
QFileInfo
KCurrencyCode::CurrencyStatus
CurrencyStatus
The Status of the Currency.
Definition: kcurrencycode.h:54
QSharedDataPointer
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

KDE's Doxygen guidelines are available online.

KDECore

Skip menu "KDECore"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal