Bitcoin ABC  0.24.7
P2P Digital Currency
editaddressdialog.h
Go to the documentation of this file.
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.
4 
5 #ifndef BITCOIN_QT_EDITADDRESSDIALOG_H
6 #define BITCOIN_QT_EDITADDRESSDIALOG_H
7 
8 #include <QDialog>
9 
10 class AddressTableModel;
11 
12 namespace Ui {
13 class EditAddressDialog;
14 }
15 
16 QT_BEGIN_NAMESPACE
17 class QDataWidgetMapper;
18 QT_END_NAMESPACE
19 
23 class EditAddressDialog : public QDialog {
24  Q_OBJECT
25 
26 public:
28 
29  explicit EditAddressDialog(Mode mode, QWidget *parent = nullptr);
31 
33  void loadRow(int row);
34 
35  QString getAddress() const;
36  void setAddress(const QString &address);
37 
38 public Q_SLOTS:
39  void accept() override;
40 
41 private:
42  bool saveCurrentRow();
43 
48  QString getDuplicateAddressWarning() const;
49 
50  Ui::EditAddressDialog *ui;
51  QDataWidgetMapper *mapper;
54 
55  QString address;
56 };
57 
58 #endif // BITCOIN_QT_EDITADDRESSDIALOG_H
EditAddressDialog::loadRow
void loadRow(int row)
Definition: editaddressdialog.cpp:60
EditAddressDialog::EditReceivingAddress
@ EditReceivingAddress
Definition: editaddressdialog.h:27
AddressTableModel
Qt model of the address book in the core.
Definition: addresstablemodel.h:24
EditAddressDialog::setModel
void setModel(AddressTableModel *model)
Definition: editaddressdialog.cpp:49
EditAddressDialog::EditSendingAddress
@ EditSendingAddress
Definition: editaddressdialog.h:27
EditAddressDialog::EditAddressDialog
EditAddressDialog(Mode mode, QWidget *parent=nullptr)
Definition: editaddressdialog.cpp:14
EditAddressDialog
Dialog for editing an address and associated information.
Definition: editaddressdialog.h:23
EditAddressDialog::~EditAddressDialog
~EditAddressDialog()
Definition: editaddressdialog.cpp:45
EditAddressDialog::model
AddressTableModel * model
Definition: editaddressdialog.h:53
EditAddressDialog::mapper
QDataWidgetMapper * mapper
Definition: editaddressdialog.h:51
EditAddressDialog::setAddress
void setAddress(const QString &address)
Definition: editaddressdialog.cpp:149
EditAddressDialog::NewSendingAddress
@ NewSendingAddress
Definition: editaddressdialog.h:27
EditAddressDialog::saveCurrentRow
bool saveCurrentRow()
Definition: editaddressdialog.cpp:64
EditAddressDialog::address
QString address
Definition: editaddressdialog.h:55
EditAddressDialog::mode
Mode mode
Definition: editaddressdialog.h:52
EditAddressDialog::accept
void accept() override
Definition: editaddressdialog.cpp:85
Ui
Definition: addressbookpage.h:14
EditAddressDialog::ui
Ui::EditAddressDialog * ui
Definition: editaddressdialog.h:50
EditAddressDialog::getDuplicateAddressWarning
QString getDuplicateAddressWarning() const
Return a descriptive string when adding an already-existing address fails.
Definition: editaddressdialog.cpp:126
EditAddressDialog::Mode
Mode
Definition: editaddressdialog.h:27
EditAddressDialog::getAddress
QString getAddress() const
Definition: editaddressdialog.cpp:145