Make it very clear when on testnet (green icon, add [testnet] to title)
[novacoin.git] / src / qt / clientmodel.h
1 #ifndef CLIENTMODEL_H
2 #define CLIENTMODEL_H
3
4 #include <QObject>
5
6 class OptionsModel;
7 class AddressTableModel;
8 class TransactionTableModel;
9 class CWallet;
10
11 // Interface to Bitcoin network client
12 class ClientModel : public QObject
13 {
14     Q_OBJECT
15 public:
16     // The only reason that this constructor takes a wallet is because
17     // the global client settings are stored in the main wallet.
18     explicit ClientModel(CWallet *wallet, QObject *parent = 0);
19
20     OptionsModel *getOptionsModel();
21
22     int getNumConnections() const;
23     int getNumBlocks() const;
24
25     // Return true if client connected to testnet
26     bool isTestNet() const;
27     // Return true if core is doing initial block download
28     bool inInitialBlockDownload() const;
29     // Return conservative estimate of total number of blocks, or 0 if unknown
30     int getTotalBlocksEstimate() const;
31
32 private:
33     CWallet *wallet;
34
35     OptionsModel *optionsModel;
36
37 signals:
38     void numConnectionsChanged(int count);
39     void numBlocksChanged(int count);
40
41     // Asynchronous error notification
42     void error(const QString &title, const QString &message);
43
44 public slots:
45
46 private slots:
47     void update();
48 };
49
50 #endif // CLIENTMODEL_H