LogTable Class Reference

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

+ Inheritance diagram for LogTable:

Public Slots

bool checkAutoScroll (const QModelIndex &parent, int start, int end)
 
bool checkAutoScroll (int dummy=0)
 
void doubleClickOnCell (const QModelIndex &index)
 
void itemsAdded (QModelIndex leftTop, QModelIndex bottomRight)
 
void rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) override
 
void rowsInserted (const QModelIndex &parent, int start, int end) override
 
bool selectNextSearchResult (bool backwards=true, bool keepSelectionIfPossible=false)
 
void showContextMenu (const QPoint &pos)
 Build the right-click menu ("Add label" / "Remove label") for the row under pos.
 

Signals

void addLabelRequested (LogSeq seq)
 Emitted from the context menu to pin the given line (assign a label).
 
void removeLabelRequested (LogSeq seq)
 Emitted from the context menu to remove the pin on the given line.
 

Public Member Functions

void fillSearchResults ()
 
QString getCurrentLiveFilter () const
 
QString getLiveFilterStr ()
 
MessageType getMaxNewLogLevelType ()
 
LogTableModelgetModel ()
 
int getNewMessageCount ()
 
void liveFilter (const QString &search, int startRow=0)
 
void liveFilterRow (const QString &filterStr, int row)
 
bool liveSearch (const QString &search)
 
 LogTable (QWidget *parent=0)
 
void notifyNewMessages (int count, MessageType maxLevel)
 Account for messages this filter accepted while it was hidden.
 
void resetLiveFilter ()
 
void resetLiveSearch ()
 
void resetNewMessageCount ()
 Clear the new-message badge (count and highest severity seen).
 
 ~LogTable () override
 
- Public Member Functions inherited from Logging
SpamFilterDataPtr deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
 disables the logging for the current line for the given amount of seconds.
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set.
 
void setTag (const LogTag &tag)
 
void setTag (const std::string &tagName)
 
virtual ~Logging ()
 

Protected Member Functions

void applyRowHeights (int start, int end)
 Give rows [start, end] the height their message needs.
 
void hideEvent (QHideEvent *) override
 
void showEvent (QShowEvent *event) override
 
- Protected Member Functions inherited from Logging
bool checkLogLevel (MessageTypeT level) const
 
const LogSenderPtrgetLogSender () const
 Retrieve log sender.
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 

Protected Attributes

bool autoscrollActive
 
QString currentLiveFilter
 
EditorFileOpener fileOpener
 
QString lastLiveFilter
 
MessageType maxNewLogLevelType
 
int newMessageCount
 
int selectedSearchIndex
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Friends

class LogSearch
 

Detailed Description

Definition at line 56 of file LogTable.h.

Constructor & Destructor Documentation

◆ LogTable()

LogTable ( QWidget * parent = 0)
explicit

Definition at line 38 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ ~LogTable()

~LogTable ( )
override

Definition at line 115 of file LogTable.cpp.

Member Function Documentation

◆ addLabelRequested

void addLabelRequested ( LogSeq seq)
signal

Emitted from the context menu to pin the given line (assign a label).

+ Here is the caller graph for this function:

◆ applyRowHeights()

void applyRowHeights ( int start,
int end )
protected

Give rows [start, end] the height their message needs.

Only ever called while this table is visible: every setRowHeight() invalidates and immediately rebuilds QHeaderView's start-position cache, which is O(rows) per call, and a hidden table is never painted.

Definition at line 352 of file LogTable.cpp.

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

◆ checkAutoScroll [1/2]

bool checkAutoScroll ( const QModelIndex & parent,
int start,
int end )
slot

Definition at line 287 of file LogTable.cpp.

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

◆ checkAutoScroll [2/2]

bool checkAutoScroll ( int dummy = 0)
slot

Definition at line 293 of file LogTable.cpp.

◆ doubleClickOnCell

void doubleClickOnCell ( const QModelIndex & index)
slot

Definition at line 456 of file LogTable.cpp.

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

◆ fillSearchResults()

void fillSearchResults ( )

◆ getCurrentLiveFilter()

QString getCurrentLiveFilter ( ) const

Definition at line 162 of file LogTable.cpp.

◆ getLiveFilterStr()

QString getLiveFilterStr ( )
inline

Definition at line 99 of file LogTable.h.

◆ getMaxNewLogLevelType()

MessageType getMaxNewLogLevelType ( )
inline

Definition at line 74 of file LogTable.h.

+ Here is the caller graph for this function:

◆ getModel()

LogTableModel * getModel ( )

Definition at line 281 of file LogTable.cpp.

+ Here is the caller graph for this function:

◆ getNewMessageCount()

int getNewMessageCount ( )
inline

Definition at line 68 of file LogTable.h.

+ Here is the caller graph for this function:

◆ hideEvent()

void hideEvent ( QHideEvent * )
overrideprotected

Definition at line 336 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ itemsAdded

void itemsAdded ( QModelIndex leftTop,
QModelIndex bottomRight )
slot

Definition at line 309 of file LogTable.cpp.

+ Here is the caller graph for this function:

◆ liveFilter()

void liveFilter ( const QString & search,
int startRow = 0 )

Definition at line 183 of file LogTable.cpp.

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

◆ liveFilterRow()

void liveFilterRow ( const QString & filterStr,
int row )

Definition at line 168 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ liveSearch()

bool liveSearch ( const QString & search)

Definition at line 256 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ notifyNewMessages()

void notifyNewMessages ( int count,
MessageType maxLevel )

Account for messages this filter accepted while it was hidden.

A hidden table's model builds no rows, so its rowsInserted is never called and the new-message badge has to be fed from the ingestion path instead.

Definition at line 152 of file LogTable.cpp.

◆ removeLabelRequested

void removeLabelRequested ( LogSeq seq)
signal

Emitted from the context menu to remove the pin on the given line.

+ Here is the caller graph for this function:

◆ resetLiveFilter()

void resetLiveFilter ( )

Definition at line 265 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ resetLiveSearch()

void resetLiveSearch ( )

Definition at line 274 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ resetNewMessageCount()

void resetNewMessageCount ( )
inline

Clear the new-message badge (count and highest severity seen).

Called when this table is shown, when every row is removed, and explicitly by the viewer's clear actions. The last of those matters: a filter that is not currently materialised holds no rows, so clearing it emits no row-removal signal and the badge would otherwise keep its stale count and colour.

Definition at line 86 of file LogTable.h.

+ Here is the caller graph for this function:

◆ rowsAboutToBeRemoved

void rowsAboutToBeRemoved ( const QModelIndex & parent,
int start,
int end )
overrideslot

Definition at line 385 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ rowsInserted

void rowsInserted ( const QModelIndex & parent,
int start,
int end )
overrideslot

Definition at line 370 of file LogTable.cpp.

+ Here is the call graph for this function:

◆ selectNextSearchResult

bool selectNextSearchResult ( bool backwards = true,
bool keepSelectionIfPossible = false )
slot

Definition at line 400 of file LogTable.cpp.

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

◆ showContextMenu

void showContextMenu ( const QPoint & pos)
slot

Build the right-click menu ("Add label" / "Remove label") for the row under pos.

Definition at line 120 of file LogTable.cpp.

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

◆ showEvent()

void showEvent ( QShowEvent * event)
overrideprotected

Definition at line 314 of file LogTable.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ LogSearch

friend class LogSearch
friend

Definition at line 145 of file LogTable.h.

Member Data Documentation

◆ autoscrollActive

bool autoscrollActive
protected

Definition at line 137 of file LogTable.h.

◆ currentLiveFilter

QString currentLiveFilter
protected

Definition at line 140 of file LogTable.h.

◆ fileOpener

EditorFileOpener fileOpener
protected

Definition at line 142 of file LogTable.h.

◆ lastLiveFilter

QString lastLiveFilter
protected

Definition at line 140 of file LogTable.h.

◆ maxNewLogLevelType

MessageType maxNewLogLevelType
protected

Definition at line 139 of file LogTable.h.

◆ newMessageCount

int newMessageCount
protected

Definition at line 138 of file LogTable.h.

◆ selectedSearchIndex

int selectedSearchIndex
protected

Definition at line 141 of file LogTable.h.


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