mirror of
https://github.com/monero-project/monero-gui.git
synced 2026-04-18 21:27:25 -04:00
Wallet: implement 'Connecting' status, add 'disconnected' property
This commit is contained in:
@@ -60,6 +60,7 @@ class SubaddressAccountModel;
|
||||
class Wallet : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool disconnected READ disconnected NOTIFY disconnectedChanged)
|
||||
Q_PROPERTY(QString seed READ getSeed)
|
||||
Q_PROPERTY(QString seedLanguage READ getSeedLanguage)
|
||||
Q_PROPERTY(Status status READ status)
|
||||
@@ -100,7 +101,8 @@ public:
|
||||
enum ConnectionStatus {
|
||||
ConnectionStatus_Connected = Monero::Wallet::ConnectionStatus_Connected,
|
||||
ConnectionStatus_Disconnected = Monero::Wallet::ConnectionStatus_Disconnected,
|
||||
ConnectionStatus_WrongVersion = Monero::Wallet::ConnectionStatus_WrongVersion
|
||||
ConnectionStatus_WrongVersion = Monero::Wallet::ConnectionStatus_WrongVersion,
|
||||
ConnectionStatus_Connecting
|
||||
};
|
||||
|
||||
Q_ENUM(ConnectionStatus)
|
||||
@@ -368,6 +370,7 @@ signals:
|
||||
|
||||
void connectionStatusChanged(int status) const;
|
||||
void currentSubaddressAccountChanged() const;
|
||||
void disconnectedChanged() const;
|
||||
|
||||
private:
|
||||
Wallet(QObject * parent = nullptr);
|
||||
@@ -387,6 +390,9 @@ private:
|
||||
//! initializes wallet
|
||||
bool init(const QString &daemonAddress, bool trustedDaemon, quint64 upperTransactionLimit, bool isRecovering, bool isRecoveringFromDevice, quint64 restoreHeight);
|
||||
|
||||
bool disconnected() const;
|
||||
void setConnectionStatus(ConnectionStatus value);
|
||||
|
||||
private:
|
||||
friend class WalletManager;
|
||||
friend class WalletListenerImpl;
|
||||
@@ -409,6 +415,7 @@ private:
|
||||
mutable ConnectionStatus m_connectionStatus;
|
||||
int m_connectionStatusTtl;
|
||||
mutable QTime m_connectionStatusTime;
|
||||
bool m_disconnected;
|
||||
mutable bool m_initialized;
|
||||
uint32_t m_currentSubaddressAccount;
|
||||
Subaddress * m_subaddress;
|
||||
|
||||
Reference in New Issue
Block a user