Older/WebApplication/VisitorRecordTableModel.cpp
luocai 5f3bf1067d
All checks were successful
Deploy / Build (push) Successful in 6m4s
add model.
2024-11-28 19:34:24 +08:00

20 lines
601 B
C++

#include "VisitorRecordTableModel.h"
#include "BoostLog.h"
int VisitorRecordTableModel::columnCount(const Wt::WModelIndex &parent) const {
return 5;
}
int VisitorRecordTableModel::rowCount(const Wt::WModelIndex &parent) const {
return 50;
}
Wt::cpp17::any VisitorRecordTableModel::data(const Wt::WModelIndex &index, Wt::ItemDataRole role) const {
LOG(info) << "VisitorRecordTableModel: " << role.value();
if (role == Wt::ItemDataRole::Checked && index.column() == 0) { // Assuming first column for checkbox
return true;
} else {
return Wt::cpp17::any{};
}
}