LogTableModel Class Reference

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

+ Inheritance diagram for LogTableModel:

Public Types

enum  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 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 30 of file LogTableModel.cpp.

Member Function Documentation

◆ addEntries

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

Definition at line 637 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 597 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 559 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 708 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 805 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ applyFilters() [1/2]

bool applyFilters ( const LogMessage &  logMsg)
protected

Definition at line 830 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ applyFilters() [2/2]

bool applyFilters ( int  row)
protected

Definition at line 817 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 686 of file LogTableModel.cpp.

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

◆ columnCount()

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

Definition at line 43 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 48 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 521 of file LogTableModel.cpp.

+ Here is the call graph for this function:

◆ getColumn()

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

Definition at line 666 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 65 of file LogTableModel.h.

+ Here is the caller graph for this function:

◆ getFilters()

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

Definition at line 77 of file LogTableModel.h.

+ Here is the caller graph for this function:

◆ getLogEntry()

const LogMessage & getLogEntry ( size_t  row) const

Definition at line 701 of file LogTableModel.cpp.

◆ getMaxNewLogLevelType()

MessageType getMaxNewLogLevelType ( )
inline

Definition at line 70 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 412 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 545 of file LogTableModel.cpp.

◆ msgContainsString()

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

Definition at line 316 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ reapplyAllFilters()

void reapplyAllFilters ( )

Definition at line 564 of file LogTableModel.cpp.

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

◆ resetFilters()

void resetFilters ( )

Definition at line 592 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ rowContainsSameContent()

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

Definition at line 356 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ rowContainsString()

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

Definition at line 298 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 37 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

◆ search()

void search ( const QString &  searchStr)

Definition at line 398 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 516 of file LogTableModel.cpp.

◆ updateView()

void updateView ( )

Definition at line 533 of file LogTableModel.cpp.

+ Here is the caller graph for this function:

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