QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LogModel Class Reference

#include <LogModel.h>

+ Inheritance diagram for LogModel:
+ Collaboration diagram for LogModel:

Signals

void totalCountChanged ()
 
void maxEntriesChanged ()
 
void categoriesChanged ()
 
void filterLevelChanged ()
 
void filterCategoryChanged ()
 
void filterTextChanged ()
 
void filterRegexChanged ()
 
void filterRegexValidChanged ()
 

Public Member Functions

 LogModel (QObject *parent=nullptr)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
void multiData (const QModelIndex &index, QModelRoleDataSpan roleDataSpan) const override
 
int totalCount () const
 
int maxEntries () const
 
void setMaxEntries (int max)
 
int filterLevel () const
 
void setFilterLevel (int level)
 
QString filterCategory () const
 
void setFilterCategory (const QString &category)
 
QString filterText () const
 
void setFilterText (const QString &text)
 
bool filterRegex () const
 
bool filterRegexValid () const
 
void setFilterRegex (bool enabled)
 
QStringList categoriesList () const
 
Q_INVOKABLE void setFilterTextDeferred (const QString &text)
 
Q_INVOKABLE void clearFilters ()
 
Q_INVOKABLE void clear ()
 
void enqueue (LogEntry entry)
 
QList< LogEntryallEntriesSnapshot () const
 
QList< LogEntryfilteredEntries () const
 
- Public Member Functions inherited from LogEntryTableModel
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
void multiData (const QModelIndex &index, QModelRoleDataSpan roleDataSpan) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QHash< int, QByteArray > roleNames () const override
 

Protected Member Functions

const LogEntryentryAt (int row) const override
 Return entry at visible row, or nullptr if out of range.
 

Detailed Description

Definition at line 14 of file LogModel.h.

Constructor & Destructor Documentation

◆ LogModel()

LogModel::LogModel ( QObject *  parent = nullptr)
explicit

Definition at line 9 of file LogModel.cc.

Member Function Documentation

◆ allEntriesSnapshot()

QList< LogEntry > LogModel::allEntriesSnapshot ( ) const
inline

Definition at line 67 of file LogModel.h.

Referenced by LogManager::writeMessages().

◆ categoriesChanged

void LogModel::categoriesChanged ( )
signal

Referenced by clear().

◆ categoriesList()

QStringList LogModel::categoriesList ( ) const

Definition at line 377 of file LogModel.cc.

◆ clear()

void LogModel::clear ( )

Definition at line 355 of file LogModel.cc.

References categoriesChanged(), and totalCountChanged().

◆ clearFilters()

void LogModel::clearFilters ( )

◆ data()

QVariant LogModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

◆ enqueue()

void LogModel::enqueue ( LogEntry  entry)

Definition at line 220 of file LogModel.cc.

◆ entryAt()

const LogEntry * LogModel::entryAt ( int  row) const
overrideprotectedvirtual

Return entry at visible row, or nullptr if out of range.

Implements LogEntryTableModel.

Definition at line 73 of file LogModel.cc.

Referenced by data(), and multiData().

◆ filterCategory()

QString LogModel::filterCategory ( ) const
inline

Definition at line 46 of file LogModel.h.

◆ filterCategoryChanged

void LogModel::filterCategoryChanged ( )
signal

Referenced by clearFilters(), and setFilterCategory().

◆ filteredEntries()

QList< LogEntry > LogModel::filteredEntries ( ) const

Definition at line 388 of file LogModel.cc.

◆ filterLevel()

int LogModel::filterLevel ( ) const
inline

Definition at line 42 of file LogModel.h.

◆ filterLevelChanged

void LogModel::filterLevelChanged ( )
signal

Referenced by clearFilters(), and setFilterLevel().

◆ filterRegex()

bool LogModel::filterRegex ( ) const
inline

Definition at line 54 of file LogModel.h.

◆ filterRegexChanged

void LogModel::filterRegexChanged ( )
signal

Referenced by clearFilters(), and setFilterRegex().

◆ filterRegexValid()

bool LogModel::filterRegexValid ( ) const
inline

Definition at line 56 of file LogModel.h.

◆ filterRegexValidChanged

void LogModel::filterRegexValidChanged ( )
signal

Referenced by setFilterRegex().

◆ filterText()

QString LogModel::filterText ( ) const
inline

Definition at line 50 of file LogModel.h.

◆ filterTextChanged

void LogModel::filterTextChanged ( )
signal

Referenced by clearFilters(), and setFilterText().

◆ maxEntries()

int LogModel::maxEntries ( ) const
inline

Definition at line 38 of file LogModel.h.

◆ maxEntriesChanged

void LogModel::maxEntriesChanged ( )
signal

Referenced by setMaxEntries().

◆ multiData()

void LogModel::multiData ( const QModelIndex &  index,
QModelRoleDataSpan  roleDataSpan 
) const
override

◆ rowCount()

int LogModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 28 of file LogModel.cc.

Referenced by LogManager::init().

◆ setFilterCategory()

void LogModel::setFilterCategory ( const QString &  category)

Definition at line 110 of file LogModel.cc.

References filterCategoryChanged().

◆ setFilterLevel()

void LogModel::setFilterLevel ( int  level)

Definition at line 101 of file LogModel.cc.

References filterLevelChanged().

◆ setFilterRegex()

void LogModel::setFilterRegex ( bool  enabled)

Definition at line 141 of file LogModel.cc.

References filterRegexChanged(), and filterRegexValidChanged().

◆ setFilterText()

void LogModel::setFilterText ( const QString &  text)

Definition at line 119 of file LogModel.cc.

References filterTextChanged().

◆ setFilterTextDeferred()

void LogModel::setFilterTextDeferred ( const QString &  text)

Definition at line 133 of file LogModel.cc.

◆ setMaxEntries()

void LogModel::setMaxEntries ( int  max)

Definition at line 92 of file LogModel.cc.

References maxEntriesChanged().

◆ totalCount()

int LogModel::totalCount ( ) const
inline

Definition at line 36 of file LogModel.h.

◆ totalCountChanged

void LogModel::totalCountChanged ( )
signal

Referenced by clear().


The documentation for this class was generated from the following files: