Coloring rule lookups for the Qt views.
More...
#include <coloring_rule_utils.h>
Coloring rule lookups for the Qt views.
Views and models ask here instead of reading color_filter_t, the Frame dissector's coloring rule fields or the rule list themselves.
◆ entryForNode()
Resolves the coloring rule entry a Frame tree item belongs to.
Handles both shapes the Frame dissector produces: one entry as flat name / string / disabled items, several entries as name items holding their string and disabled items as children.
- Parameters
-
| node | Tree item of the packet details model; may be nullptr. |
| entry | Filled when the item belongs to an entry. |
- Returns
- true if
node is a name, string or disabled item of an entry.
◆ isDisabledEntryItem()
| bool ColoringRuleUtils::isDisabledEntryItem |
( |
const ProtoNode * | node | ) |
|
|
static |
Tells whether a Frame tree item belongs to a disabled rule's entry.
- Parameters
-
| node | Tree item of the packet details model; may be nullptr. |
- Returns
- true if the item's entry has a frame.coloring_rule.disabled item.
◆ matchColors()
Colors a packet list record is drawn with.
One entry per matching rule in match order; the first is the rule that colors the packet. A packet colored by a conversation rule gets that rule alone, because conversation colors take precedence over multiple colors. Without a match list (multi-color mode and multi-color details both off) only the rule that colors the packet is known.
- Parameters
-
| record | Record; may be nullptr. |
- Returns
- The colors; empty if the packet is not colored.
◆ setRuleEnabled()
| bool ColoringRuleUtils::setRuleEnabled |
( |
const ColoringRuleEntry & | entry, |
|
|
bool | enabled, |
|
|
QString * | err ) |
|
static |
Enables or disables the rule of an entry and saves the rule list.
Rules are matched by name, and by filter text when the entry has one, because names are not unique. The state is set, not toggled.
- Parameters
-
| entry | Entry from entryForNode(). |
| enabled | New state. |
| err | Set to the error text when saving fails. |
- Returns
- true if at least one rule matched (and saving was attempted).
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/utils/coloring_rule_utils.h
- /builds/wireshark/wireshark/ui/qt/utils/coloring_rule_utils.cpp