 |
PRCYCoin
2.0.0.7rc1
P2P Digital Currency
|
Go to the documentation of this file.
8 #ifndef BITCOIN_QT_BITCOINUNITS_H
9 #define BITCOIN_QT_BITCOINUNITS_H
13 #include <QAbstractListModel>
17 #define REAL_THIN_SP_CP 0x2009
18 #define REAL_THIN_SP_UTF8 "\xE2\x80\x89"
19 #define REAL_THIN_SP_HTML " "
22 #define HAIR_SP_CP 0x200A
23 #define HAIR_SP_UTF8 "\xE2\x80\x8A"
24 #define HAIR_SP_HTML " "
27 #define SIXPEREM_SP_CP 0x2006
28 #define SIXPEREM_SP_UTF8 "\xE2\x80\x86"
29 #define SIXPEREM_SP_HTML " "
32 #define FIGURE_SP_CP 0x2007
33 #define FIGURE_SP_UTF8 "\xE2\x80\x87"
34 #define FIGURE_SP_HTML " "
40 #define HTML_HACK_SP "<span style='white-space: nowrap; font-size: 6pt'> </span>"
43 #define THIN_SP_CP REAL_THIN_SP_CP
44 #define THIN_SP_UTF8 REAL_THIN_SP_UTF8
45 #define THIN_SP_HTML HTML_HACK_SP
79 static bool valid(
int unit);
81 static QString
id(
int unit);
83 static QString
name(
int unit);
87 static qint64
factor(
int unit);
100 static bool parse(
int unit,
const QString& value,
CAmount* val_out);
112 int rowCount(
const QModelIndex& parent)
const;
113 QVariant
data(
const QModelIndex& index,
int role)
const;
120 #if (THIN_SP_CP != REAL_THIN_SP_CP)
134 #endif // BITCOIN_QT_BITCOINUNITS_H
static QString simpleFormat(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
static QString id(int unit)
Identifier, e.g. for image names.
int rowCount(const QModelIndex &parent) const
static QString floorWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit) but floor value up to "digits" settings.
static int decimals(int unit)
Number of decimals left.
QVariant data(const QModelIndex &index, int role) const
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
static CAmount maxMoney()
Return maximum number of base units (Satoshis)
static qint64 factor(int unit)
Number of Satoshis (1e-8) per unit.
static bool parse(int unit, const QString &value, CAmount *val_out)
Parse string to coin amount.
static bool valid(int unit)
Is unit ID valid?
static QString description(int unit)
Longer description.
static QString removeSpaces(QString text)
static QList< Unit > availableUnits()
Get list of units, for drop-down box.
QList< BitcoinUnits::Unit > unitlist
BitcoinUnits::Unit BitcoinUnit
int64_t CAmount
Amount in PRCY (Can be negative)
static QString format(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string.
static QString getAmountColumnTitle(int unit)
Gets title for amount column including current display unit if optionsModel reference available */.
static QString formatHtmlWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
static QString floorHtmlWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
static QString name(int unit)
Short name.
BitcoinUnits(QObject *parent)
@ UnitRole
Unit identifier.