A delegate for highlighting log entries based on search text and expanding specific rows.
More...
#include <log_table_highlight.h>
|
| | LogHighlightDelegate (QObject *parent=nullptr) |
| | Constructs a new LogHighlightDelegate object.
|
| void | setSearchText (const QString &text) |
| | Sets the search text used for highlighting log entries.
|
| void | addExpandedRow (int row) |
| | Adds a row to the list of expanded rows.
|
| void | removeExpandedRow (int row) |
| | Removes a row from the list of expanded rows.
|
| bool | containExpandedRow (int row) const |
| | Checks if a specific row is in the list of expanded rows.
|
|
void | clearExpandedRows () |
| | Clears all expanded rows.
|
|
void | updatePadding (int hPadding, int vPadding) |
| | Update the internal padding for expanded rows.
|
| QSize | sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Returns the size hint for a given item view option and model index.
|
| void | paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override |
| | Paints an item in a given style option and model index.
|
|
|
QVector< int > | mExpandedRows = {} |
| | The current search text used for highlighting log entries.
|
|
int | mMatches = 0 |
| | List of rows that are currently expanded.
|
|
int | mExpandedHPadding = 4 |
| | Number of matches found during the last search.
|
A delegate for highlighting log entries based on search text and expanding specific rows.
◆ LogHighlightDelegate()
| LogHighlightDelegate::LogHighlightDelegate |
( |
QObject * | parent = nullptr | ) |
|
◆ addExpandedRow()
| void LogHighlightDelegate::addExpandedRow |
( |
int | row | ) |
|
Adds a row to the list of expanded rows.
- Parameters
-
| row | The index of the row to add. |
◆ containExpandedRow()
| bool LogHighlightDelegate::containExpandedRow |
( |
int | row | ) |
const |
Checks if a specific row is in the list of expanded rows.
- Parameters
-
| row | The index of the row to check. |
- Returns
- true If the row is expanded.
-
false If the row is not expanded.
◆ paint()
| void LogHighlightDelegate::paint |
( |
QPainter * | painter, |
|
|
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
Paints an item in a given style option and model index.
- Parameters
-
| painter | The painter to use for drawing. |
| option | The style option for the item view. |
| index | The model index of the item. |
◆ removeExpandedRow()
| void LogHighlightDelegate::removeExpandedRow |
( |
int | row | ) |
|
Removes a row from the list of expanded rows.
- Parameters
-
| row | The index of the row to remove. |
◆ setSearchText()
| void LogHighlightDelegate::setSearchText |
( |
const QString & | text | ) |
|
Sets the search text used for highlighting log entries.
- Parameters
-
| text | The search text to set. |
◆ sizeHint()
| QSize LogHighlightDelegate::sizeHint |
( |
const QStyleOptionViewItem & | option, |
|
|
const QModelIndex & | index ) const |
|
override |
Returns the size hint for a given item view option and model index.
- Parameters
-
| option | The style option for the item view. |
| index | The model index of the item. |
- Returns
- QSize The size hint for the item.
The documentation for this class was generated from the following files: