aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoingui.h')
-rw-r--r--src/qt/bitcoingui.h61
1 files changed, 36 insertions, 25 deletions
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index 1b3e313fc2..f361a62a41 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -3,10 +3,14 @@
#include <QMainWindow>
#include <QSystemTrayIcon>
+#include <QMap>
class TransactionTableModel;
+class WalletFrame;
+class WalletView;
class ClientModel;
class WalletModel;
+class WalletStack;
class TransactionView;
class OverviewPage;
class AddressBookPage;
@@ -15,11 +19,17 @@ class SignVerifyMessageDialog;
class Notificator;
class RPCConsole;
+class CWallet;
+
QT_BEGIN_NAMESPACE
class QLabel;
class QModelIndex;
class QProgressBar;
class QStackedWidget;
+class QUrl;
+class QListWidget;
+class QPushButton;
+class QAction;
QT_END_NAMESPACE
/**
@@ -31,6 +41,8 @@ class BitcoinGUI : public QMainWindow
Q_OBJECT
public:
+ static const QString DEFAULT_WALLET;
+
explicit BitcoinGUI(QWidget *parent = 0);
~BitcoinGUI();
@@ -42,7 +54,19 @@ public:
The wallet model represents a bitcoin wallet, and offers access to the list of transactions, address book and sending
functionality.
*/
- void setWalletModel(WalletModel *walletModel);
+
+ bool addWallet(const QString& name, WalletModel *walletModel);
+ bool setCurrentWallet(const QString& name);
+
+ void removeAllWallets();
+
+ /** Used by WalletView to allow access to needed QActions */
+ // Todo: Use Qt signals for these
+ QAction * getOverviewAction() { return overviewAction; }
+ QAction * getHistoryAction() { return historyAction; }
+ QAction * getAddressBookAction() { return addressBookAction; }
+ QAction * getReceiveCoinsAction() { return receiveCoinsAction; }
+ QAction * getSendCoinsAction() { return sendCoinsAction; }
protected:
void changeEvent(QEvent *e);
@@ -53,16 +77,7 @@ protected:
private:
ClientModel *clientModel;
- WalletModel *walletModel;
-
- QStackedWidget *centralWidget;
-
- OverviewPage *overviewPage;
- QWidget *transactionsPage;
- AddressBookPage *addressBookPage;
- AddressBookPage *receiveCoinsPage;
- SendCoinsDialog *sendCoinsPage;
- SignVerifyMessageDialog *signVerifyMessageDialog;
+ WalletFrame *walletFrame;
QLabel *labelEncryptionIcon;
QLabel *labelConnectionsIcon;
@@ -82,7 +97,6 @@ private:
QAction *receiveCoinsAction;
QAction *optionsAction;
QAction *toggleHideAction;
- QAction *exportAction;
QAction *encryptWalletAction;
QAction *backupWalletAction;
QAction *changePassphraseAction;
@@ -108,6 +122,10 @@ private:
void createTrayIcon();
/** Create system tray menu (or setup the dock menu) */
void createTrayIconMenu();
+ /** Save window size and position */
+ void saveWindowGeometry();
+ /** Restore window size and position */
+ void restoreWindowGeometry();
public slots:
/** Set number of connections shown in the UI */
@@ -139,6 +157,9 @@ public slots:
void askFee(qint64 nFeeRequired, bool *payFee);
void handleURI(QString strURI);
+ /** Show incoming transaction notification for new transactions. */
+ void incomingTransaction(const QString& date, int unit, qint64 amount, const QString& type, const QString& address);
+
private slots:
/** Switch to overview (home) page */
void gotoOverviewPage();
@@ -164,24 +185,14 @@ private slots:
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
#endif
- /** Show incoming transaction notification for new transactions.
-
- The new items are those between start and end inclusive, under the given parent item.
- */
- void incomingTransaction(const QModelIndex& parent, int start, int /*end*/);
- /** Encrypt the wallet */
- void encryptWallet(bool status);
- /** Backup the wallet */
- void backupWallet();
- /** Change encrypted wallet passphrase */
- void changePassphrase();
- /** Ask for passphrase to unlock wallet temporarily */
- void unlockWallet();
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */
void showNormalIfMinimized(bool fToggleHidden = false);
/** Simply calls showNormalIfMinimized(true) for use in SLOT() macro */
void toggleHidden();
+
+ /** called by a timer to check if fRequestShutdown has been set **/
+ void detectShutdown();
};
#endif // BITCOINGUI_H