![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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 } |
Public Slots | |
void | updateEntry (const QString &address, const QString &label, bool isMine, const QString &purpose, int status) |
Public Member Functions | |
AddressTableModel (CWallet *wallet, WalletModel *parent=0) | |
~AddressTableModel () | |
QString | addRow (const QString &type, const QString &label, const QString &address) |
QString | labelForAddress (const QString &address) const |
int | lookupAddress (const QString &address) const |
EditStatus | getEditStatus () const |
Methods overridden from QAbstractTableModel | |
int | rowCount (const QModelIndex &parent) const |
int | columnCount (const QModelIndex &parent) const |
QVariant | data (const QModelIndex &index, int role) const |
bool | setData (const QModelIndex &index, const QVariant &value, int role) |
QVariant | headerData (int section, Qt::Orientation orientation, int role) const |
QModelIndex | index (int row, int column, const QModelIndex &parent) const |
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
Qt::ItemFlags | flags (const QModelIndex &index) const |
Static Public Attributes | |
static const QString | Send = "S" |
static const QString | Receive = "R" |
Private Member Functions | |
void | emitDataChanged (int index) |
Private Attributes | |
WalletModel * | walletModel |
CWallet * | wallet |
AddressTablePriv * | priv |
QStringList | columns |
EditStatus | editStatus |
Friends | |
class | AddressTablePriv |
Qt model of the address book in the core. This allows views to access and modify the address book.
Definition at line 19 of file addresstablemodel.h.
Enumerator | |
---|---|
Label | User specified label |
Address | Bitcoin address |
Definition at line 27 of file addresstablemodel.h.
Return status of edit/insert operation
Definition at line 37 of file addresstablemodel.h.
Enumerator | |
---|---|
TypeRole |
Definition at line 32 of file addresstablemodel.h.
|
explicit |
Definition at line 168 of file addresstablemodel.cpp.
AddressTableModel::~AddressTableModel | ( | ) |
Definition at line 176 of file addresstablemodel.cpp.
QString AddressTableModel::addRow | ( | const QString & | type, |
const QString & | label, | ||
const QString & | address | ||
) |
Definition at line 346 of file addresstablemodel.cpp.
Referenced by ReceiveCoinsDialog::on_receiveButton_clicked(), and EditAddressDialog::saveCurrentRow().
int AddressTableModel::columnCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 187 of file addresstablemodel.cpp.
QVariant AddressTableModel::data | ( | const QModelIndex & | index, |
int | role | ||
) | const |
Definition at line 193 of file addresstablemodel.cpp.
Referenced by TransactionView::editLabel(), and index().
|
private |
Notify listeners that data changed.
Definition at line 452 of file addresstablemodel.cpp.
Referenced by AddressTablePriv::updateEntry().
Qt::ItemFlags AddressTableModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 308 of file addresstablemodel.cpp.
|
inline |
Definition at line 75 of file addresstablemodel.h.
Referenced by EditAddressDialog::accept().
QVariant AddressTableModel::headerData | ( | int | section, |
Qt::Orientation | orientation, | ||
int | role | ||
) | const |
Definition at line 296 of file addresstablemodel.cpp.
QModelIndex AddressTableModel::index | ( | int | row, |
int | column, | ||
const QModelIndex & | parent | ||
) | const |
Definition at line 325 of file addresstablemodel.cpp.
Referenced by data(), TransactionView::editLabel(), emitDataChanged(), flags(), lookupAddress(), AddressBookPage::selectNewAddress(), and setData().
QString AddressTableModel::labelForAddress | ( | const QString & | address | ) | const |
Definition at line 424 of file addresstablemodel.cpp.
Referenced by TransactionTableModel::addressColor(), SendCoinsDialog::coinControlChangeEdited(), TransactionTableModel::data(), TransactionTableModel::lookupAddress(), ReceiveCoinsDialog::on_receiveButton_clicked(), SendCoinsEntry::updateLabel(), and CoinControlDialog::updateView().
int AddressTableModel::lookupAddress | ( | const QString & | address | ) | const |
Definition at line 438 of file addresstablemodel.cpp.
Referenced by TransactionView::editLabel().
bool AddressTableModel::removeRows | ( | int | row, |
int | count, | ||
const QModelIndex & | parent = QModelIndex() |
||
) |
Definition at line 405 of file addresstablemodel.cpp.
int AddressTableModel::rowCount | ( | const QModelIndex & | parent | ) | const |
Definition at line 181 of file addresstablemodel.cpp.
bool AddressTableModel::setData | ( | const QModelIndex & | index, |
const QVariant & | value, | ||
int | role | ||
) |
Definition at line 240 of file addresstablemodel.cpp.
|
slot |
Definition at line 339 of file addresstablemodel.cpp.
Referenced by WalletModel::updateAddressBook().
|
friend |
Definition at line 92 of file addresstablemodel.h.
Referenced by AddressTableModel().
|
private |
Definition at line 81 of file addresstablemodel.h.
Referenced by AddressTableModel(), columnCount(), emitDataChanged(), and headerData().
|
private |
Definition at line 82 of file addresstablemodel.h.
Referenced by addRow(), getEditStatus(), and setData().
|
private |
Definition at line 80 of file addresstablemodel.h.
Referenced by AddressTableModel(), index(), removeRows(), rowCount(), updateEntry(), and ~AddressTableModel().
|
static |
Specifies receive address
Definition at line 47 of file addresstablemodel.h.
Referenced by addRow(), data(), TransactionView::editLabel(), ReceiveCoinsDialog::on_receiveButton_clicked(), EditAddressDialog::saveCurrentRow(), and AddressBookPage::setModel().
|
static |
Specifies send address
Definition at line 46 of file addresstablemodel.h.
Referenced by addRow(), data(), EditAddressDialog::saveCurrentRow(), and AddressBookPage::setModel().
|
private |
Definition at line 79 of file addresstablemodel.h.
|
private |
Definition at line 78 of file addresstablemodel.h.
Referenced by addRow().