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;
37 QString formatFullVersion() const;
40 OptionsModel *optionsModel;
42 int cachedNumConnections;
45 int numBlocksAtStartup;
48 void numConnectionsChanged(int count);
49 void numBlocksChanged(int count);
51 // Asynchronous error notification
52 void error(const QString &title, const QString &message);
60 #endif // CLIENTMODEL_H