LogViewer
A modern log viewer with AI-assisted analysis (Qt 6)
Loading...
Searching...
No Matches
FilterProfilesPanel.hpp File Reference

Named filter-profile save/restore panel and FilterProfile data type. More...

#include "TimeRangeFilterPanel.hpp"
#include "Error.hpp"
#include "Result.hpp"
#include <nlohmann/json.hpp>
#include <QWidget>
#include <set>
#include <string>
#include <vector>
Include dependency graph for FilterProfilesPanel.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ui::qt::FilterProfile
 Snapshot of all active filter state that can be named and persisted. More...
 
class  ui::qt::FilterProfilesPanel
 Panel for saving and restoring named filter profiles. More...
 

Namespaces

namespace  ui
 
namespace  ui::qt
 

Detailed Description

Named filter-profile save/restore panel and FilterProfile data type.

A filter profile is a lightweight snapshot of the complete filter state:

  • Time range (field name + from/to bounds + active flag)
  • Actor check state (set of unchecked actor keys)
  • Type filter selection (optional; only stored when at least one type exists)

Profiles are persisted as JSON in the application data directory (<appdata>/filter_profiles.json) and are loaded automatically on start-up.

Interaction model

The panel does not directly access other filter panels. Instead it delegates through MainWindow via two signals:

  • SaveRequested(name) → MainWindow gathers state → StoreProfile()
  • ProfileLoadRequested(profile) → MainWindow applies each field to the appropriate panel

Actor key encoding

Each entry in FilterProfile::uncheckedActors is a composite string of the form "<defName>\0<actorName>". The NUL character serves as a delimiter that cannot appear in either component. Use ActorKey::Encode() / ActorKey::Decode() for safe construction and decomposition.

Author
LogViewer Development Team
Date
2026