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;
27 QDateTime getLastBlockDate() const;
29 // Return true if client connected to testnet
30 bool isTestNet() const;
31 // Return true if core is doing initial block download
32 bool inInitialBlockDownload() const;
33 // Return conservative estimate of total number of blocks, or 0 if unknown
34 int getTotalBlocksEstimate() const;
36 QString formatFullVersion() const;
39 OptionsModel *optionsModel;
41 int cachedNumConnections;
45 void numConnectionsChanged(int count);
46 void numBlocksChanged(int count);
48 // Asynchronous error notification
49 void error(const QString &title, const QString &message);
57 #endif // CLIENTMODEL_H