Add removeaddress RPC call
[novacoin.git] / src / qt / walletmodel.h
index f155006..f00ce70 100644 (file)
@@ -10,6 +10,7 @@
 class OptionsModel;
 class AddressTableModel;
 class TransactionTableModel;
+class MintingTableModel;
 class CWallet;
 class CKeyID;
 class CPubKey;
@@ -61,8 +62,10 @@ public:
 
     OptionsModel *getOptionsModel();
     AddressTableModel *getAddressTableModel();
+    MintingTableModel *getMintingTableModel();
     TransactionTableModel *getTransactionTableModel();
 
+    bool haveWatchOnly() const;
     qint64 getBalance() const;
     qint64 getBalanceWatchOnly() const;
     qint64 getStake() const;
@@ -100,8 +103,8 @@ public:
     bool dumpWallet(const QString &filename);
     bool importWallet(const QString &filename);
 
-    void getStakeWeight(quint64& nMinWeight, quint64& nMaxWeight, quint64& nWeight);
-    void getStakeWeightFromValue(const qint64& nTime, const qint64& nValue, quint64& nWeight);
+    void getStakeStats(float &nKernelsRate, float &nCoinDaysRate);
+    void getStakeWeightFromValue(const int64_t& nTime, const int64_t& nValue, uint64_t& nWeight);
 
     // RAI object for unlocking wallet, returned by requestUnlock()
     class UnlockContext
@@ -132,15 +135,19 @@ public:
     void lockCoin(COutPoint& output);
     void unlockCoin(COutPoint& output);
     void listLockedCoins(std::vector<COutPoint>& vOutpts);
+    void clearOrphans();
+    CWallet* getWallet();
 
 private:
     CWallet *wallet;
+    bool fHaveWatchOnly;
 
     // Wallet has an options model for wallet-specific options
     // (transaction fee, for example)
     OptionsModel *optionsModel;
 
     AddressTableModel *addressTableModel;
+    MintingTableModel *mintingTableModel;
     TransactionTableModel *transactionTableModel;
 
     // Cache some values to be able to detect changes
@@ -158,7 +165,6 @@ private:
     void unsubscribeFromCoreSignals();
     void checkBalanceChanged();
 
-
 public slots:
     /* Wallet status might have changed */
     void updateStatus();
@@ -166,6 +172,8 @@ public slots:
     void updateTransaction(const QString &hash, int status);
     /* New, updated or removed address book entry */
     void updateAddressBook(const QString &address, const QString &label, bool isMine, int status);
+    /* Watchonly added */
+    void updateWatchOnlyFlag(bool fHaveWatchonly);
     /* Current, immature or unconfirmed balance might have changed - emit 'balanceChanged' if so */
     void pollBalanceChanged();
 
@@ -186,6 +194,9 @@ signals:
 
     // Asynchronous error notification
     void error(const QString &title, const QString &message, bool modal);
+
+    // Watch-only address added
+    void notifyWatchonlyChanged(bool fHaveWatchonly);
 };