[tests] Add -blocknotify functional test
[bitcoinplatinum.git] / src / qt / editaddressdialog.h
blobddb67ece72302880821701f7ff7d0b7717e77a77
1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_EDITADDRESSDIALOG_H
6 #define BITCOIN_QT_EDITADDRESSDIALOG_H
8 #include <QDialog>
10 class AddressTableModel;
12 namespace Ui {
13 class EditAddressDialog;
16 QT_BEGIN_NAMESPACE
17 class QDataWidgetMapper;
18 QT_END_NAMESPACE
20 /** Dialog for editing an address and associated information.
22 class EditAddressDialog : public QDialog
24 Q_OBJECT
26 public:
27 enum Mode {
28 NewReceivingAddress,
29 NewSendingAddress,
30 EditReceivingAddress,
31 EditSendingAddress
34 explicit EditAddressDialog(Mode mode, QWidget *parent);
35 ~EditAddressDialog();
37 void setModel(AddressTableModel *model);
38 void loadRow(int row);
40 QString getAddress() const;
41 void setAddress(const QString &address);
43 public Q_SLOTS:
44 void accept();
46 private:
47 bool saveCurrentRow();
49 Ui::EditAddressDialog *ui;
50 QDataWidgetMapper *mapper;
51 Mode mode;
52 AddressTableModel *model;
54 QString address;
57 #endif // BITCOIN_QT_EDITADDRESSDIALOG_H