7 class AddressTableModel;
8 class TransactionTableModel;
15 /** Model for Bitcoin network client. */
16 class ClientModel : public QObject
20 explicit ClientModel(OptionsModel *optionsModel, QObject *parent = 0);
22 OptionsModel *getOptionsModel();
24 int getNumConnections() const;
25 int getNumBlocks() const;
26 int getNumBlocksAtStartup();
28 QDateTime getLastBlockDate() const;
30 //! Return true if client connected to testnet
31 bool isTestNet() const;
32 //! Return true if core is doing initial block download
33 bool inInitialBlockDownload() const;
34 //! Return conservative estimate of total number of blocks, or 0 if unknown
35 int getNumBlocksOfPeers() const;
36 //! Return warnings to be displayed in status bar
37 QString getStatusBarWarnings() const;
39 QString formatFullVersion() const;
42 OptionsModel *optionsModel;
44 int cachedNumConnections;
47 int numBlocksAtStartup;
50 void numConnectionsChanged(int count);
51 void numBlocksChanged(int count);
53 //! Asynchronous error notification
54 void error(const QString &title, const QString &message);
62 #endif // CLIENTMODEL_H