![]() |
Bitcoin Core 31.0.0
P2P Digital Currency
|
Qt model of the address book in the core. More...
#include <addresstablemodel.h>
Public Types | |
| enum | ColumnIndex { Label = 0 , Address = 1 } |
| enum | RoleIndex { TypeRole = Qt::UserRole } |
| enum | EditStatus { OK , NO_CHANGES , INVALID_ADDRESS , DUPLICATE_ADDRESS , WALLET_UNLOCK_FAILURE , KEY_GENERATION_FAILURE } |
| Return status of edit/insert operation. More... | |
Public Member Functions | |
| AddressTableModel (WalletModel *parent=nullptr, bool pk_hash_only=false) | |
| ~AddressTableModel () | |
Static Public Attributes | |
| static const QString | Send = "S" |
| Specifies send address. | |
| static const QString | Receive = "R" |
| Specifies receive address. | |
Methods overridden from QAbstractTableModel | |
| WalletModel *const | walletModel |
| AddressTablePriv * | priv = nullptr |
| QStringList | columns |
| EditStatus | editStatus = OK |
| class | AddressTablePriv |
| int | rowCount (const QModelIndex &parent) const override |
| int | columnCount (const QModelIndex &parent) const override |
| QVariant | data (const QModelIndex &index, int role) const override |
| bool | setData (const QModelIndex &index, const QVariant &value, int role) override |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| QModelIndex | index (int row, int column, const QModelIndex &parent) const override |
| bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) override |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| QString | addRow (const QString &type, const QString &label, const QString &address, OutputType address_type) |
| QString | labelForAddress (const QString &address) const |
| Look up label for address in address book, if not found return empty string. | |
| std::optional< wallet::AddressPurpose > | purposeForAddress (const QString &address) const |
| Look up purpose for address in address book, if not found return empty string. | |
| int | lookupAddress (const QString &address) const |
| EditStatus | getEditStatus () const |
| OutputType | GetDefaultAddressType () const |
| QString | GetWalletDisplayName () const |
| bool | getAddressData (const QString &address, std::string *name, wallet::AddressPurpose *purpose) const |
| Look up address book data given an address string. | |
| void | emitDataChanged (int index) |
| Notify listeners that data changed. | |
| void | updateEntry (const QString &address, const QString &label, bool isMine, wallet::AddressPurpose purpose, int status) |
Qt model of the address book in the core.
This allows views to access and modify the address book.
Definition at line 28 of file addresstablemodel.h.
| Enumerator | |
|---|---|
| Label | User specified label. |
| Address | Bitcoin address. |
Definition at line 36 of file addresstablemodel.h.
Return status of edit/insert operation.
Definition at line 46 of file addresstablemodel.h.
| Enumerator | |
|---|---|
| TypeRole | |
Definition at line 41 of file addresstablemodel.h.
|
explicit |
| AddressTableModel::~AddressTableModel | ( | ) |
Definition at line 172 of file addresstablemodel.cpp.
| QString AddressTableModel::addRow | ( | const QString & | type, |
| const QString & | label, | ||
| const QString & | address, | ||
| OutputType | address_type ) |
Definition at line 342 of file addresstablemodel.cpp.
|
override |
Definition at line 185 of file addresstablemodel.cpp.
|
override |
Definition at line 193 of file addresstablemodel.cpp.
Notify listeners that data changed.
Definition at line 451 of file addresstablemodel.cpp.
|
override |
|
private |
Look up address book data given an address string.
Definition at line 428 of file addresstablemodel.cpp.
| OutputType AddressTableModel::GetDefaultAddressType | ( | ) | const |
Definition at line 449 of file addresstablemodel.cpp.
|
inline |
| QString AddressTableModel::GetWalletDisplayName | ( | ) | const |
Definition at line 456 of file addresstablemodel.cpp.
|
override |
Definition at line 321 of file addresstablemodel.cpp.
Look up label for address in address book, if not found return empty string.
Definition at line 410 of file addresstablemodel.cpp.
| std::optional< wallet::AddressPurpose > AddressTableModel::purposeForAddress | ( | const QString & | address | ) | const |
Look up purpose for address in address book, if not found return empty string.
Definition at line 419 of file addresstablemodel.cpp.
|
override |
|
override |
|
override |
|
slot |
Definition at line 335 of file addresstablemodel.cpp.
|
friend |
Definition at line 109 of file addresstablemodel.h.
|
private |
Definition at line 95 of file addresstablemodel.h.
|
private |
Definition at line 96 of file addresstablemodel.h.
|
private |
Definition at line 94 of file addresstablemodel.h.
|
static |
Specifies receive address.
Definition at line 56 of file addresstablemodel.h.
|
static |
Specifies send address.
Definition at line 55 of file addresstablemodel.h.
|
private |
Definition at line 93 of file addresstablemodel.h.