Changeset View
Changeset View
Standalone View
Standalone View
src/qt/addresstablemodel.h
Show All 23 Lines | |||||
class AddressTableModel : public QAbstractTableModel { | class AddressTableModel : public QAbstractTableModel { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
explicit AddressTableModel(WalletModel *parent = 0); | explicit AddressTableModel(WalletModel *parent = 0); | ||||
~AddressTableModel(); | ~AddressTableModel(); | ||||
enum ColumnIndex { | enum ColumnIndex { | ||||
/**< User specified label */ | /** User specified label */ | ||||
Label = 0, | Label = 0, | ||||
/**< Bitcoin address */ | /** Bitcoin address */ | ||||
Address = 1 | Address = 1 | ||||
}; | }; | ||||
enum RoleIndex { | enum RoleIndex { | ||||
/**< Type of address (#Send or #Receive) */ | /** Type of address (#Send or #Receive) */ | ||||
TypeRole = Qt::UserRole | TypeRole = Qt::UserRole | ||||
}; | }; | ||||
/** Return status of edit/insert operation */ | /** Return status of edit/insert operation */ | ||||
enum EditStatus { | enum EditStatus { | ||||
/**< Everything ok */ | /** Everything ok */ | ||||
OK, | OK, | ||||
/**< No changes were made during edit operation */ | /** No changes were made during edit operation */ | ||||
NO_CHANGES, | NO_CHANGES, | ||||
/**< Unparseable address */ | /** Unparseable address */ | ||||
INVALID_ADDRESS, | INVALID_ADDRESS, | ||||
/**< Address already in address book */ | /** Address already in address book */ | ||||
DUPLICATE_ADDRESS, | DUPLICATE_ADDRESS, | ||||
/**< Wallet could not be unlocked to create new receiving address */ | /** Wallet could not be unlocked to create new receiving address */ | ||||
WALLET_UNLOCK_FAILURE, | WALLET_UNLOCK_FAILURE, | ||||
/**< Generating a new public key for a receiving address failed */ | /** Generating a new public key for a receiving address failed */ | ||||
KEY_GENERATION_FAILURE | KEY_GENERATION_FAILURE | ||||
}; | }; | ||||
/**< Specifies send address */ | /** Specifies send address */ | ||||
static const QString Send; | static const QString Send; | ||||
/**< Specifies receive address */ | /** Specifies receive address */ | ||||
static const QString Receive; | static const QString Receive; | ||||
/** @name Methods overridden from QAbstractTableModel | /** @name Methods overridden from QAbstractTableModel | ||||
@{*/ | @{*/ | ||||
int rowCount(const QModelIndex &parent) const override; | int rowCount(const QModelIndex &parent) const override; | ||||
int columnCount(const QModelIndex &parent) const override; | int columnCount(const QModelIndex &parent) const override; | ||||
QVariant data(const QModelIndex &index, int role) const override; | QVariant data(const QModelIndex &index, int role) const override; | ||||
bool setData(const QModelIndex &index, const QVariant &value, | bool setData(const QModelIndex &index, const QVariant &value, | ||||
▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines |