LogTableModel Class Reference

#include <ArmarXGui/gui-plugins/LoggingPlugin/ArmarXLogViewer/LogTableModel.h>

+ Inheritance diagram for LogTableModel:

Public Types

enum class  UserRoles : int { FullMsgRole = Qt::UserRole + 1 }
 

Public Slots

int addEntries (const std::vector< LogMessage > &entryList, const QString &filterStr)
 
bool addEntry (const LogMessage &entry, int *entriesAdded=NULL)
 

Public Member Functions

void addFilter (const std::string &columnName, const std::string &filter)
 
int clearData ()
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
int getColumn (const std::string &columnName) const
 
QString getCurrentSearchStr ()
 
const std::vector< std::pair< std::string, std::string > > & getFilters () const
 
const LogMessage & getLogEntry (size_t row) const
 
MessageType getMaxNewLogLevelType ()
 
QVariant headerData (int section, Qt::Orientation orientation, int role) const override
 
bool insertRows (int row, int count, const QModelIndex &parent) override
 
 LogTableModel (QObject *parent=0)
 
bool msgContainsString (const LogMessage &logMsg, QString searchStr) const
 
void reapplyAllFilters ()
 
void resetFilters ()
 
bool rowContainsSameContent (int row, const LogMessage &logMsg) const
 
bool rowContainsString (int row, const QString &searchStr) const
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
void search (const QString &searchStr)
 
bool setData (const QModelIndex &index, const QVariant &value, int role) override
 
void updateView ()
 

Protected Member Functions

bool applyFilter (std::pair< std::string, std::string > filter, const LogMessage &logMsg)
 
bool applyFilter (std::string filter, int row, int column)
 
bool applyFilters (const LogMessage &logMsg)
 
bool applyFilters (int row)
 

Detailed Description

Definition at line 38 of file LogTableModel.h.

Member Enumeration Documentation

◆ UserRoles

enum class UserRoles : int
strong
Enumerator
FullMsgRole 

Definition at line 42 of file LogTableModel.h.

Constructor & Destructor Documentation

◆ LogTableModel()

LogTableModel ( QObject * parent = 0)
explicit

Definition at line 31 of file LogTableModel.cpp.

Member Function Documentation

◆ addEntries

int addEntries ( const std::vector< LogMessage > & entryList,
const QString & filterStr )
slot

Definition at line 657 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addEntry

bool addEntry ( const LogMessage & entry,
int * entriesAdded = NULL )
slot

Definition at line 616 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addFilter()

void addFilter ( const std::string & columnName,
const std::string & filter )

Definition at line 575 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ applyFilter() [1/2]

bool applyFilter ( std::pair< std::string, std::string > filter,
const LogMessage & logMsg )
protected

Definition at line 728 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ applyFilter() [2/2]

bool applyFilter ( std::string filter,
int row,
int column )
protected

Definition at line 827 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ applyFilters() [1/2]

bool applyFilters ( const LogMessage & logMsg)
protected

Definition at line 855 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ applyFilters() [2/2]

bool applyFilters ( int row)
protected

Definition at line 841 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearData()

int clearData ( )

Definition at line 706 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ columnCount()

int columnCount ( const QModelIndex & parent = QModelIndex()) const
override

Definition at line 44 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ data()

QVariant data ( const QModelIndex & index,
int role ) const
override

Definition at line 50 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flags()

Qt::ItemFlags flags ( const QModelIndex & index) const
override

Definition at line 534 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ getColumn()

int getColumn ( const std::string & columnName) const

Definition at line 685 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCurrentSearchStr()

QString getCurrentSearchStr ( )
inline

Definition at line 67 of file LogTableModel.h.

◆ getFilters()

const std::vector< std::pair< std::string, std::string > > & getFilters ( ) const
inline

Definition at line 82 of file LogTableModel.h.

◆ getLogEntry()

const LogMessage & getLogEntry ( size_t row) const

Definition at line 722 of file LogTableModel.cpp.

◆ getMaxNewLogLevelType()

MessageType getMaxNewLogLevelType ( )
inline

Definition at line 73 of file LogTableModel.h.

+ Here is the caller graph for this function:

◆ headerData()

QVariant headerData ( int section,
Qt::Orientation orientation,
int role ) const
override

Definition at line 421 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ insertRows()

bool insertRows ( int row,
int count,
const QModelIndex & parent )
override

Definition at line 560 of file LogTableModel.cpp.

◆ msgContainsString()

bool msgContainsString ( const LogMessage & logMsg,
QString searchStr ) const

Definition at line 325 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ reapplyAllFilters()

void reapplyAllFilters ( )

Definition at line 581 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ resetFilters()

void resetFilters ( )

Definition at line 610 of file LogTableModel.cpp.

◆ rowContainsSameContent()

bool rowContainsSameContent ( int row,
const LogMessage & logMsg ) const

Definition at line 366 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ rowContainsString()

bool rowContainsString ( int row,
const QString & searchStr ) const

Definition at line 304 of file LogTableModel.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ rowCount()

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

Definition at line 38 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ search()

void search ( const QString & searchStr)

Definition at line 409 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ setData()

bool setData ( const QModelIndex & index,
const QVariant & value,
int role )
override

Definition at line 528 of file LogTableModel.cpp.

◆ updateView()

void updateView ( )

Definition at line 547 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

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