5 #ifndef BITCOIN_QT_ADDRESSTABLEMODEL_H 6 #define BITCOIN_QT_ADDRESSTABLEMODEL_H 10 #include <QAbstractTableModel> 11 #include <QStringList> 60 int rowCount(
const QModelIndex &parent)
const override;
61 int columnCount(
const QModelIndex &parent)
const override;
62 QVariant
data(
const QModelIndex &
index,
int role)
const override;
63 bool setData(
const QModelIndex &
index,
const QVariant &value,
int role)
override;
64 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const override;
65 QModelIndex
index(
int row,
int column,
const QModelIndex &parent)
const override;
66 bool removeRows(
int row,
int count,
const QModelIndex &parent = QModelIndex())
override;
67 Qt::ItemFlags
flags(
const QModelIndex &
index)
const override;
73 QString
addRow(
const QString &type,
const QString &label,
const QString &address,
const OutputType address_type);
79 std::optional<wallet::AddressPurpose>
purposeForAddress(
const QString &address)
const;
112 #endif // BITCOIN_QT_ADDRESSTABLEMODEL_H QVariant data(const QModelIndex &index, int role) const override
Generating a new public key for a receiving address failed.
int lookupAddress(const QString &address) const
QVariant headerData(int section, Qt::Orientation orientation, int role) const override
Address already in address book.
int rowCount(const QModelIndex &parent) const override
QString addRow(const QString &type, const QString &label, const QString &address, const OutputType address_type)
static const QString Send
Specifies send address.
int columnCount(const QModelIndex &parent) const override
bool setData(const QModelIndex &index, const QVariant &value, int role) override
AddressPurpose
Address purpose field that has been been stored with wallet sending and receiving addresses since BIP...
Wallet could not be unlocked to create new receiving address.
Qt::ItemFlags flags(const QModelIndex &index) const override
EditStatus
Return status of edit/insert operation.
QString labelForAddress(const QString &address) const
Look up label for address in address book, if not found return empty string.
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex()) override
WalletModel *const walletModel
std::optional< wallet::AddressPurpose > purposeForAddress(const QString &address) const
Look up purpose for address in address book, if not found return empty string.
Qt model of the address book in the core.
void updateEntry(const QString &address, const QString &label, bool isMine, wallet::AddressPurpose purpose, int status)
OutputType GetDefaultAddressType() const
QString GetWalletDisplayName() const
Interface to Bitcoin wallet from Qt view code.
static const QString Receive
Specifies receive address.
void emitDataChanged(int index)
Notify listeners that data changed.
bool getAddressData(const QString &address, std::string *name, wallet::AddressPurpose *purpose) const
Look up address book data given an address string.
No changes were made during edit operation.
EditStatus getEditStatus() const
QModelIndex index(int row, int column, const QModelIndex &parent) const override
AddressTableModel(WalletModel *parent=nullptr, bool pk_hash_only=false)
Type of address (Send or Receive)