Older/WebApplication/VisitorRecordTableModel.cpp

20 lines
601 B
C++
Raw Normal View History

2024-11-28 19:34:24 +08:00
#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{};
}
}