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 ()
 
LogTableModel * getModel ()
 
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 LogSenderPtr & getLogSender () 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
 

Constructor & Destructor Documentation

◆ LogTable()

LogTable ( QWidget * parent = 0)
explicit

◆ ~LogTable()

~LogTable ( )
override

Member Function Documentation

◆ addLabelRequested

void addLabelRequested ( LogSeq seq)
signal

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

◆ 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.

◆ checkAutoScroll [1/2]

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

◆ checkAutoScroll [2/2]

bool checkAutoScroll ( int dummy = 0)
slot

◆ doubleClickOnCell

void doubleClickOnCell ( const QModelIndex & index)
slot

◆ fillSearchResults()

void fillSearchResults ( )

◆ getCurrentLiveFilter()

QString getCurrentLiveFilter ( ) const

◆ getLiveFilterStr()

QString getLiveFilterStr ( )
inline

◆ getMaxNewLogLevelType()

MessageType getMaxNewLogLevelType ( )
inline

◆ getModel()

LogTableModel * getModel ( )

◆ getNewMessageCount()

int getNewMessageCount ( )
inline

◆ hideEvent()

void hideEvent ( QHideEvent * )
overrideprotected

◆ itemsAdded

void itemsAdded ( QModelIndex leftTop,
QModelIndex bottomRight )
slot

◆ liveFilter()

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

◆ liveFilterRow()

void liveFilterRow ( const QString & filterStr,
int row )

◆ liveSearch()

bool liveSearch ( const QString & search)

◆ 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.

◆ removeLabelRequested

void removeLabelRequested ( LogSeq seq)
signal

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

◆ resetLiveFilter()

void resetLiveFilter ( )

◆ resetLiveSearch()

void resetLiveSearch ( )

◆ 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.

◆ rowsAboutToBeRemoved

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

◆ rowsInserted

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

◆ selectNextSearchResult

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

◆ showContextMenu

void showContextMenu ( const QPoint & pos)
slot

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

◆ showEvent()

void showEvent ( QShowEvent * event)
overrideprotected

Friends And Related Symbol Documentation

◆ LogSearch

friend class LogSearch
friend

Member Data Documentation

◆ autoscrollActive

bool autoscrollActive
protected

◆ currentLiveFilter

QString currentLiveFilter
protected

◆ fileOpener

EditorFileOpener fileOpener
protected

◆ lastLiveFilter

QString lastLiveFilter
protected

◆ maxNewLogLevelType

MessageType maxNewLogLevelType
protected

◆ newMessageCount

int newMessageCount
protected

◆ selectedSearchIndex

int selectedSearchIndex
protected

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