A widget for displaying log tables with filtering and search functionality.
More...
#include <log_table_widget.h>
|
| | LogTableWidget (QWidget *parent=nullptr) |
| | Constructs a new LogTableWidget.
|
| void | append (logging::LogLevel level, const QString &source, const QString &file, const uint32_t line, const QString &message) |
| | Appends a log message with a QString source and file.
|
| void | append (logging::LogLevel level, const std::string &source, const std::string &file, const uint32_t line, const std::string &message) |
| | Appends a log message with a std::string source and file.
|
|
void | clear () |
| | Clears all log messages from the table.
|
|
void | search () |
| | Initiates a search for the current search text.
|
|
void | showAll () |
| | Expand all the expandable widgets.
|
|
| void | setSearchText (const QString &text) |
| | Sets the search text and updates the search matches.
|
|
void | nextSearchMatch () |
| | Moves to the next search match.
|
|
void | previousSearchMatch () |
| | Moves to the previous search match.
|
|
void | rebuildSearchMatches () |
| | Rebuilds the list of search matches.
|
|
void | focusCurrentSearchMatch () |
| | Focuses on the current search match.
|
|
void | updateSearchCounter () |
| | Updates the search counter label.
|
| QVector< int > | selectedRows () const |
| | Returns a vector of selected row indices.
|
| void | showContextMenu (const QPoint &pos) |
| | Shows the context menu at the specified position.
|
|
void | copySelectedRows () const |
| | Copies the selected rows to the clipboard.
|
| void | copySelectedColumn (int column) const |
| | Copies a specific column of the selected rows to the clipboard.
|
| void | copySelectedColumns (std::initializer_list< int > columns) const |
| | Copies multiple columns of the selected rows to the clipboard.
|
| bool | isMessageElided (int proxyRow) const |
| | Checks if a message is elided in the table.
|
| bool | eventFilter (QObject *watched, QEvent *event) |
| | Filters events for child widgets.
|
| void | updateFilterText (QToolButton *button, const QString &base) |
| | Updates the text in a toolbutton filter.
|
|
|
LogFilterProxyModel * | mProxy = nullptr |
| | Pointer to the log table model.
|
|
QTableView * | mTable = nullptr |
| | Pointer to the log filter proxy model.
|
|
DropDownButton * | mLevelFilter = nullptr |
| | Pointer to the table view widget.
|
|
DropDownButton * | mSourceFilter = nullptr |
| | Pointer to the level filter button.
|
|
QLineEdit * | mFileFilter = nullptr |
| | Pointer to the source filter button.
|
|
QLineEdit * | mSearchField = nullptr |
| | Pointer to the file filter line edit.
|
|
QLabel * | mSearchCounterLabel = nullptr |
| | Pointer to the search field line edit.
|
|
ExpandingWidget * | mSearchBox = nullptr |
| | Pointer to the search counter label.
|
|
ExpandingWidget * | mFilterBox = nullptr |
| | Pointer to the search box widget.
|
|
LogHighlightDelegate * | mHighlightDelegate = nullptr |
| | Pointer to the filter box widget.
|
|
QString | mSearchText |
| | Pointer to the log highlight delegate.
|
|
QVector< QModelIndex > | mSearchMatches |
| | The current search text.
|
|
QSet< QString > | mSources |
| | List of search matches.
|
|
int | mCurrentSearchMatch = -1 |
| | Set of sources for filtering.
|
|
int | mDefaultRowHeight = 24 |
| | Index of the current search match.
|
|
int | mMaximumRows = 1000 |
| | Default row height in pixels.
|
A widget for displaying log tables with filtering and search functionality.
◆ LogTableWidget()
| LogTableWidget::LogTableWidget |
( |
QWidget * | parent = nullptr | ) |
|
◆ append() [1/2]
| void LogTableWidget::append |
( |
logging::LogLevel | level, |
|
|
const QString & | source, |
|
|
const QString & | file, |
|
|
const uint32_t | line, |
|
|
const QString & | message ) |
Appends a log message with a QString source and file.
- Parameters
-
| level | The log level. |
| source | The source of the log message. |
| file | The file where the log message was generated. |
| line | The line number in the file. |
| message | The log message. |
◆ append() [2/2]
| void LogTableWidget::append |
( |
logging::LogLevel | level, |
|
|
const std::string & | source, |
|
|
const std::string & | file, |
|
|
const uint32_t | line, |
|
|
const std::string & | message ) |
Appends a log message with a std::string source and file.
- Parameters
-
| level | The log level. |
| source | The source of the log message. |
| file | The file where the log message was generated. |
| line | The line number in the file. |
| message | The log message. |
◆ copySelectedColumn()
| void LogTableWidget::copySelectedColumn |
( |
int | column | ) |
const |
|
private |
Copies a specific column of the selected rows to the clipboard.
- Parameters
-
| column | The index of the column to copy. |
◆ copySelectedColumns()
| void LogTableWidget::copySelectedColumns |
( |
std::initializer_list< int > | columns | ) |
const |
|
private |
Copies multiple columns of the selected rows to the clipboard.
- Parameters
-
| columns | A list of column indices to copy. |
◆ eventFilter()
| bool LogTableWidget::eventFilter |
( |
QObject * | watched, |
|
|
QEvent * | event ) |
|
private |
Filters events for child widgets.
- Parameters
-
| watched | The widget being watched. |
| event | The event to filter. |
- Returns
- True if the event should be accepted, false otherwise.
◆ isMessageElided()
| bool LogTableWidget::isMessageElided |
( |
int | proxyRow | ) |
const |
|
private |
Checks if a message is elided in the table.
- Parameters
-
| proxyRow | The row index in the proxy model. |
- Returns
- True if the message is elided, false otherwise.
◆ onAreaCollapsed
| void LogTableWidget::onAreaCollapsed |
( |
ClickableIcon * | button, |
|
|
QLineEdit * | lineEdit, |
|
|
const QString & | iconName ) |
|
privateslot |
Handles area collapse events.
- Parameters
-
| button | The button that triggered the event. |
| lineEdit | The line edit associated with the button. |
| iconName | The icon name for the collapsed state. |
◆ onAreaExpanded
| void LogTableWidget::onAreaExpanded |
( |
ClickableIcon * | button, |
|
|
QLineEdit * | lineEdit ) |
|
privateslot |
Handles area expansion events.
- Parameters
-
| button | The button that triggered the event. |
| lineEdit | The line edit associated with the button. |
◆ onClicked
| void LogTableWidget::onClicked |
( |
const QModelIndex & | index | ) |
|
|
privateslot |
Handles click events on table items.
- Parameters
-
| index | The model index of the clicked item. |
◆ selectedRows()
| QVector< int > LogTableWidget::selectedRows |
( |
| ) |
const |
|
private |
Returns a vector of selected row indices.
- Returns
- A vector of selected row indices.
◆ setSearchText()
| void LogTableWidget::setSearchText |
( |
const QString & | text | ) |
|
|
private |
Sets the search text and updates the search matches.
- Parameters
-
◆ showContextMenu()
| void LogTableWidget::showContextMenu |
( |
const QPoint & | pos | ) |
|
|
private |
Shows the context menu at the specified position.
- Parameters
-
| pos | The position where the context menu should be shown. |
◆ updateFilterText()
| void LogTableWidget::updateFilterText |
( |
QToolButton * | button, |
|
|
const QString & | base ) |
|
private |
Updates the text in a toolbutton filter.
- Parameters
-
| button | The toolbutton to be updated. |
| base | The default text. |
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/widgets/log_table_widget.h
- /__w/maki/maki/app/widgets/log_table_widget.cpp