Merge pull request #224

ab61910 Receive: tx scanner for payments matching setup (moneromooo.monero)
87d0751 libwalletqt: add a few daemon read access routines (moneromooo.monero)
af4e49c MiddlePanel: add an optional onPageClosed callback (moneromooo.monero)
This commit is contained in:
Riccardo Spagni
2016-12-08 23:58:22 +02:00
5 changed files with 189 additions and 1 deletions

View File

@@ -174,6 +174,36 @@ QString WalletManager::checkPayment(const QString &address, const QString &txid,
return QString::fromStdString(result);
}
void WalletManager::setDaemonAddress(const QString &address)
{
m_pimpl->setDaemonAddress(address.toStdString());
}
bool WalletManager::connected() const
{
return m_pimpl->connected();
}
quint64 WalletManager::networkDifficulty() const
{
return m_pimpl->networkDifficulty();
}
quint64 WalletManager::blockchainHeight() const
{
return m_pimpl->blockchainHeight();
}
quint64 WalletManager::blockchainTargetHeight() const
{
return m_pimpl->blockchainTargetHeight();
}
double WalletManager::miningHashRate() const
{
return m_pimpl->miningHashRate();
}
void WalletManager::setLogLevel(int logLevel)
{
Bitmonero::WalletManagerFactory::setLogLevel(logLevel);

View File

@@ -13,6 +13,7 @@ namespace Bitmonero {
class WalletManager : public QObject
{
Q_OBJECT
Q_PROPERTY(bool connected READ connected)
public:
enum LogLevel {
@@ -95,6 +96,13 @@ public:
Q_INVOKABLE QString checkPayment(const QString &address, const QString &txid, const QString &txkey, const QString &daemon_address) const;
Q_INVOKABLE void setDaemonAddress(const QString &address);
Q_INVOKABLE bool connected() const;
Q_INVOKABLE quint64 networkDifficulty() const;
Q_INVOKABLE quint64 blockchainHeight() const;
Q_INVOKABLE quint64 blockchainTargetHeight() const;
Q_INVOKABLE double miningHashRate() const;
// QML missing such functionality, implementing these helpers here
Q_INVOKABLE QString urlToLocalPath(const QUrl &url) const;
Q_INVOKABLE QUrl localPathToUrl(const QString &path) const;