Changeset View
Changeset View
Standalone View
Standalone View
src/qt/addresstablemodel.cpp
Show First 20 Lines • Show All 280 Lines • ▼ Show 20 Lines | if (orientation == Qt::Horizontal) { | ||||
return columns[section]; | return columns[section]; | ||||
} | } | ||||
} | } | ||||
return QVariant(); | return QVariant(); | ||||
} | } | ||||
Qt::ItemFlags AddressTableModel::flags(const QModelIndex &index) const { | Qt::ItemFlags AddressTableModel::flags(const QModelIndex &index) const { | ||||
if (!index.isValid()) { | if (!index.isValid()) { | ||||
return 0; | return Qt::NoItemFlags; | ||||
} | } | ||||
AddressTableEntry *rec = | AddressTableEntry *rec = | ||||
static_cast<AddressTableEntry *>(index.internalPointer()); | static_cast<AddressTableEntry *>(index.internalPointer()); | ||||
Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; | Qt::ItemFlags retval = Qt::ItemIsSelectable | Qt::ItemIsEnabled; | ||||
// Can edit address and label for sending addresses, and only label for | // Can edit address and label for sending addresses, and only label for | ||||
// receiving addresses. | // receiving addresses. | ||||
if (rec->type == AddressTableEntry::Sending || | if (rec->type == AddressTableEntry::Sending || | ||||
▲ Show 20 Lines • Show All 135 Lines • Show Last 20 Lines |