2015-04-29 17:03:08 +00:00
|
|
|
// 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>
|
|
|
|
|
2015-09-18 12:37:30 +00:00
|
|
|
#include "CryptoNoteCore/Currency.h"
|
2015-04-29 17:03:08 +00:00
|
|
|
|
|
|
|
namespace WalletGui {
|
|
|
|
|
|
|
|
class CurrencyAdapter {
|
|
|
|
|
|
|
|
public:
|
|
|
|
static CurrencyAdapter& instance();
|
|
|
|
|
2015-09-18 12:37:30 +00:00
|
|
|
const CryptoNote::Currency& getCurrency();
|
2015-04-29 17:03:08 +00:00
|
|
|
QString getCurrencyDisplayName() const;
|
|
|
|
QString getCurrencyName() const;
|
|
|
|
QString getCurrencyTicker() const;
|
2015-04-30 12:11:48 +00:00
|
|
|
quint64 getMinimumFee() const;
|
2015-04-29 17:03:08 +00:00
|
|
|
quintptr getNumberOfDecimalPlaces() const;
|
|
|
|
QString formatAmount(quint64 _amount) const;
|
|
|
|
quint64 parseAmount(const QString& _amountString) const;
|
|
|
|
bool validateAddress(const QString& _address) const;
|
|
|
|
|
|
|
|
private:
|
2015-09-18 12:37:30 +00:00
|
|
|
CryptoNote::Currency m_currency;
|
2015-04-29 17:03:08 +00:00
|
|
|
|
|
|
|
CurrencyAdapter();
|
|
|
|
~CurrencyAdapter();
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|