Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
LogFilterProxyModel Class Reference

A proxy model for filtering log entries based on various criteria. More...

#include <log_filter_model.h>

Inheritance diagram for LogFilterProxyModel:

Public Member Functions

 LogFilterProxyModel (QObject *parent=nullptr)
 Constructs a new LogFilterProxyModel with the given parent object.
void setLevelEnabled (logging::LogLevel level, bool enabled)
 Sets the filter for log levels.
void setSourceFilter (const QString &source)
 Sets the filter for source names.
void setFileFilter (const QString &source)
 Sets the filter for file names.
void setTextFilter (const QString &text)
 Sets the text filter for log entries.

Protected Member Functions

bool filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const override
 Determines whether a row should be accepted based on the current filters.

Private Attributes

QSet< QString > mSourcesLevels
 The currently enabled log levels.
QString mFileFilter
 The currently enabled sources.
QString mTextFilter
 The current file name filter.

Detailed Description

A proxy model for filtering log entries based on various criteria.

Constructor & Destructor Documentation

◆ LogFilterProxyModel()

LogFilterProxyModel::LogFilterProxyModel ( QObject * parent = nullptr)

Constructs a new LogFilterProxyModel with the given parent object.

Parameters
parentThe parent object.

Member Function Documentation

◆ filterAcceptsRow()

bool LogFilterProxyModel::filterAcceptsRow ( int sourceRow,
const QModelIndex & sourceParent ) const
overrideprotected

Determines whether a row should be accepted based on the current filters.

Parameters
sourceRowThe index of the row in the source model.
sourceParentThe parent index of the row in the source model.
Returns
true if the row should be accepted, false otherwise.

◆ setFileFilter()

void LogFilterProxyModel::setFileFilter ( const QString & source)

Sets the filter for file names.

Parameters
sourceThe file name to filter by.

◆ setLevelEnabled()

void LogFilterProxyModel::setLevelEnabled ( logging::LogLevel level,
bool enabled )

Sets the filter for log levels.

Parameters
levelThe log level to filter by. Default is "All".

◆ setSourceFilter()

void LogFilterProxyModel::setSourceFilter ( const QString & source)

Sets the filter for source names.

Parameters
sourceThe source name to filter by.

◆ setTextFilter()

void LogFilterProxyModel::setTextFilter ( const QString & text)

Sets the text filter for log entries.

Parameters
textThe text to filter by.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/widgets/log_filter_model.h
  • /__w/maki/maki/app/widgets/log_filter_model.cpp