mirror of
https://github.com/monero-project/monero-gui.git
synced 2024-11-17 00:07:51 +00:00
commit
8cdad2fc66
10 changed files with 59 additions and 59 deletions
|
@ -47,7 +47,7 @@ quint64 PendingTransaction::txCount() const
|
|||
return m_pimpl->txCount();
|
||||
}
|
||||
|
||||
PendingTransaction::PendingTransaction(Bitmonero::PendingTransaction *pt, QObject *parent)
|
||||
PendingTransaction::PendingTransaction(Monero::PendingTransaction *pt, QObject *parent)
|
||||
: QObject(parent), m_pimpl(pt)
|
||||
{
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <wallet/wallet2_api.h>
|
||||
|
||||
//namespace Bitmonero {
|
||||
//namespace Monero {
|
||||
//class PendingTransaction;
|
||||
//}
|
||||
|
||||
|
@ -22,15 +22,15 @@ class PendingTransaction : public QObject
|
|||
|
||||
public:
|
||||
enum Status {
|
||||
Status_Ok = Bitmonero::PendingTransaction::Status_Ok,
|
||||
Status_Error = Bitmonero::PendingTransaction::Status_Error
|
||||
Status_Ok = Monero::PendingTransaction::Status_Ok,
|
||||
Status_Error = Monero::PendingTransaction::Status_Error
|
||||
};
|
||||
Q_ENUM(Status)
|
||||
|
||||
enum Priority {
|
||||
Priority_Low = Bitmonero::PendingTransaction::Priority_Low,
|
||||
Priority_Medium = Bitmonero::PendingTransaction::Priority_Medium,
|
||||
Priority_High = Bitmonero::PendingTransaction::Priority_High
|
||||
Priority_Low = Monero::PendingTransaction::Priority_Low,
|
||||
Priority_Medium = Monero::PendingTransaction::Priority_Medium,
|
||||
Priority_High = Monero::PendingTransaction::Priority_High
|
||||
};
|
||||
Q_ENUM(Priority)
|
||||
|
||||
|
@ -45,11 +45,11 @@ public:
|
|||
quint64 txCount() const;
|
||||
|
||||
private:
|
||||
explicit PendingTransaction(Bitmonero::PendingTransaction * pt, QObject *parent = 0);
|
||||
explicit PendingTransaction(Monero::PendingTransaction * pt, QObject *parent = 0);
|
||||
|
||||
private:
|
||||
friend class Wallet;
|
||||
Bitmonero::PendingTransaction * m_pimpl;
|
||||
Monero::PendingTransaction * m_pimpl;
|
||||
};
|
||||
|
||||
#endif // PENDINGTRANSACTION_H
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
m_firstDateTime = QDateTime(QDate(2014, 4, 18)); // the genesis block
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include <QList>
|
||||
#include <QDateTime>
|
||||
|
||||
namespace Bitmonero {
|
||||
namespace Monero {
|
||||
class TransactionHistory;
|
||||
}
|
||||
|
||||
|
@ -37,11 +37,11 @@ public slots:
|
|||
|
||||
|
||||
private:
|
||||
explicit TransactionHistory(Bitmonero::TransactionHistory * pimpl, QObject *parent = 0);
|
||||
explicit TransactionHistory(Monero::TransactionHistory * pimpl, QObject *parent = 0);
|
||||
|
||||
private:
|
||||
friend class Wallet;
|
||||
Bitmonero::TransactionHistory * m_pimpl;
|
||||
Monero::TransactionHistory * m_pimpl;
|
||||
mutable QList<TransactionInfo*> m_tinfo;
|
||||
mutable QDateTime m_firstDateTime;
|
||||
mutable QDateTime m_lastDateTime;
|
||||
|
|
|
@ -97,7 +97,7 @@ QList<Transfer*> TransactionInfo::transfers() const
|
|||
return m_transfers;
|
||||
}
|
||||
|
||||
TransactionInfo::TransactionInfo(Bitmonero::TransactionInfo *pimpl, QObject *parent)
|
||||
TransactionInfo::TransactionInfo(Monero::TransactionInfo *pimpl, QObject *parent)
|
||||
: QObject(parent), m_pimpl(pimpl)
|
||||
{
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ class TransactionInfo : public QObject
|
|||
|
||||
public:
|
||||
enum Direction {
|
||||
Direction_In = Bitmonero::TransactionInfo::Direction_In,
|
||||
Direction_Out = Bitmonero::TransactionInfo::Direction_Out,
|
||||
Direction_In = Monero::TransactionInfo::Direction_In,
|
||||
Direction_Out = Monero::TransactionInfo::Direction_Out,
|
||||
Direction_Both // invalid direction value, used for filtering
|
||||
};
|
||||
|
||||
|
@ -54,10 +54,10 @@ public:
|
|||
//! Could be useful later when addressbook is implemented
|
||||
Q_INVOKABLE QList<Transfer*> transfers() const;
|
||||
private:
|
||||
explicit TransactionInfo(Bitmonero::TransactionInfo * pimpl, QObject *parent = 0);
|
||||
explicit TransactionInfo(Monero::TransactionInfo * pimpl, QObject *parent = 0);
|
||||
private:
|
||||
friend class TransactionHistory;
|
||||
Bitmonero::TransactionInfo * m_pimpl;
|
||||
Monero::TransactionInfo * m_pimpl;
|
||||
mutable QList<Transfer*> m_transfers;
|
||||
};
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ namespace {
|
|||
static const int WALLET_CONNECTION_STATUS_CACHE_TTL_SECONDS = 5;
|
||||
}
|
||||
|
||||
class WalletListenerImpl : public Bitmonero::WalletListener
|
||||
class WalletListenerImpl : public Monero::WalletListener
|
||||
{
|
||||
public:
|
||||
WalletListenerImpl(Wallet * w)
|
||||
|
@ -226,9 +226,9 @@ PendingTransaction *Wallet::createTransaction(const QString &dst_addr, const QSt
|
|||
quint64 amount, quint32 mixin_count,
|
||||
PendingTransaction::Priority priority)
|
||||
{
|
||||
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
|
||||
Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
|
||||
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);
|
||||
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,
|
||||
quint32 mixin_count, PendingTransaction::Priority priority)
|
||||
{
|
||||
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
|
||||
dst_addr.toStdString(), payment_id.toStdString(), Bitmonero::optional<uint64_t>(), mixin_count,
|
||||
static_cast<Bitmonero::PendingTransaction::Priority>(priority));
|
||||
Monero::PendingTransaction * ptImpl = m_walletImpl->createTransaction(
|
||||
dst_addr.toStdString(), payment_id.toStdString(), Monero::optional<uint64_t>(), mixin_count,
|
||||
static_cast<Monero::PendingTransaction::Priority>(priority));
|
||||
PendingTransaction * result = new PendingTransaction(ptImpl, this);
|
||||
return result;
|
||||
}
|
||||
|
@ -277,7 +277,7 @@ void Wallet::createTransactionAllAsync(const QString &dst_addr, const QString &p
|
|||
|
||||
PendingTransaction *Wallet::createSweepUnmixableTransaction()
|
||||
{
|
||||
Bitmonero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction();
|
||||
Monero::PendingTransaction * ptImpl = m_walletImpl->createSweepUnmixableTransaction();
|
||||
PendingTransaction * result = new PendingTransaction(ptImpl, this);
|
||||
return result;
|
||||
}
|
||||
|
@ -322,7 +322,7 @@ TransactionHistorySortFilterModel *Wallet::historyModel() const
|
|||
|
||||
QString Wallet::generatePaymentId() const
|
||||
{
|
||||
return QString::fromStdString(Bitmonero::Wallet::genPaymentId());
|
||||
return QString::fromStdString(Monero::Wallet::genPaymentId());
|
||||
}
|
||||
|
||||
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)
|
||||
, m_walletImpl(w)
|
||||
, m_history(nullptr)
|
||||
|
@ -452,5 +452,5 @@ Wallet::~Wallet()
|
|||
{
|
||||
qDebug("~Wallet: Closing wallet");
|
||||
delete m_history;
|
||||
Bitmonero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
||||
Monero::WalletManagerFactory::getWalletManager()->closeWallet(m_walletImpl);
|
||||
}
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
#include <QObject>
|
||||
#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;
|
||||
|
||||
namespace Bitmonero {
|
||||
namespace Monero {
|
||||
class Wallet; // forward declaration
|
||||
}
|
||||
|
||||
|
@ -37,16 +37,16 @@ public:
|
|||
|
||||
|
||||
enum Status {
|
||||
Status_Ok = Bitmonero::Wallet::Status_Ok,
|
||||
Status_Error = Bitmonero::Wallet::Status_Error
|
||||
Status_Ok = Monero::Wallet::Status_Ok,
|
||||
Status_Error = Monero::Wallet::Status_Error
|
||||
};
|
||||
|
||||
Q_ENUM(Status)
|
||||
|
||||
enum ConnectionStatus {
|
||||
ConnectionStatus_Connected = Bitmonero::Wallet::ConnectionStatus_Connected,
|
||||
ConnectionStatus_Disconnected = Bitmonero::Wallet::ConnectionStatus_Disconnected,
|
||||
ConnectionStatus_WrongVersion = Bitmonero::Wallet::ConnectionStatus_WrongVersion
|
||||
ConnectionStatus_Connected = Monero::Wallet::ConnectionStatus_Connected,
|
||||
ConnectionStatus_Disconnected = Monero::Wallet::ConnectionStatus_Disconnected,
|
||||
ConnectionStatus_WrongVersion = Monero::Wallet::ConnectionStatus_WrongVersion
|
||||
};
|
||||
|
||||
Q_ENUM(ConnectionStatus)
|
||||
|
@ -204,13 +204,13 @@ signals:
|
|||
|
||||
private:
|
||||
Wallet(QObject * parent = nullptr);
|
||||
Wallet(Bitmonero::Wallet *w, QObject * parent = 0);
|
||||
Wallet(Monero::Wallet *w, QObject * parent = 0);
|
||||
~Wallet();
|
||||
private:
|
||||
friend class WalletManager;
|
||||
friend class WalletListenerImpl;
|
||||
//! libwallet's
|
||||
Bitmonero::Wallet * m_walletImpl;
|
||||
Monero::Wallet * m_walletImpl;
|
||||
// history lifetime managed by wallet;
|
||||
TransactionHistory * m_history;
|
||||
// Used for UI history view
|
||||
|
|
|
@ -23,7 +23,7 @@ WalletManager *WalletManager::instance()
|
|||
Wallet *WalletManager::createWallet(const QString &path, const QString &password,
|
||||
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);
|
||||
Wallet * wallet = new Wallet(w);
|
||||
return wallet;
|
||||
|
@ -34,7 +34,7 @@ Wallet *WalletManager::openWallet(const QString &path, const QString &password,
|
|||
qDebug("%s: opening wallet at %s, testnet = %d ",
|
||||
__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());
|
||||
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)
|
||||
{
|
||||
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);
|
||||
return wallet;
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ QString WalletManager::walletLanguage(const QString &locale)
|
|||
|
||||
quint64 WalletManager::maximumAllowedAmount() const
|
||||
{
|
||||
return Bitmonero::Wallet::maximumAllowedAmount();
|
||||
return Monero::Wallet::maximumAllowedAmount();
|
||||
}
|
||||
|
||||
QString WalletManager::maximumAllowedAmountAsSting() const
|
||||
|
@ -136,32 +136,32 @@ QString WalletManager::maximumAllowedAmountAsSting() 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
|
||||
{
|
||||
return Bitmonero::Wallet::amountFromString(amount.toStdString());
|
||||
return Monero::Wallet::amountFromString(amount.toStdString());
|
||||
}
|
||||
|
||||
quint64 WalletManager::amountFromDouble(double amount) const
|
||||
{
|
||||
return Bitmonero::Wallet::amountFromDouble(amount);
|
||||
return Monero::Wallet::amountFromDouble(amount);
|
||||
}
|
||||
|
||||
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
|
||||
{
|
||||
return Bitmonero::Wallet::addressValid(address.toStdString(), testnet);
|
||||
return Monero::Wallet::addressValid(address.toStdString(), testnet);
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -206,7 +206,7 @@ double WalletManager::miningHashRate() const
|
|||
|
||||
void WalletManager::setLogLevel(int logLevel)
|
||||
{
|
||||
Bitmonero::WalletManagerFactory::setLogLevel(logLevel);
|
||||
Monero::WalletManagerFactory::setLogLevel(logLevel);
|
||||
}
|
||||
|
||||
QString WalletManager::urlToLocalPath(const QUrl &url) const
|
||||
|
@ -221,5 +221,5 @@ QUrl WalletManager::localPathToUrl(const QString &path) const
|
|||
|
||||
WalletManager::WalletManager(QObject *parent) : QObject(parent)
|
||||
{
|
||||
m_pimpl = Bitmonero::WalletManagerFactory::getWalletManager();
|
||||
m_pimpl = Monero::WalletManagerFactory::getWalletManager();
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <wallet/wallet2_api.h>
|
||||
|
||||
class Wallet;
|
||||
namespace Bitmonero {
|
||||
namespace Monero {
|
||||
class WalletManager;
|
||||
}
|
||||
|
||||
|
@ -17,14 +17,14 @@ class WalletManager : public QObject
|
|||
|
||||
public:
|
||||
enum LogLevel {
|
||||
LogLevel_Silent = Bitmonero::WalletManagerFactory::LogLevel_Silent,
|
||||
LogLevel_0 = Bitmonero::WalletManagerFactory::LogLevel_0,
|
||||
LogLevel_1 = Bitmonero::WalletManagerFactory::LogLevel_1,
|
||||
LogLevel_2 = Bitmonero::WalletManagerFactory::LogLevel_2,
|
||||
LogLevel_3 = Bitmonero::WalletManagerFactory::LogLevel_3,
|
||||
LogLevel_4 = Bitmonero::WalletManagerFactory::LogLevel_4,
|
||||
LogLevel_Min = Bitmonero::WalletManagerFactory::LogLevel_Min,
|
||||
LogLevel_Max = Bitmonero::WalletManagerFactory::LogLevel_Max,
|
||||
LogLevel_Silent = Monero::WalletManagerFactory::LogLevel_Silent,
|
||||
LogLevel_0 = Monero::WalletManagerFactory::LogLevel_0,
|
||||
LogLevel_1 = Monero::WalletManagerFactory::LogLevel_1,
|
||||
LogLevel_2 = Monero::WalletManagerFactory::LogLevel_2,
|
||||
LogLevel_3 = Monero::WalletManagerFactory::LogLevel_3,
|
||||
LogLevel_4 = Monero::WalletManagerFactory::LogLevel_4,
|
||||
LogLevel_Min = Monero::WalletManagerFactory::LogLevel_Min,
|
||||
LogLevel_Max = Monero::WalletManagerFactory::LogLevel_Max,
|
||||
};
|
||||
|
||||
static WalletManager * instance();
|
||||
|
@ -124,7 +124,7 @@ private:
|
|||
|
||||
explicit WalletManager(QObject *parent = 0);
|
||||
static WalletManager * m_instance;
|
||||
Bitmonero::WalletManager * m_pimpl;
|
||||
Monero::WalletManager * m_pimpl;
|
||||
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue