34#include <NDEVR/LogMessage.h>
35#include <NDEVR/TimeSpan.h>
36#include <QAbstractTableModel>
37#include <QSortFilterProxyModel>
63 int rowCount(
const QModelIndex& parent)
const override;
72 QVariant
data(
const QModelIndex& index,
int role)
const override;
78 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
82 Qt::ItemFlags
flags(
const QModelIndex& index)
const override;
103 bool setData(
const QModelIndex& index,
const QVariant& value,
int role = Qt::EditRole)
override;
141 uint04 m_search_range = 0;
145 uint01 m_minimum_level = 0;
146 bool m_detect_new_lines;
147 bool m_show_micro_seconds =
false;
The equivelent of std::vector but with a bit more control.
A class that allows for specific log information to be conveyed to a InfoPipe object including inform...
virtual bool filterAcceptsColumn(int source_column, const QModelIndex &source_parent) const
Determines whether a given column should be displayed.
void setTimeSpans(const Buffer< TimeSpan > &time_spans)
Sets the time span filters used to limit displayed messages.
int columnCount(const QModelIndex &parent) const override
Returns the number of columns in the model.
virtual bool filterAcceptsRow(uint04 source_row) const
Determines whether a given row passes the current filter criteria.
bool showMicroSeconds() const
Checks whether microsecond timestamp precision is enabled.
void updateFilter(bool can_use_active, uint04 start_index=0U)
Recomputes the active message filter based on current settings.
QVariant data(const QModelIndex &index, int role) const override
Returns display data for the given cell and role.
int rowCount(const QModelIndex &parent) const override
Returns the number of visible rows in the model.
const LogMessage & activeMessage(uint04 i) const
Returns the active message at the given filtered index.
virtual ~LogViewTable()
Destructor.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
void addMessage(const LogMessage &message)
Appends a single log message to the model.
void setDetectNewLines(bool detect_new_lines)
Sets whether embedded newline characters in messages create additional rows.
LogViewTable(QObject *parent=nullptr)
Constructs an empty log view table model.
void setMessages(const Buffer< LogMessage > &messages)
Replaces all messages in the model.
void setMessageSearchTerms(const Buffer< String > &search_terms, uint04 range)
Sets search terms used to filter or highlight log messages.
bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override
Sets data for the given cell (e.g., for editing).
const Buffer< uint04 > & activeMessages() const
Returns the indices of messages that pass the current filter.
void clear()
Removes all messages from the model.
void addMessages(const Buffer< LogMessage > &messages)
Appends multiple log messages to the model.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns header data for the given section.
void setShowMicroSeconds(bool show_microseconds)
Sets whether timestamps display microsecond precision.
LogViewTable(const Buffer< LogMessage > &messages, QObject *parent=nullptr)
Constructs a log view table model pre-populated with messages.
const Buffer< LogMessage > & allMessages() const
Returns all stored log messages, including filtered ones.
void setMinimumLevel(uint01 minimal_level)
Sets the minimum log severity level for displayed messages.
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...