lbrycrd/gui/include/bitcoingui.h

83 lines
1.8 KiB
C
Raw Normal View History

2011-05-08 22:23:31 +02:00
#ifndef BITCOINGUI_H
#define BITCOINGUI_H
2011-05-07 22:13:39 +02:00
#include <QMainWindow>
2011-05-12 20:16:42 +02:00
#include <QSystemTrayIcon>
/* Forward declarations */
class TransactionTableModel;
class ClientModel;
2011-05-13 22:00:27 +02:00
QT_BEGIN_NAMESPACE
2011-05-12 20:16:42 +02:00
class QLabel;
class QLineEdit;
2011-06-05 16:03:29 +02:00
class QTableView;
class QAbstractItemModel;
2011-05-13 22:00:27 +02:00
QT_END_NAMESPACE
2011-05-07 22:13:39 +02:00
class BitcoinGUI : public QMainWindow
{
Q_OBJECT
public:
2011-05-08 22:23:31 +02:00
explicit BitcoinGUI(QWidget *parent = 0);
void setModel(ClientModel *model);
2011-05-07 22:13:39 +02:00
/* Transaction table tab indices */
enum {
2011-05-08 22:23:31 +02:00
AllTransactions = 0,
SentReceived = 1,
Sent = 2,
Received = 3
2011-05-07 22:13:39 +02:00
} TabIndex;
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
2011-05-12 20:16:42 +02:00
private:
ClientModel *model;
2011-05-12 20:16:42 +02:00
QLineEdit *address;
QLabel *labelBalance;
QLabel *labelConnections;
QLabel *labelBlocks;
QLabel *labelTransactions;
2011-05-12 20:16:42 +02:00
QAction *quit;
QAction *sendcoins;
QAction *addressbook;
QAction *about;
QAction *receivingAddresses;
2011-05-12 20:16:42 +02:00
QAction *options;
QAction *openBitcoin;
2011-05-12 20:16:42 +02:00
QSystemTrayIcon *trayIcon;
2011-06-05 16:03:29 +02:00
QList<QTableView *> transactionViews;
2011-05-12 20:16:42 +02:00
void createActions();
QWidget *createTabs();
void createTrayIcon();
2011-06-05 16:03:29 +02:00
void setTabsModel(QAbstractItemModel *transaction_model);
2011-05-12 20:16:42 +02:00
public slots:
void setBalance(qint64 balance);
2011-05-13 08:30:20 +02:00
void setAddress(const QString &address);
void setNumConnections(int count);
void setNumBlocks(int count);
void setNumTransactions(int count);
2011-06-05 16:03:29 +02:00
void error(const QString &title, const QString &message);
2011-06-05 17:36:52 +02:00
void askFee(qint64 nFeeRequired, bool *payFee);
2011-05-07 22:13:39 +02:00
private slots:
2011-05-10 19:03:10 +02:00
void sendcoinsClicked();
void addressbookClicked();
void optionsClicked();
void receivingAddressesClicked();
void aboutClicked();
2011-05-10 19:03:10 +02:00
void newAddressClicked();
void copyClipboardClicked();
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
2011-05-07 22:13:39 +02:00
};
#endif