1
mirror of https://github.com/monero-project/monero-gui synced 2024-12-30 22:56:24 +01:00

rename Bitmonero to Monero

This commit is contained in:
Jaquee 2016-12-13 19:51:07 +01:00
parent ff998ba17b
commit 47edfd7211
No known key found for this signature in database
GPG Key ID: 384E52B09F45DC39
10 changed files with 59 additions and 59 deletions

View File

@ -47,7 +47,7 @@ quint64 PendingTransaction::txCount() const
return m_pimpl->txCount(); return m_pimpl->txCount();
} }
PendingTransaction::PendingTransaction(Bitmonero::PendingTransaction *pt, QObject *parent) PendingTransaction::PendingTransaction(Monero::PendingTransaction *pt, QObject *parent)
: QObject(parent), m_pimpl(pt) : QObject(parent), m_pimpl(pt)
{ {

View File

@ -5,7 +5,7 @@
#include <wallet/wallet2_api.h> #include <wallet/wallet2_api.h>
//namespace Bitmonero { //namespace Monero {
//class PendingTransaction; //class PendingTransaction;
//} //}
@ -22,15 +22,15 @@ class PendingTransaction : public QObject
public: public:
enum Status { enum Status {
Status_Ok = Bitmonero::PendingTransaction::Status_Ok, Status_Ok = Monero::PendingTransaction::Status_Ok,
Status_Error = Bitmonero::PendingTransaction::Status_Error Status_Error = Monero::PendingTransaction::Status_Error
}; };
Q_ENUM(Status) Q_ENUM(Status)
enum Priority { enum Priority {
Priority_Low = Bitmonero::PendingTransaction::Priority_Low, Priority_Low = Monero::PendingTransaction::Priority_Low,
Priority_Medium = Bitmonero::PendingTransaction::Priority_Medium, Priority_Medium = Monero::PendingTransaction::Priority_Medium,
Priority_High = Bitmonero::PendingTransaction::Priority_High Priority_High = Monero::PendingTransaction::Priority_High
}; };
Q_ENUM(Priority) Q_ENUM(Priority)
@ -45,11 +45,11 @@ public:
quint64 txCount() const; quint64 txCount() const;
private: private:
explicit PendingTransaction(Bitmonero::PendingTransaction * pt, QObject *parent = 0); explicit PendingTransaction(Monero::PendingTransaction * pt, QObject *parent = 0);
private: private:
friend class Wallet; friend class Wallet;
Bitmonero::PendingTransaction * m_pimpl; Monero::PendingTransaction * m_pimpl;
}; };
#endif // PENDINGTRANSACTION_H #endif // PENDINGTRANSACTION_H

View File

@ -82,7 +82,7 @@ QDateTime TransactionHistory::lastDateTime() const
} }
TransactionHistory::TransactionHistory(Bitmonero::TransactionHistory *pimpl, QObject *parent) TransactionHistory::TransactionHistory(Monero::TransactionHistory *pimpl, QObject *parent)
: QObject(parent), m_pimpl(pimpl) : QObject(parent), m_pimpl(pimpl)
{ {
m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block

View File

@ -5,7 +5,7 @@
#include <QList> #include <QList>
#include <QDateTime> #include <QDateTime>
namespace Bitmonero { namespace Monero {
class TransactionHistory; class TransactionHistory;
} }
@ -37,11 +37,11 @@ public slots:
private: private:
explicit TransactionHistory(Bitmonero::TransactionHistory * pimpl, QObject *parent = 0); explicit TransactionHistory(Monero::TransactionHistory * pimpl, QObject *parent = 0);
private: private:
friend class Wallet; friend class Wallet;
Bitmonero::TransactionHistory * m_pimpl; Monero::TransactionHistory * m_pimpl;
mutable QList<TransactionInfo*> m_tinfo; mutable QList<TransactionInfo*> m_tinfo;
mutable QDateTime m_firstDateTime; mutable QDateTime m_firstDateTime;
mutable QDateTime m_lastDateTime; mutable QDateTime m_lastDateTime;

View File

@ -97,7 +97,7 @@ QList<Transfer*> TransactionInfo::transfers() const
return m_transfers; return m_transfers;
} }
TransactionInfo::TransactionInfo(Bitmonero::TransactionInfo *pimpl, QObject *parent) TransactionInfo::TransactionInfo(Monero::TransactionInfo *pimpl, QObject *parent)
: QObject(parent), m_pimpl(pimpl) : QObject(parent), m_pimpl(pimpl)
{ {

View File

@ -27,8 +27,8 @@ class TransactionInfo : public QObject
public: public:
enum Direction { enum Direction {
Direction_In = Bitmonero::TransactionInfo::Direction_In, Direction_In = Monero::TransactionInfo::Direction_In,
Direction_Out = Bitmonero::TransactionInfo::Direction_Out, Direction_Out = Monero::TransactionInfo::Direction_Out,
Direction_Both // invalid direction value, used for filtering Direction_Both // invalid direction value, used for filtering
}; };
@ -54,10 +54,10 @@ public:
//! Could be useful later when addressbook is implemented //! Could be useful later when addressbook is implemented
Q_INVOKABLE QList<Transfer*> transfers() const; Q_INVOKABLE QList<Transfer*> transfers() const;
private: private:
explicit TransactionInfo(Bitmonero::TransactionInfo * pimpl, QObject *parent = 0); explicit TransactionInfo(Monero::TransactionInfo * pimpl, QObject *parent = 0);
private: private:
friend class TransactionHistory; friend class TransactionHistory;
Bitmonero::TransactionInfo * m_pimpl; Monero::TransactionInfo * m_pimpl;
mutable QList<Transfer*> m_transfers; mutable QList<Transfer*> m_transfers;
}; };

View File

@ -18,7 +18,7 @@ namespace {
static const int WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS = 5; static const int WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS = 5;
} }
class WalletListenerImpl : public Bitmonero::WalletListener class WalletListenerImpl : public Monero::WalletListener
{ {
public: public:
WalletListenerImpl(Wallet * w) WalletListenerImpl(Wallet * w)
@ -226,9 +226,9 @@ PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QSt
quint64 amount, quint32 mixin_count, quint64 amount, quint32 mixin_count,
PendingTransaction::Priority priority) PendingTransaction::Priority priority)
{ {
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
dst_addr.toStdString(), payment_id.toStdString(), amount, mixin_count, dst_addr.toStdString(), payment_id.toStdString(), amount, mixin_count,
static_cast<Bitmonero::PendingTransaction::Priority>(priority)); static_cast<Monero::PendingTransaction::Priority>(priority));
PendingTransaction * result = new PendingTransaction(ptImpl,0); PendingTransaction * result = new PendingTransaction(ptImpl,0);
return result; return result;
} }
@ -252,9 +252,9 @@ void Wallet::createTransactionAsync(const QString &dst_addr, const QString &paym
PendingTransaction *Wallet::createTransactionAll(const QString &dst_addr, const QString &payment_id, PendingTransaction *Wallet::createTransactionAll(const QString &dst_addr, const QString &payment_id,
quint32 mixin_count, PendingTransaction::Priority priority) quint32 mixin_count, PendingTransaction::Priority priority)
{ {
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction( Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
dst_addr.toStdString(), payment_id.toStdString(), Bitmonero::optional<uint64_t>(), mixin_count, dst_addr.toStdString(), payment_id.toStdString(), Monero::optional<uint64_t>(), mixin_count,
static_cast<Bitmonero::PendingTransaction::Priority>(priority)); static_cast<Monero::PendingTransaction::Priority>(priority));
PendingTransaction * result = new PendingTransaction(ptImpl, this); PendingTransaction * result = new PendingTransaction(ptImpl, this);
return result; return result;
} }
@ -277,7 +277,7 @@ void Wallet::createTransactionAllAsync(const QString &dst_addr, const QString &p
PendingTransaction *Wallet::createSweepUnmixableTransaction() PendingTransaction *Wallet::createSweepUnmixableTransaction()
{ {
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction(); Monero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction();
PendingTransaction * result = new PendingTransaction(ptImpl, this); PendingTransaction * result = new PendingTransaction(ptImpl, this);
return result; return result;
} }
@ -322,7 +322,7 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const
QString Wallet::generatePaymentId() const QString Wallet::generatePaymentId() const
{ {
return QString::fromStdString(Bitmonero::Wallet::genPaymentId()); return QString::fromStdString(Monero::Wallet::genPaymentId());
} }
QString Wallet::integratedAddress(const QString &paymentId) const QString Wallet::integratedAddress(const QString &paymentId) const
@ -427,7 +427,7 @@ bool Wallet::verifySignedMessage(const QString &message, const QString &address,
} }
} }
Wallet::Wallet(Bitmonero::Wallet *w, QObject *parent) Wallet::Wallet(Monero::Wallet *w, QObject *parent)
: QObject(parent) : QObject(parent)
, m_walletImpl(w) , m_walletImpl(w)
, m_history(nullptr) , m_history(nullptr)
@ -452,5 +452,5 @@ Wallet::~Wallet()
{ {
qDebug("~Wallet: Closing wallet"); qDebug("~Wallet: Closing wallet");
delete m_history; delete m_history;
Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl); Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
} }

View File

@ -4,10 +4,10 @@
#include <QObject> #include <QObject>
#include <QTime> #include <QTime>
#include "wallet/wallet2_api.h" // we need to have an access to the Bitmonero::Wallet::Status enum here; #include "wallet/wallet2_api.h" // we need to have an access to the Monero::Wallet::Status enum here;
#include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here; #include "PendingTransaction.h" // we need to have an access to the PendingTransaction::Priority enum here;
namespace Bitmonero { namespace Monero {
class Wallet; // forward declaration class Wallet; // forward declaration
} }
@ -37,16 +37,16 @@ public:
enum Status { enum Status {
Status_Ok = Bitmonero::Wallet::Status_Ok, Status_Ok = Monero::Wallet::Status_Ok,
Status_Error = Bitmonero::Wallet::Status_Error Status_Error = Monero::Wallet::Status_Error
}; };
Q_ENUM(Status) Q_ENUM(Status)
enum ConnectionStatus { enum ConnectionStatus {
ConnectionStatus_Connected = Bitmonero::Wallet::ConnectionStatus_Connected, ConnectionStatus_Connected = Monero::Wallet::ConnectionStatus_Connected,
ConnectionStatus_Disconnected = Bitmonero::Wallet::ConnectionStatus_Disconnected, ConnectionStatus_Disconnected = Monero::Wallet::ConnectionStatus_Disconnected,
ConnectionStatus_WrongVersion = Bitmonero::Wallet::ConnectionStatus_WrongVersion ConnectionStatus_WrongVersion = Monero::Wallet::ConnectionStatus_WrongVersion
}; };
Q_ENUM(ConnectionStatus) Q_ENUM(ConnectionStatus)
@ -204,13 +204,13 @@ signals:
private: private:
Wallet(QObject * parent = nullptr); Wallet(QObject * parent = nullptr);
Wallet(Bitmonero::Wallet *w, QObject * parent = 0); Wallet(Monero::Wallet *w, QObject * parent = 0);
~Wallet(); ~Wallet();
private: private:
friend class WalletManager; friend class WalletManager;
friend class WalletListenerImpl; friend class WalletListenerImpl;
//! libwallet's //! libwallet's
Bitmonero::Wallet * m_walletImpl; Monero::Wallet * m_walletImpl;
// history lifetime managed by wallet; // history lifetime managed by wallet;
TransactionHistory * m_history; TransactionHistory * m_history;
// Used for UI history view // Used for UI history view

View File

@ -23,7 +23,7 @@ WalletManager *WalletManager::instance()
Wallet *WalletManager::createWallet(const QString &path, const QString &password, Wallet *WalletManager::createWallet(const QString &path, const QString &password,
const QString &language, bool testnet) const QString &language, bool testnet)
{ {
Bitmonero::Wallet * w = m_pimpl->createWallet(path.toStdString(), password.toStdString(), Monero::Wallet * w = m_pimpl->createWallet(path.toStdString(), password.toStdString(),
language.toStdString(), testnet); language.toStdString(), testnet);
Wallet * wallet = new Wallet(w); Wallet * wallet = new Wallet(w);
return wallet; return wallet;
@ -34,7 +34,7 @@ Wallet *WalletManager::openWallet(const QString &path, const QString &password,
qDebug("%s: opening wallet at %s, testnet = %d ", qDebug("%s: opening wallet at %s, testnet = %d ",
__PRETTY_FUNCTION__, qPrintable(path), testnet); __PRETTY_FUNCTION__, qPrintable(path), testnet);
Bitmonero::Wallet * w = m_pimpl->openWallet(path.toStdString(), password.toStdString(), testnet); Monero::Wallet * w = m_pimpl->openWallet(path.toStdString(), password.toStdString(), testnet);
qDebug("%s: opened wallet: %s, status: %d", __PRETTY_FUNCTION__, w->address().c_str(), w->status()); qDebug("%s: opened wallet: %s, status: %d", __PRETTY_FUNCTION__, w->address().c_str(), w->status());
Wallet * wallet = new Wallet(w); Wallet * wallet = new Wallet(w);
@ -63,7 +63,7 @@ void WalletManager::openWalletAsync(const QString &path, const QString &password
Wallet *WalletManager::recoveryWallet(const QString &path, const QString &memo, bool testnet, quint64 restoreHeight) Wallet *WalletManager::recoveryWallet(const QString &path, const QString &memo, bool testnet, quint64 restoreHeight)
{ {
Bitmonero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), memo.toStdString(), testnet, restoreHeight); Monero::Wallet * w = m_pimpl->recoveryWallet(path.toStdString(), memo.toStdString(), testnet, restoreHeight);
Wallet * wallet = new Wallet(w); Wallet * wallet = new Wallet(w);
return wallet; return wallet;
} }
@ -124,7 +124,7 @@ QString WalletManager::walletLanguage(const QString &locale)
quint64 WalletManager::maximumAllowedAmount() const quint64 WalletManager::maximumAllowedAmount() const
{ {
return Bitmonero::Wallet::maximumAllowedAmount(); return Monero::Wallet::maximumAllowedAmount();
} }
QString WalletManager::maximumAllowedAmountAsSting() const QString WalletManager::maximumAllowedAmountAsSting() const
@ -136,32 +136,32 @@ QString WalletManager::maximumAllowedAmountAsSting() const
QString WalletManager::displayAmount(quint64 amount) const QString WalletManager::displayAmount(quint64 amount) const
{ {
return QString::fromStdString(Bitmonero::Wallet::displayAmount(amount)); return QString::fromStdString(Monero::Wallet::displayAmount(amount));
} }
quint64 WalletManager::amountFromString(const QString &amount) const quint64 WalletManager::amountFromString(const QString &amount) const
{ {
return Bitmonero::Wallet::amountFromString(amount.toStdString()); return Monero::Wallet::amountFromString(amount.toStdString());
} }
quint64 WalletManager::amountFromDouble(double amount) const quint64 WalletManager::amountFromDouble(double amount) const
{ {
return Bitmonero::Wallet::amountFromDouble(amount); return Monero::Wallet::amountFromDouble(amount);
} }
bool WalletManager::paymentIdValid(const QString &payment_id) const bool WalletManager::paymentIdValid(const QString &payment_id) const
{ {
return Bitmonero::Wallet::paymentIdValid(payment_id.toStdString()); return Monero::Wallet::paymentIdValid(payment_id.toStdString());
} }
bool WalletManager::addressValid(const QString &address, bool testnet) const bool WalletManager::addressValid(const QString &address, bool testnet) const
{ {
return Bitmonero::Wallet::addressValid(address.toStdString(), testnet); return Monero::Wallet::addressValid(address.toStdString(), testnet);
} }
QString WalletManager::paymentIdFromAddress(const QString &address, bool testnet) const QString WalletManager::paymentIdFromAddress(const QString &address, bool testnet) const
{ {
return QString::fromStdString(Bitmonero::Wallet::paymentIdFromAddress(address.toStdString(), testnet)); return QString::fromStdString(Monero::Wallet::paymentIdFromAddress(address.toStdString(), testnet));
} }
QString WalletManager::checkPayment(const QString &address, const QString &txid, const QString &txkey, const QString &daemon_address) const QString WalletManager::checkPayment(const QString &address, const QString &txid, const QString &txkey, const QString &daemon_address) const
@ -206,7 +206,7 @@ double WalletManager::miningHashRate() const
void WalletManager::setLogLevel(int logLevel) void WalletManager::setLogLevel(int logLevel)
{ {
Bitmonero::WalletManagerFactory::setLogLevel(logLevel); Monero::WalletManagerFactory::setLogLevel(logLevel);
} }
QString WalletManager::urlToLocalPath(const QUrl &url) const QString WalletManager::urlToLocalPath(const QUrl &url) const
@ -221,5 +221,5 @@ QUrl WalletManager::localPathToUrl(const QString &path) const
WalletManager::WalletManager(QObject *parent) : QObject(parent) WalletManager::WalletManager(QObject *parent) : QObject(parent)
{ {
m_pimpl = Bitmonero::WalletManagerFactory::getWalletManager(); m_pimpl = Monero::WalletManagerFactory::getWalletManager();
} }

View File

@ -6,7 +6,7 @@
#include <wallet/wallet2_api.h> #include <wallet/wallet2_api.h>
class Wallet; class Wallet;
namespace Bitmonero { namespace Monero {
class WalletManager; class WalletManager;
} }
@ -17,14 +17,14 @@ class WalletManager : public QObject
public: public:
enum LogLevel { enum LogLevel {
LogLevel_Silent = Bitmonero::WalletManagerFactory::LogLevel_Silent, LogLevel_Silent = Monero::WalletManagerFactory::LogLevel_Silent,
LogLevel_0 = Bitmonero::WalletManagerFactory::LogLevel_0, LogLevel_0 = Monero::WalletManagerFactory::LogLevel_0,
LogLevel_1 = Bitmonero::WalletManagerFactory::LogLevel_1, LogLevel_1 = Monero::WalletManagerFactory::LogLevel_1,
LogLevel_2 = Bitmonero::WalletManagerFactory::LogLevel_2, LogLevel_2 = Monero::WalletManagerFactory::LogLevel_2,
LogLevel_3 = Bitmonero::WalletManagerFactory::LogLevel_3, LogLevel_3 = Monero::WalletManagerFactory::LogLevel_3,
LogLevel_4 = Bitmonero::WalletManagerFactory::LogLevel_4, LogLevel_4 = Monero::WalletManagerFactory::LogLevel_4,
LogLevel_Min = Bitmonero::WalletManagerFactory::LogLevel_Min, LogLevel_Min = Monero::WalletManagerFactory::LogLevel_Min,
LogLevel_Max = Bitmonero::WalletManagerFactory::LogLevel_Max, LogLevel_Max = Monero::WalletManagerFactory::LogLevel_Max,
}; };
static WalletManager * instance(); static WalletManager * instance();
@ -124,7 +124,7 @@ private:
explicit WalletManager(QObject *parent = 0); explicit WalletManager(QObject *parent = 0);
static WalletManager * m_instance; static WalletManager * m_instance;
Bitmonero::WalletManager * m_pimpl; Monero::WalletManager * m_pimpl;
}; };