6 #ifndef PIVX_QT_ADDRESSTABLEMODEL_H
7 #define PIVX_QT_ADDRESSTABLEMODEL_H
9 #include <QAbstractTableModel>
10 #include <QStringList>
61 int rowCount(
const QModelIndex& parent)
const;
70 QVariant
data(
const QModelIndex&
index,
int role)
const;
71 bool setData(
const QModelIndex&
index,
const QVariant& value,
int role);
72 QVariant
headerData(
int section, Qt::Orientation orientation,
int role)
const;
73 QModelIndex
index(
int row,
int column,
const QModelIndex& parent)
const;
74 bool removeRows(
int row,
int count,
const QModelIndex& parent = QModelIndex());
75 Qt::ItemFlags
flags(
const QModelIndex&
index)
const;
81 QString
addRow(
const QString& type,
const QString& label,
const QString& address);
122 void updateEntry(
const QString& address,
const QString& label,
bool isMine,
const QString& purpose,
int status);
123 void updateEntry(
const QString &pubCoin,
const QString &isUsed,
int status);
Qt model of the address book in the core.
@ TypeRole
Type of address (Send, Receive, ColdStaking, ColdStakingSend, Delegator, Delegable)
int lookupAddress(const QString &address) const
int columnCount(const QModelIndex &parent) const
static const QString Delegator
Specifies cold staking addresses which delegated tokens to this wallet and ARE being staked.
AddressTableModel(CWallet *wallet, WalletModel *parent=0)
QVariant headerData(int section, Qt::Orientation orientation, int role) const
static const QString ColdStakingSend
Specifies send cold staking addresses (simil 'contacts')
static const QString ShieldedSend
Specifies shielded receive address.
EditStatus getEditStatus() const
WalletModel * walletModel
EditStatus
Return status of edit/insert operation.
@ WALLET_UNLOCK_FAILURE
Wallet could not be unlocked to create new receiving address.
@ NO_CHANGES
No changes were made during edit operation.
@ INVALID_ADDRESS
Unparsable address.
@ KEY_GENERATION_FAILURE
Generating a new public key for a receiving address failed.
@ DUPLICATE_ADDRESS
Address already in address book.
void emitDataChanged(int index)
Notify listeners that data changed.
@ Address
Bitcoin address.
@ Label
User specified label.
@ Date
Address creation date.
std::string purposeForAddress(const std::string &address) const
static const QString ShieldedReceive
Specifies shielded send address.
Qt::ItemFlags flags(const QModelIndex &index) const
bool setData(const QModelIndex &index, const QVariant &value, int role)
bool removeRows(int row, int count, const QModelIndex &parent=QModelIndex())
QModelIndex index(int row, int column, const QModelIndex &parent) const
int sizeShieldedSend() const
QVariant data(const QModelIndex &index, int role) const
static const QString Send
Specifies send address.
bool isWhitelisted(const std::string &address) const
Checks if the address is whitelisted.
static const QString Zerocoin
Specifies stealth address.
void updateEntry(const QString &address, const QString &label, bool isMine, const QString &purpose, int status)
QString getAddressToShow(bool shielded=false) const
Return last unused address.
QString addRow(const QString &type, const QString &label, const QString &address)
static const QString Delegable
Specifies cold staking addresses which delegated tokens to this wallet.
void notifyChange(const QModelIndex &index)
static const QString Receive
Specifies receive address.
int rowCount(const QModelIndex &parent) const
static const QString ColdStaking
Specifies cold staking own addresses.
QString labelForAddress(const QString &address) const
A CWallet is an extension of a keystore, which also maintains a set of transactions and balances,...
Interface to PIVX wallet from Qt view code.