qt: clean up signal handling in walletframe/walletview

Use proper signals everywhere.
Removes the need to store a pointer to the BitcoinGUI object in
the walletview.
Also removes the interdependence between setWalletModel / setBitcoinGUI.
This commit is contained in:
Wladimir J. van der Laan
2013-10-25 16:10:43 +02:00
parent 0d09b3e8b0
commit 7d16bb3874
4 changed files with 37 additions and 43 deletions

View File

@ -55,7 +55,6 @@ public:
void showOutOfSyncWarning(bool fShow);
private:
BitcoinGUI *gui;
ClientModel *clientModel;
WalletModel *walletModel;
@ -85,7 +84,7 @@ public slots:
The new items are those between start and end inclusive, under the given parent item.
*/
void incomingTransaction(const QModelIndex& parent, int start, int /*end*/);
void processNewTransaction(const QModelIndex& parent, int start, int /*end*/);
/** Encrypt the wallet */
void encryptWallet(bool status);
/** Backup the wallet */
@ -100,14 +99,17 @@ public slots:
/** Show used receiving addresses */
void usedReceivingAddresses();
void setEncryptionStatus();
/** Re-emit encryption status signal */
void updateEncryptionStatus();
signals:
/** Signal that we want to show the main window */
void showNormalIfMinimized();
/** Fired when a message should be reported to the user */
void message(const QString &title, const QString &message, unsigned int style);
/** Encryption status of wallet changed */
void encryptionStatusChanged(int status);
/** Notify that a new transaction appeared */
void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
};
#endif // WALLETVIEW_H