"Receive coins" instead of "Receiving addresses"
[novacoin.git] / src / qt / bitcoingui.h
1 #ifndef BITCOINGUI_H
2 #define BITCOINGUI_H
3
4 #include <QMainWindow>
5 #include <QSystemTrayIcon>
6
7 class TransactionTableModel;
8 class ClientModel;
9 class WalletModel;
10 class TransactionView;
11
12 QT_BEGIN_NAMESPACE
13 class QLabel;
14 class QLineEdit;
15 class QTableView;
16 class QAbstractItemModel;
17 class QModelIndex;
18 class QProgressBar;
19 QT_END_NAMESPACE
20
21 class BitcoinGUI : public QMainWindow
22 {
23     Q_OBJECT
24 public:
25     explicit BitcoinGUI(QWidget *parent = 0);
26     void setClientModel(ClientModel *clientModel);
27     void setWalletModel(WalletModel *walletModel);
28     
29     /* Transaction table tab indices */
30     enum {
31         AllTransactions = 0,
32         SentReceived = 1,
33         Sent = 2,
34         Received = 3
35     } TabIndex;
36
37 protected:
38     void changeEvent(QEvent *e);
39     void closeEvent(QCloseEvent *event);
40
41 private:
42     ClientModel *clientModel;
43     WalletModel *walletModel;
44
45     QLabel *labelBalance;
46     QLabel *labelConnections;
47     QLabel *labelConnectionsIcon;
48     QLabel *labelBlocks;
49     QLabel *labelTransactions;
50     QLabel *progressBarLabel;
51     QProgressBar *progressBar;
52
53     QAction *quit;
54     QAction *sendCoins;
55     QAction *addressbook;
56     QAction *about;
57     QAction *receiveCoins;
58     QAction *options;
59     QAction *openBitcoin;
60
61     QSystemTrayIcon *trayIcon;
62     TransactionView *transactionView;
63
64     void createActions();
65     QWidget *createTabs();
66     void createTrayIcon();
67
68 public slots:
69     void setBalance(qint64 balance);
70     void setNumConnections(int count);
71     void setNumBlocks(int count);
72     void setNumTransactions(int count);
73     void error(const QString &title, const QString &message);
74     /* It is currently not possible to pass a return value to another thread through
75        BlockingQueuedConnection, so use an indirected pointer.
76        http://bugreports.qt.nokia.com/browse/QTBUG-10440
77     */
78     void askFee(qint64 nFeeRequired, bool *payFee);
79
80 private slots:
81     void sendCoinsClicked();
82     void addressbookClicked();
83     void optionsClicked();
84     void receiveCoinsClicked();
85     void aboutClicked();
86     void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
87     void transactionDetails(const QModelIndex& idx);
88     void incomingTransaction(const QModelIndex & parent, int start, int end);
89 };
90
91 #endif