36 lines
826 B
C
36 lines
826 B
C
|
// Copyright (c) 2011-2015 The Cryptonote developers
|
||
|
// Distributed under the MIT/X11 software license, see the accompanying
|
||
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||
|
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <QString>
|
||
|
|
||
|
#include "cryptonote_core/Currency.h"
|
||
|
|
||
|
namespace WalletGui {
|
||
|
|
||
|
class CurrencyAdapter {
|
||
|
|
||
|
public:
|
||
|
static CurrencyAdapter& instance();
|
||
|
|
||
|
const cryptonote::Currency& getCurrency();
|
||
|
QString getCurrencyDisplayName() const;
|
||
|
QString getCurrencyName() const;
|
||
|
QString getCurrencyTicker() const;
|
||
|
quintptr getNumberOfDecimalPlaces() const;
|
||
|
QString formatAmount(quint64 _amount) const;
|
||
|
quint64 parseAmount(const QString& _amountString) const;
|
||
|
bool validateAddress(const QString& _address) const;
|
||
|
|
||
|
private:
|
||
|
cryptonote::Currency m_currency;
|
||
|
|
||
|
CurrencyAdapter();
|
||
|
~CurrencyAdapter();
|
||
|
};
|
||
|
|
||
|
}
|