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> 13 typedef std::chrono::high_resolution_clock::time_point
TimePoint;
31 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
34 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
36 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
38 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
40 void push_back(
const rosgraph_msgs::Log::ConstPtr& pushed_log);
42 void push_back(
const std::vector<rosgraph_msgs::Log::ConstPtr>& pushed_logs);
44 const QString&
message(
int index)
const;
46 const QString &
nodeName(
int index)
const;
71 boost::circular_buffer<LogItem>
_logs;
90 #endif // LOGSTABLEMODEL_HPP
int columnCount(const QModelIndex &parent=QModelIndex()) const override
LogItem convertRosout(const rosgraph_msgs::Log &log)
std::chrono::high_resolution_clock::time_point TimePoint
TimePoint timestamp(int index) const
LogsTableModel(QObject *parent=0)
std::set< QString > _node_list
const QString & message(int index) const
boost::circular_buffer< LogItem > _logs
std::set< QString > _source_list
Severity severity(int index) const
int rowCount(const QModelIndex &parent=QModelIndex()) const override
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
int64_t time_usec_since_epoch
const QString & nodeName(int index) const
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
void push_back(const rosgraph_msgs::Log::ConstPtr &pushed_log)