1 #ifndef LOGSTABLEMODEL_HPP
2 #define LOGSTABLEMODEL_HPP
4 #include <QAbstractTableModel>
7 #include <rosgraph_msgs/Log.h>
9 #include <boost/circular_buffer.hpp>
10 #include <unordered_map>
17 typedef std::chrono::high_resolution_clock::time_point
TimePoint;
35 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
38 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
40 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
42 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
44 void push_back(
const rosgraph_msgs::Log::ConstPtr& pushed_log);
46 void push_back(
const std::vector<rosgraph_msgs::Log::ConstPtr>& pushed_logs);
48 const QString&
message(
int index)
const;
50 const QString &
nodeName(
int index)
const;
75 boost::circular_buffer<LogItem>
_logs;
94 #endif // LOGSTABLEMODEL_HPP