LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
ui::qt::FilterProfile Struct Reference

Snapshot of all active filter state that can be named and persisted. More...

#include <FilterProfilesPanel.hpp>

Collaboration diagram for ui::qt::FilterProfile:
Collaboration graph

Public Member Functions

nlohmann::json ToJson () const
 Serialises the profile to a JSON object.
 

Static Public Member Functions

static FilterProfile FromJson (const nlohmann::json &j)
 

Public Attributes

std::string name
 Human-readable profile name (used as the unique identifier)
 
TimeRangeFilterPanel::State timeRange
 Time range filter state; active=false means "no time filter".
 
std::vector< std::string > uncheckedActors
 
bool hasTypeFilter {false}
 
std::vector< std::string > checkedTypes
 

Detailed Description

Snapshot of all active filter state that can be named and persisted.

A profile captures the complete, user-visible filter state at a single point in time so that it can be restored later with a single click.

Covered filter dimensions

Field Restored by
timeRange TimeRangeFilterPanel::SetState() + Apply()/Clear()
uncheckedActors ActorsPanel::RestoreUncheckedActors()
checkedTypes TypeFilterView::SetCheckedTypes()

JSON schema

{
"name": "Production errors",
"timeRange": { "field": "timestamp", "from": "2026-01-01", "to": "", "active": true },
"uncheckedActors": ["MyDef\u0000ServerA"],
"hasTypeFilter": true,
"checkedTypes": ["ERROR", "FATAL"]
}
Note
Actor keys use the ActorKey::Encode() / ActorKey::Decode() helpers defined in ActorDefinition.hpp.

Member Function Documentation

◆ FromJson()

FilterProfile ui::qt::FilterProfile::FromJson ( const nlohmann::json &  j)
static

Deserialises a profile from a JSON object. Missing fields receive safe default values.

Here is the caller graph for this function:

◆ ToJson()

nlohmann::json ui::qt::FilterProfile::ToJson ( ) const

Serialises the profile to a JSON object.

Here is the caller graph for this function:

Member Data Documentation

◆ checkedTypes

std::vector<std::string> ui::qt::FilterProfile::checkedTypes

Log-event type strings that were checked when the profile was saved. Only meaningful when hasTypeFilter is true.

◆ hasTypeFilter

bool ui::qt::FilterProfile::hasTypeFilter {false}

true when checkedTypes should be applied on load. false leaves the type filter panel untouched.

◆ name

std::string ui::qt::FilterProfile::name

Human-readable profile name (used as the unique identifier)

◆ timeRange

TimeRangeFilterPanel::State ui::qt::FilterProfile::timeRange

Time range filter state; active=false means "no time filter".

◆ uncheckedActors

std::vector<std::string> ui::qt::FilterProfile::uncheckedActors

Encoded actor keys (ActorKey::Encode(defName, actorName)) that were unchecked when the profile was saved. An empty vector means all actors were checked.


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