]>
Commit | Line | Data |
---|---|---|
1355cfe1 WL |
1 | #ifndef BITCOINGUI_H |
2 | #define BITCOINGUI_H | |
aaa1c3c4 WL |
3 | |
4 | #include <QMainWindow> | |
3f323a61 WL |
5 | #include <QSystemTrayIcon> |
6 | ||
3f323a61 | 7 | class TransactionTableModel; |
18cab09a | 8 | class ClientModel; |
ef079e18 | 9 | class WalletModel; |
ceb6d4e1 | 10 | class TransactionView; |
4d1bb15e WL |
11 | |
12 | QT_BEGIN_NAMESPACE | |
3f323a61 WL |
13 | class QLabel; |
14 | class QLineEdit; | |
467c31ea WL |
15 | class QTableView; |
16 | class QAbstractItemModel; | |
66d536ed | 17 | class QModelIndex; |
6cab6635 | 18 | class QProgressBar; |
4d1bb15e | 19 | QT_END_NAMESPACE |
aaa1c3c4 WL |
20 | |
21 | class BitcoinGUI : public QMainWindow | |
22 | { | |
23 | Q_OBJECT | |
24 | public: | |
1355cfe1 | 25 | explicit BitcoinGUI(QWidget *parent = 0); |
ef079e18 WL |
26 | void setClientModel(ClientModel *clientModel); |
27 | void setWalletModel(WalletModel *walletModel); | |
aaa1c3c4 WL |
28 | |
29 | /* Transaction table tab indices */ | |
30 | enum { | |
1355cfe1 WL |
31 | AllTransactions = 0, |
32 | SentReceived = 1, | |
33 | Sent = 2, | |
34 | Received = 3 | |
aaa1c3c4 | 35 | } TabIndex; |
352083cb WL |
36 | |
37 | protected: | |
38 | void changeEvent(QEvent *e); | |
39 | void closeEvent(QCloseEvent *event); | |
40 | ||
3f323a61 | 41 | private: |
ef079e18 WL |
42 | ClientModel *clientModel; |
43 | WalletModel *walletModel; | |
3f323a61 | 44 | |
3f323a61 | 45 | QLabel *labelBalance; |
1a6d504a | 46 | QLabel *labelConnections; |
b1ef1b24 | 47 | QLabel *labelConnectionsIcon; |
1a6d504a WL |
48 | QLabel *labelBlocks; |
49 | QLabel *labelTransactions; | |
6cab6635 WL |
50 | QLabel *progressBarLabel; |
51 | QProgressBar *progressBar; | |
3f323a61 WL |
52 | |
53 | QAction *quit; | |
bb82fdb5 | 54 | QAction *sendCoins; |
3f323a61 WL |
55 | QAction *addressbook; |
56 | QAction *about; | |
bb82fdb5 | 57 | QAction *receiveCoins; |
3f323a61 | 58 | QAction *options; |
352083cb | 59 | QAction *openBitcoin; |
3f323a61 WL |
60 | |
61 | QSystemTrayIcon *trayIcon; | |
ceb6d4e1 | 62 | TransactionView *transactionView; |
3f323a61 WL |
63 | |
64 | void createActions(); | |
65 | QWidget *createTabs(); | |
66 | void createTrayIcon(); | |
67 | ||
1a6d504a | 68 | public slots: |
dd8e82f7 | 69 | void setBalance(qint64 balance); |
1a6d504a WL |
70 | void setNumConnections(int count); |
71 | void setNumBlocks(int count); | |
72 | void setNumTransactions(int count); | |
467c31ea | 73 | void error(const QString &title, const QString &message); |
66d536ed WL |
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 | */ | |
b7726d92 | 78 | void askFee(qint64 nFeeRequired, bool *payFee); |
1a6d504a | 79 | |
aaa1c3c4 | 80 | private slots: |
bb82fdb5 | 81 | void sendCoinsClicked(); |
af943776 WL |
82 | void addressbookClicked(); |
83 | void optionsClicked(); | |
bb82fdb5 | 84 | void receiveCoinsClicked(); |
8812ce7b | 85 | void aboutClicked(); |
352083cb | 86 | void trayIconActivated(QSystemTrayIcon::ActivationReason reason); |
66d536ed | 87 | void transactionDetails(const QModelIndex& idx); |
725d460e | 88 | void incomingTransaction(const QModelIndex & parent, int start, int end); |
aaa1c3c4 WL |
89 | }; |
90 | ||
91 | #endif |