zcash-patched-for-explorer/src/qt/bitcoingui.h

121 lines
2.9 KiB
C
Raw Normal View History

2011-05-08 13:23:31 -07:00
#ifndef BITCOINGUI_H
#define BITCOINGUI_H
2011-05-07 13:13:39 -07:00
#include <QMainWindow>
2011-05-12 11:16:42 -07:00
#include <QSystemTrayIcon>
class TransactionTableModel;
class ClientModel;
class WalletModel;
class TransactionView;
class OverviewPage;
2011-07-07 08:33:15 -07:00
class AddressBookPage;
class SendCoinsDialog;
class Notificator;
2011-05-13 13:00:27 -07:00
QT_BEGIN_NAMESPACE
2011-05-12 11:16:42 -07:00
class QLabel;
class QLineEdit;
2011-06-05 07:03:29 -07:00
class QTableView;
class QAbstractItemModel;
class QModelIndex;
class QProgressBar;
class QStackedWidget;
class QUrl;
2011-05-13 13:00:27 -07:00
QT_END_NAMESPACE
2011-05-07 13:13:39 -07:00
class BitcoinGUI : public QMainWindow
{
Q_OBJECT
public:
2011-05-08 13:23:31 -07:00
explicit BitcoinGUI(QWidget *parent = 0);
void setClientModel(ClientModel *clientModel);
void setWalletModel(WalletModel *walletModel);
2011-05-07 13:13:39 -07:00
/* Transaction table tab indices */
enum {
2011-05-08 13:23:31 -07:00
AllTransactions = 0,
SentReceived = 1,
Sent = 2,
Received = 3
2011-05-07 13:13:39 -07:00
} TabIndex;
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
void dragEnterEvent(QDragEnterEvent *event);
void dropEvent(QDropEvent *event);
2011-05-12 11:16:42 -07:00
private:
ClientModel *clientModel;
WalletModel *walletModel;
2011-05-12 11:16:42 -07:00
QStackedWidget *centralWidget;
2011-07-07 08:33:15 -07:00
OverviewPage *overviewPage;
QWidget *transactionsPage;
2011-07-07 08:33:15 -07:00
AddressBookPage *addressBookPage;
AddressBookPage *receiveCoinsPage;
SendCoinsDialog *sendCoinsPage;
QLabel *labelEncryptionIcon;
2011-06-14 12:34:51 -07:00
QLabel *labelConnectionsIcon;
QLabel *labelBlocksIcon;
QLabel *progressBarLabel;
QProgressBar *progressBar;
2011-05-12 11:16:42 -07:00
QAction *overviewAction;
QAction *historyAction;
2011-07-07 08:33:15 -07:00
QAction *quitAction;
QAction *sendCoinsAction;
QAction *addressBookAction;
QAction *aboutAction;
QAction *receiveCoinsAction;
QAction *optionsAction;
QAction *openBitcoinAction;
QAction *exportAction;
QAction *encryptWalletAction;
QAction *changePassphraseAction;
2011-05-12 11:16:42 -07:00
QSystemTrayIcon *trayIcon;
Notificator *notificator;
TransactionView *transactionView;
2011-05-12 11:16:42 -07:00
QMovie *syncIconMovie;
2011-05-12 11:16:42 -07:00
void createActions();
QWidget *createTabs();
void createTrayIcon();
public slots:
void setNumConnections(int count);
void setNumBlocks(int count);
void setEncryptionStatus(int status);
2011-06-05 07:03:29 -07:00
void error(const QString &title, const QString &message);
/* It is currently not possible to pass a return value to another thread through
BlockingQueuedConnection, so use an indirected pointer.
http://bugreports.qt.nokia.com/browse/QTBUG-10440
*/
2011-06-05 08:36:52 -07:00
void askFee(qint64 nFeeRequired, bool *payFee);
2011-05-07 13:13:39 -07:00
private slots:
2011-07-07 08:33:15 -07:00
// UI pages
void gotoOverviewPage();
void gotoHistoryPage();
void gotoAddressBookPage();
void gotoReceiveCoinsPage();
void gotoSendCoinsPage();
// Misc actions
2011-05-10 10:03:10 -07:00
void optionsClicked();
void aboutClicked();
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
void incomingTransaction(const QModelIndex & parent, int start, int end);
void encryptWallet(bool status);
void changePassphrase();
void unlockWallet();
2011-05-07 13:13:39 -07:00
};
#endif