36#include <nlohmann/json.hpp>
106 [[nodiscard]] nlohmann::json
ToJson()
const;
207 size_t MergeProfiles(std::vector<FilterProfile> incoming,
bool overwriteCollisions);
213 [[nodiscard]]
bool HasProfile(
const std::string& name)
const;
Error handling utilities.
Panel for filtering events by a user-defined timestamp range.
Panel for saving and restoring named filter profiles.
Definition FilterProfilesPanel.hpp:152
void StoreProfile(const FilterProfile &profile)
Stores (or replaces) a profile in the panel and persists it to disk.
Definition FilterProfilesPanel.cpp:245
void LoadFromFile()
Definition FilterProfilesPanel.cpp:563
QPushButton * m_exportBtn
Definition FilterProfilesPanel.hpp:258
QPushButton * m_loadBtn
Definition FilterProfilesPanel.hpp:256
void RebuildList()
Definition FilterProfilesPanel.cpp:517
QListWidget * m_list
Definition FilterProfilesPanel.hpp:253
size_t MergeProfiles(std::vector< FilterProfile > incoming, bool overwriteCollisions)
Merges incoming into this panel's profile list and persists the result to internal storage.
Definition FilterProfilesPanel.cpp:477
void HandleImport()
Definition FilterProfilesPanel.cpp:369
void HandleLoad()
Definition FilterProfilesPanel.cpp:304
QPushButton * m_deleteBtn
Definition FilterProfilesPanel.hpp:257
void SaveToFile()
Definition FilterProfilesPanel.cpp:537
void HandleSelectionChanged()
Definition FilterProfilesPanel.cpp:336
void SaveRequested(const QString &name)
Emitted when the user clicks Save current state.
bool HasProfile(const std::string &name) const
Whether a profile with the given name currently exists.
Definition FilterProfilesPanel.cpp:507
size_t ProfileCount() const
Number of profiles currently held by the panel.
Definition FilterProfilesPanel.hpp:210
void ProfileLoadRequested(const FilterProfile &profile)
Emitted when the user selects a profile and clicks Load (or double-clicks the list item).
void HandleSave()
Definition FilterProfilesPanel.cpp:277
void BuildLayout()
Definition FilterProfilesPanel.cpp:149
QLineEdit * m_nameEdit
Definition FilterProfilesPanel.hpp:254
void HandleExport()
Definition FilterProfilesPanel.cpp:344
void HandleDelete()
Definition FilterProfilesPanel.cpp:317
std::vector< FilterProfile > m_profiles
Definition FilterProfilesPanel.hpp:252
static ReadProfilesResult ReadProfilesFile(const QString &path)
Reads and parses a .filters.json file (one or more profiles).
Definition FilterProfilesPanel.cpp:442
QLabel * m_statusLabel
Definition FilterProfilesPanel.hpp:260
QPushButton * m_saveBtn
Definition FilterProfilesPanel.hpp:255
static ExportResult ExportProfileToPath(const FilterProfile &profile, const QString &path)
Writes profile to path as a single-entry .filters.json array.
Definition FilterProfilesPanel.cpp:417
QPushButton * m_importBtn
Definition FilterProfilesPanel.hpp:259
static std::string DefaultFilePath()
Definition FilterProfilesPanel.cpp:612
Definition ConfigEditorDialog.cpp:19
Snapshot of all active filter state that can be named and persisted.
Definition FilterProfilesPanel.hpp:82
static FilterProfile FromJson(const nlohmann::json &j)
Definition FilterProfilesPanel.cpp:112
bool hasTypeFilter
Definition FilterProfilesPanel.hpp:98
TimeRangeFilterPanel::State timeRange
Time range filter state; active=false means "no time filter".
Definition FilterProfilesPanel.hpp:87
std::vector< std::string > checkedTypes
Definition FilterProfilesPanel.hpp:102
std::string name
Human-readable profile name (used as the unique identifier)
Definition FilterProfilesPanel.hpp:83
nlohmann::json ToJson() const
Serialises the profile to a JSON object.
Definition FilterProfilesPanel.cpp:88
std::vector< std::string > uncheckedActors
Definition FilterProfilesPanel.hpp:93
Plain-data snapshot of the panel state — used by filter profiles.
Definition TimeRangeFilterPanel.hpp:68