21 #include <QHBoxLayout>
22 #include <QVBoxLayout>
24 #if QT_VERSION < 0x050000
25 #include <QDesktopServices>
27 #include <QStandardPaths>
29 #include <QFileDialog>
30 #include <QPushButton>
33 QStackedWidget(parent),
42 QVBoxLayout *vbox =
new QVBoxLayout();
43 QHBoxLayout *hbox_buttons =
new QHBoxLayout();
46 QPushButton *exportButton =
new QPushButton(tr(
"&Export"),
this);
47 exportButton->setToolTip(tr(
"Export the data in the current tab to a file"));
48 #ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
49 exportButton->setIcon(QIcon(
":/icons/export"));
51 hbox_buttons->addStretch();
52 hbox_buttons->addWidget(exportButton);
53 vbox->addLayout(hbox_buttons);
87 connect(exportButton, SIGNAL(clicked()),
transactionView, SLOT(exportClicked()));
118 connect(walletModel, SIGNAL(message(QString,QString,
unsigned int)),
gui, SLOT(message(QString,QString,
unsigned int)));
136 connect(walletModel, SIGNAL(requireUnlock()),
this, SLOT(
unlockWallet()));
248 #if QT_VERSION < 0x050000
249 QString saveDir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
251 QString saveDir = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation);
254 if (!filename.isEmpty()) {
256 gui->
message(tr(
"Backup Failed"), tr(
"There was an error trying to save the wallet data to the new location."),
260 gui->
message(tr(
"Backup Successful"), tr(
"The wallet data was successfully saved to the new location."),
QWidget * transactionsPage
void showTab_SM(bool fShow)
void gotoAddressBookPage()
Switch to address book page.
void setWalletModel(WalletModel *walletModel)
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
OverviewPage * overviewPage
TransactionView * transactionView
void setAddress_VM(const QString &address)
void setModel(AddressTableModel *model)
QAction * getHistoryAction()
void changePassphrase()
Change encrypted wallet passphrase.
ClientModel * clientModel
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when ...
void importWallet(QString privateKey)
Import a wallet from a string.
Ask passphrase twice and encrypt.
bool backupWallet(const QString &filename)
AddressBookPage * receiveCoinsPage
WalletModel * walletModel
OptionsModel * getOptionsModel()
Open address book for editing.
void incomingTransaction(const QModelIndex &parent, int start, int)
Show incoming transaction notification for new transactions.
AddressTableModel * getAddressTableModel()
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
SendCoinsDialog * sendCoinsPage
bool inInitialBlockDownload() const
Return true if core is doing initial block download.
void gotoHistoryPage()
Switch to history (transactions) page.
QAction * getOverviewAction()
Used by WalletView to allow access to needed QActions.
Ask passphrase and unlock.
void setBitcoinGUI(BitcoinGUI *gui)
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
void setAddress(const QString &address)
Widget showing the transaction list for a wallet, including a filter row.
bool handleURI(const QString &uri)
void incomingTransaction(const QString &date, int unit, qint64 amount, const QString &type, const QString &address)
Show incoming transaction notification for new transactions.
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Dialog for sending bitcoins.
void setOptionsModel(OptionsModel *optionsModel)
TransactionTableModel * getTransactionTableModel()
Widget that shows a list of sending or receiving addresses.
UI model for the transaction table of a wallet.
QAction * getReceiveCoinsAction()
Model for Bitcoin network client.
void setModel(WalletModel *model)
void showNormalIfMinimized()
Signal that we want to show the main window.
void backupWallet()
Backup the wallet.
EncryptionStatus getEncryptionStatus() const
void gotoOverviewPage()
Switch to overview (home) page.
AddressBookPage * addressBookPage
void showOutOfSyncWarning(bool fShow)
QAction * getAddressBookAction()
void setModel(WalletModel *model)
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
bool importPrivateKey(QString privKey)
void setEncryptionStatus(int status)
Set the encryption status as shown in the UI.
Interface to Bitcoin wallet from Qt view code.
Multifunctional dialog to ask for passphrases.
SignVerifyMessageDialog * signVerifyMessageDialog
void setClientModel(ClientModel *clientModel)
Set the client model.
Ask passphrase and decrypt wallet.
void setClientModel(ClientModel *clientModel)
Ask old passphrase + new passphrase twice.
void message(const QString &title, const QString &message, unsigned int style, bool *ret=NULL)
Notify the user of an event from the core network or transaction handling code.
void encryptWallet(bool status)
Encrypt the wallet.
bool handleURI(const QString &uri)
void gotoReceiveCoinsPage()
Switch to receive coins page.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const
void setModel(WalletModel *model)
WalletView(QWidget *parent, BitcoinGUI *_gui)
Overview ("home") page widget.
void showOutOfSyncWarning(bool fShow)
void showTab_VM(bool fShow)
OptionsModel * getOptionsModel()
Predefined combinations for certain default usage cases.
QAction * getSendCoinsAction()
void setEncryptionStatus()
void setAddress_SM(const QString &address)
void setModel(WalletModel *model)