Changeset View
Changeset View
Standalone View
Standalone View
src/qt/recentrequeststablemodel.h
Show All 18 Lines | RecentRequestEntry() | ||||
: nVersion(RecentRequestEntry::CURRENT_VERSION), id(0) {} | : nVersion(RecentRequestEntry::CURRENT_VERSION), id(0) {} | ||||
static const int CURRENT_VERSION = 1; | static const int CURRENT_VERSION = 1; | ||||
int nVersion; | int nVersion; | ||||
int64_t id; | int64_t id; | ||||
QDateTime date; | QDateTime date; | ||||
SendCoinsRecipient recipient; | SendCoinsRecipient recipient; | ||||
ADD_SERIALIZE_METHODS; | SERIALIZE_METHODS(RecentRequestEntry, obj) { | ||||
unsigned int date_timet; | |||||
template <typename Stream, typename Operation> | SER_WRITE(obj, date_timet = obj.date.toTime_t()); | ||||
inline void SerializationOp(Stream &s, Operation ser_action) { | READWRITE(obj.nVersion, obj.id, date_timet, obj.recipient); | ||||
unsigned int nDate = date.toTime_t(); | SER_READ(obj, obj.date = QDateTime::fromTime_t(date_timet)); | ||||
READWRITE(this->nVersion); | |||||
READWRITE(id); | |||||
READWRITE(nDate); | |||||
READWRITE(recipient); | |||||
if (ser_action.ForRead()) date = QDateTime::fromTime_t(nDate); | |||||
} | } | ||||
}; | }; | ||||
class RecentRequestEntryLessThan { | class RecentRequestEntryLessThan { | ||||
public: | public: | ||||
RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder) | RecentRequestEntryLessThan(int nColumn, Qt::SortOrder fOrder) | ||||
: column(nColumn), order(fOrder) {} | : column(nColumn), order(fOrder) {} | ||||
bool operator()(const RecentRequestEntry &left, | bool operator()(const RecentRequestEntry &left, | ||||
▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines |