2011-05-08 16:23:31 -04:00
|
|
|
#ifndef BITCOINGUI_H
|
|
|
|
#define BITCOINGUI_H
|
2011-05-07 17:13:39 -03:00
|
|
|
|
|
|
|
#include <QMainWindow>
|
2011-05-12 14:16:42 -04:00
|
|
|
#include <QSystemTrayIcon>
|
|
|
|
|
|
|
|
/* Forward declarations */
|
|
|
|
class TransactionTableModel;
|
2011-05-22 11:19:43 -04:00
|
|
|
class ClientModel;
|
2011-05-13 16:00:27 -04:00
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
2011-05-12 14:16:42 -04:00
|
|
|
class QLabel;
|
|
|
|
class QLineEdit;
|
2011-05-13 16:00:27 -04:00
|
|
|
QT_END_NAMESPACE
|
2011-05-07 17:13:39 -03:00
|
|
|
|
|
|
|
class BitcoinGUI : public QMainWindow
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2011-05-08 16:23:31 -04:00
|
|
|
explicit BitcoinGUI(QWidget *parent = 0);
|
2011-05-22 11:19:43 -04:00
|
|
|
void setModel(ClientModel *model);
|
2011-05-07 17:13:39 -03:00
|
|
|
|
|
|
|
/* Transaction table tab indices */
|
|
|
|
enum {
|
2011-05-08 16:23:31 -04:00
|
|
|
AllTransactions = 0,
|
|
|
|
SentReceived = 1,
|
|
|
|
Sent = 2,
|
|
|
|
Received = 3
|
2011-05-07 17:13:39 -03:00
|
|
|
} TabIndex;
|
2011-05-12 14:16:42 -04:00
|
|
|
private:
|
|
|
|
TransactionTableModel *transaction_model;
|
2011-05-22 11:19:43 -04:00
|
|
|
ClientModel *model;
|
2011-05-12 14:16:42 -04:00
|
|
|
|
|
|
|
QLineEdit *address;
|
|
|
|
QLabel *labelBalance;
|
2011-05-12 14:28:07 -04:00
|
|
|
QLabel *labelConnections;
|
|
|
|
QLabel *labelBlocks;
|
|
|
|
QLabel *labelTransactions;
|
2011-05-12 14:16:42 -04:00
|
|
|
|
|
|
|
QAction *quit;
|
|
|
|
QAction *sendcoins;
|
|
|
|
QAction *addressbook;
|
|
|
|
QAction *about;
|
|
|
|
QAction *receiving_addresses;
|
|
|
|
QAction *options;
|
|
|
|
QAction *openBitCoin;
|
|
|
|
|
|
|
|
QSystemTrayIcon *trayIcon;
|
|
|
|
|
|
|
|
void createActions();
|
|
|
|
QWidget *createTabs();
|
|
|
|
void createTrayIcon();
|
|
|
|
|
2011-05-12 14:28:07 -04:00
|
|
|
public slots:
|
2011-05-27 15:24:17 -04:00
|
|
|
void setBalance(qint64 balance);
|
2011-05-13 02:30:20 -04:00
|
|
|
void setAddress(const QString &address);
|
2011-05-12 14:28:07 -04:00
|
|
|
void setNumConnections(int count);
|
|
|
|
void setNumBlocks(int count);
|
|
|
|
void setNumTransactions(int count);
|
|
|
|
|
2011-05-07 17:13:39 -03:00
|
|
|
private slots:
|
2011-05-10 13:03:10 -04:00
|
|
|
void sendcoinsClicked();
|
|
|
|
void addressbookClicked();
|
|
|
|
void optionsClicked();
|
|
|
|
void receivingAddressesClicked();
|
2011-05-12 03:40:40 -04:00
|
|
|
void aboutClicked();
|
|
|
|
|
2011-05-10 13:03:10 -04:00
|
|
|
void newAddressClicked();
|
|
|
|
void copyClipboardClicked();
|
2011-05-30 14:20:12 -04:00
|
|
|
void error(const QString &title, const QString &message);
|
2011-05-07 17:13:39 -03:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|